Package org.apache.axis2.description
Class AxisDescription
- java.lang.Object
-
- org.apache.axis2.description.AxisDescription
-
- All Implemented Interfaces:
DescriptionConstants
,ParameterInclude
- Direct Known Subclasses:
AxisBinding
,AxisBindingMessage
,AxisBindingOperation
,AxisConfiguration
,AxisEndpoint
,AxisMessage
,AxisOperation
,AxisService
,AxisServiceGroup
public abstract class AxisDescription extends Object implements ParameterInclude, DescriptionConstants
-
-
Field Summary
Fields Modifier and Type Field Description protected Map<String,AxisModule>
engagedModules
Map of modules engaged on this object.protected List<ParameterObserver>
parameterObservers
List of ParameterObservers who want to be notified of changesprotected AxisDescription
parent
-
Fields inherited from interface org.apache.axis2.description.DescriptionConstants
CLASSLOADER_KEY, CONTEXTPATH_KEY, EXECUTION_CHAIN_KEY, EXECUTION_FAULT_CHAIN_KEY, EXECUTION_OUT_CHAIN_KEY, IN_FAULTFLOW_KEY, INFLOW_KEY, MESSAGE_RECEIVER_KEY, MODULEREF_KEY, OPERATION_KEY, OUT_FAULTFLOW_KEY, OUTFLOW_KEY, PARAMETER_KEY, PHASES_KEY, SERVICE_CLASS_NAME, STYLE_KEY
-
-
Constructor Summary
Constructors Constructor Description AxisDescription()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addChild(Object key, AxisDescription child)
void
addChild(AxisDescription child)
void
addParameter(String name, Object value)
void
addParameter(Parameter param)
Method addParameter.void
addParameterObserver(ParameterObserver observer)
void
applyPolicy()
Applies the policies on the Description Hierarchy recursively.void
applyPolicy(org.apache.neethi.Policy policy)
This method sets the policy as the default of this AxisDescription instance.void
deserializeParameters(OMElement parameterElement)
void
disengageModule(AxisModule module)
void
engageModule(AxisModule axisModule)
Engage a Module at this levelvoid
engageModule(AxisModule axisModule, AxisDescription source)
Engage a Module at this level, keeping track of which level the engage was originally called from.AxisConfiguration
getAxisConfiguration()
AxisDescription
getChild(Object key)
Iterator<? extends AxisDescription>
getChildren()
String
getDocumentation()
OMNode
getDocumentationNode()
Collection<AxisModule>
getEngagedModules()
abstract Object
getKey()
Parameter
getParameter(String name)
If the parameter is found in the current description then the Parameter will be writable else it will be read onlyArrayList<Parameter>
getParameters()
Gets all the parameters in a given description.Object
getParameterValue(String name)
AxisDescription
getParent()
PolicyInclude
getPolicyInclude()
Deprecated.As of release 1.4, replaced bygetPolicySubject()
PolicySubject
getPolicySubject()
boolean
isEngaged(String moduleName)
Check if a given module is engaged at this level.boolean
isEngaged(AxisModule axisModule)
boolean
isParameterLocked(String parameterName)
Checks whether the parameter is locked at any level.boolean
isParameterTrue(String name)
protected void
onDisengage(AxisModule module)
protected void
onEngage(AxisModule module, AxisDescription engager)
void
removeChild(Object key)
void
removeParameter(Parameter param)
void
removeParameterObserver(ParameterObserver observer)
void
setDocumentation(String documentation)
void
setDocumentation(OMNode documentation)
void
setParent(AxisDescription parent)
void
setPolicyInclude(PolicyInclude policyInclude)
Deprecated.As of release 1.4, if you want to access the policy cache of a particular AxisDescription object usegetPolicySubject()
instead.
-
-
-
Field Detail
-
parent
protected AxisDescription parent
-
engagedModules
protected Map<String,AxisModule> engagedModules
Map of modules engaged on this object. The key is the archive name as defined byAxisModule.getArchiveName()
.
-
parameterObservers
protected List<ParameterObserver> parameterObservers
List of ParameterObservers who want to be notified of changes
-
-
Method Detail
-
addParameterObserver
public void addParameterObserver(ParameterObserver observer)
-
removeParameterObserver
public void removeParameterObserver(ParameterObserver observer)
-
addParameter
public void addParameter(Parameter param) throws AxisFault
Description copied from interface:ParameterInclude
Method addParameter.- Specified by:
addParameter
in interfaceParameterInclude
- Throws:
AxisFault
-
addParameter
public void addParameter(String name, Object value) throws AxisFault
- Throws:
AxisFault
-
removeParameter
public void removeParameter(Parameter param) throws AxisFault
- Specified by:
removeParameter
in interfaceParameterInclude
- Throws:
AxisFault
-
deserializeParameters
public void deserializeParameters(OMElement parameterElement) throws AxisFault
- Specified by:
deserializeParameters
in interfaceParameterInclude
- Throws:
AxisFault
-
getParameter
public Parameter getParameter(String name)
If the parameter is found in the current description then the Parameter will be writable else it will be read only- Specified by:
getParameter
in interfaceParameterInclude
- Parameters:
name
- name of Parameter to retrieve- Returns:
- the Parameter, if found anywhere in the stack, or null if not
-
isParameterTrue
public boolean isParameterTrue(String name)
-
getParameters
public ArrayList<Parameter> getParameters()
Description copied from interface:ParameterInclude
Gets all the parameters in a given description.- Specified by:
getParameters
in interfaceParameterInclude
- Returns:
- Returns ArrayList.
-
isParameterLocked
public boolean isParameterLocked(String parameterName)
Description copied from interface:ParameterInclude
Checks whether the parameter is locked at any level.- Specified by:
isParameterLocked
in interfaceParameterInclude
-
getDocumentation
public String getDocumentation()
-
getDocumentationNode
public OMNode getDocumentationNode()
-
setDocumentation
public void setDocumentation(OMNode documentation)
-
setDocumentation
public void setDocumentation(String documentation)
-
setParent
public void setParent(AxisDescription parent)
-
getParent
public AxisDescription getParent()
-
setPolicyInclude
public void setPolicyInclude(PolicyInclude policyInclude)
Deprecated.As of release 1.4, if you want to access the policy cache of a particular AxisDescription object usegetPolicySubject()
instead.- Parameters:
policyInclude
- PolicyInclude value- See Also:
setPolicyInclude(PolicyInclude)
-
getPolicyInclude
public PolicyInclude getPolicyInclude()
Deprecated.As of release 1.4, replaced bygetPolicySubject()
- Returns:
- the active PolicyInclue
- See Also:
getPolicySubject()
-
addChild
public void addChild(AxisDescription child)
-
addChild
public void addChild(Object key, AxisDescription child)
-
getChildren
public Iterator<? extends AxisDescription> getChildren()
-
getChild
public AxisDescription getChild(Object key)
-
removeChild
public void removeChild(Object key)
-
applyPolicy
public void applyPolicy(org.apache.neethi.Policy policy) throws AxisFault
This method sets the policy as the default of this AxisDescription instance. Further more this method does the followings. (1) Engage whatever modules necessary to execute new the effective policy of this AxisDescription instance. (2) Disengage whatever modules that are not necessary to execute the new effective policy of this AxisDescription instance. (3) Check whether each module can execute the new effective policy of this AxisDescription instance. (4) If not throw an AxisFault to notify the user. (5) Else notify each module about the new effective policy.- Parameters:
policy
- the new policy of this AxisDescription instance. The effective policy is the merge of this argument with effective policy of parent of this AxisDescription.- Throws:
AxisFault
- if any module is unable to execute the effective policy of this AxisDescription instance successfully or no module to execute some portion (one or more PrimtiveAssertions ) of that effective policy.
-
applyPolicy
public void applyPolicy() throws AxisFault
Applies the policies on the Description Hierarchy recursively.- Throws:
AxisFault
- an error occurred applying the policy
-
getAxisConfiguration
public AxisConfiguration getAxisConfiguration()
-
getKey
public abstract Object getKey()
-
engageModule
public void engageModule(AxisModule axisModule) throws AxisFault
Engage a Module at this level- Parameters:
axisModule
- the Module to engage- Throws:
AxisFault
- if there's a problem engaging
-
engageModule
public void engageModule(AxisModule axisModule, AxisDescription source) throws AxisFault
Engage a Module at this level, keeping track of which level the engage was originally called from. This is meant for internal use only.- Parameters:
axisModule
- module to engagesource
- the AxisDescription which originally called engageModule()- Throws:
AxisFault
- if there's a problem engaging
-
onEngage
protected void onEngage(AxisModule module, AxisDescription engager) throws AxisFault
- Throws:
AxisFault
-
getEngagedModules
public Collection<AxisModule> getEngagedModules()
-
isEngaged
public boolean isEngaged(String moduleName)
Check if a given module is engaged at this level.- Parameters:
moduleName
- module to investigate.- Returns:
- true if engaged, false if not. TODO: Handle versions? isEngaged("addressing") should be true even for versioned modulename...
-
isEngaged
public boolean isEngaged(AxisModule axisModule)
-
disengageModule
public void disengageModule(AxisModule module) throws AxisFault
- Throws:
AxisFault
-
onDisengage
protected void onDisengage(AxisModule module) throws AxisFault
- Throws:
AxisFault
-
getPolicySubject
public PolicySubject getPolicySubject()
-
-