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>engagedModulesMap of modules engaged on this object.protected List<ParameterObserver>parameterObserversList of ParameterObservers who want to be notified of changesprotected AxisDescriptionparent-
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 voidaddChild(Object key, AxisDescription child)voidaddChild(AxisDescription child)voidaddParameter(String name, Object value)voidaddParameter(Parameter param)Method addParameter.voidaddParameterObserver(ParameterObserver observer)voidapplyPolicy()Applies the policies on the Description Hierarchy recursively.voidapplyPolicy(org.apache.neethi.Policy policy)This method sets the policy as the default of this AxisDescription instance.voiddeserializeParameters(OMElement parameterElement)voiddisengageModule(AxisModule module)voidengageModule(AxisModule axisModule)Engage a Module at this levelvoidengageModule(AxisModule axisModule, AxisDescription source)Engage a Module at this level, keeping track of which level the engage was originally called from.AxisConfigurationgetAxisConfiguration()AxisDescriptiongetChild(Object key)Iterator<? extends AxisDescription>getChildren()StringgetDocumentation()OMNodegetDocumentationNode()Collection<AxisModule>getEngagedModules()abstract ObjectgetKey()ParametergetParameter(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.ObjectgetParameterValue(String name)AxisDescriptiongetParent()PolicyIncludegetPolicyInclude()Deprecated.As of release 1.4, replaced bygetPolicySubject()PolicySubjectgetPolicySubject()booleanisEngaged(String moduleName)Check if a given module is engaged at this level.booleanisEngaged(AxisModule axisModule)booleanisParameterLocked(String parameterName)Checks whether the parameter is locked at any level.booleanisParameterTrue(String name)protected voidonDisengage(AxisModule module)protected voidonEngage(AxisModule module, AxisDescription engager)voidremoveChild(Object key)voidremoveParameter(Parameter param)voidremoveParameterObserver(ParameterObserver observer)voidsetDocumentation(String documentation)voidsetDocumentation(OMNode documentation)voidsetParent(AxisDescription parent)voidsetPolicyInclude(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:ParameterIncludeMethod addParameter.- Specified by:
addParameterin 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:
removeParameterin interfaceParameterInclude- Throws:
AxisFault
-
deserializeParameters
public void deserializeParameters(OMElement parameterElement) throws AxisFault
- Specified by:
deserializeParametersin 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:
getParameterin 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:ParameterIncludeGets all the parameters in a given description.- Specified by:
getParametersin interfaceParameterInclude- Returns:
- Returns ArrayList.
-
isParameterLocked
public boolean isParameterLocked(String parameterName)
Description copied from interface:ParameterIncludeChecks whether the parameter is locked at any level.- Specified by:
isParameterLockedin 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 AxisFaultThis 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 AxisFaultApplies 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()
-
-