org.apache.axis2.description
Class AxisDescription

java.lang.Object
  extended by 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 java.lang.Object
implements ParameterInclude, DescriptionConstants


Field Summary
protected  java.util.Map engagedModules
           
protected  java.util.List parameterObservers
          List of ParameterObservers who want to be notified of changes
protected  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
AxisDescription()
           
 
Method Summary
 void addChild(AxisDescription child)
           
 void addChild(java.lang.Object key, AxisDescription child)
           
 void addParameter(Parameter param)
          Method addParameter.
 void addParameter(java.lang.String name, java.lang.Object value)
           
 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(org.apache.axiom.om.OMElement parameterElement)
           
 void disengageModule(AxisModule module)
           
 void engageModule(AxisModule axisModule)
          Engage a Module at this level
 void 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(java.lang.Object key)
           
 java.util.Iterator getChildren()
           
 java.lang.String getDocumentation()
           
 org.apache.axiom.om.OMNode getDocumentationNode()
           
 java.util.Collection getEngagedModules()
           
abstract  java.lang.Object getKey()
           
 Parameter getParameter(java.lang.String name)
          If the parameter found in the current decription then the paremeter will be writable else it will be read only
 java.util.ArrayList getParameters()
          Gets all the parameters in a given description.
 java.lang.Object getParameterValue(java.lang.String name)
           
 AxisDescription getParent()
           
 PolicyInclude getPolicyInclude()
          Deprecated. As of release 1.4, replaced by getPolicySubject()
 PolicySubject getPolicySubject()
           
 boolean isEngaged(AxisModule axisModule)
           
 boolean isEngaged(java.lang.String moduleName)
          Check if a given module is engaged at this level.
 boolean isParameterLocked(java.lang.String parameterName)
          Checks whether the parameter is locked at any level.
 boolean isParameterTrue(java.lang.String name)
           
protected  void onDisengage(AxisModule module)
           
protected  void onEngage(AxisModule module, AxisDescription engager)
           
 void removeChild(java.lang.Object key)
           
 void removeParameter(Parameter param)
           
 void removeParameterObserver(ParameterObserver observer)
           
 void setDocumentation(org.apache.axiom.om.OMNode documentation)
           
 void setDocumentation(java.lang.String 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 use instead.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

protected AxisDescription parent

engagedModules

protected java.util.Map engagedModules

parameterObservers

protected java.util.List parameterObservers
List of ParameterObservers who want to be notified of changes

Constructor Detail

AxisDescription

public AxisDescription()
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 interface ParameterInclude
Throws:
AxisFault

addParameter

public void addParameter(java.lang.String name,
                         java.lang.Object value)
                  throws AxisFault
Throws:
AxisFault

removeParameter

public void removeParameter(Parameter param)
                     throws AxisFault
Specified by:
removeParameter in interface ParameterInclude
Throws:
AxisFault

deserializeParameters

public void deserializeParameters(org.apache.axiom.om.OMElement parameterElement)
                           throws AxisFault
Specified by:
deserializeParameters in interface ParameterInclude
Throws:
AxisFault

getParameter

public Parameter getParameter(java.lang.String name)
If the parameter found in the current decription then the paremeter will be writable else it will be read only

Specified by:
getParameter in interface ParameterInclude
Parameters:
name -
Returns:

getParameterValue

public java.lang.Object getParameterValue(java.lang.String name)

isParameterTrue

public boolean isParameterTrue(java.lang.String name)

getParameters

public java.util.ArrayList getParameters()
Description copied from interface: ParameterInclude
Gets all the parameters in a given description.

Specified by:
getParameters in interface ParameterInclude
Returns:
Returns ArrayList.

isParameterLocked

public boolean isParameterLocked(java.lang.String parameterName)
Description copied from interface: ParameterInclude
Checks whether the parameter is locked at any level.

Specified by:
isParameterLocked in interface ParameterInclude

getDocumentation

public java.lang.String getDocumentation()

getDocumentationNode

public org.apache.axiom.om.OMNode getDocumentationNode()

setDocumentation

public void setDocumentation(org.apache.axiom.om.OMNode documentation)

setDocumentation

public void setDocumentation(java.lang.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 use instead.

Parameters:
policyInclude -
See Also:
setPolicyInclude(PolicyInclude)

getPolicyInclude

public PolicyInclude getPolicyInclude()
Deprecated. As of release 1.4, replaced by getPolicySubject()

See Also:
getPolicySubject()

addChild

public void addChild(AxisDescription child)

addChild

public void addChild(java.lang.Object key,
                     AxisDescription child)

getChildren

public java.util.Iterator getChildren()

getChild

public AxisDescription getChild(java.lang.Object key)

removeChild

public void removeChild(java.lang.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 java.lang.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 engage
source - 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 java.util.Collection getEngagedModules()

isEngaged

public boolean isEngaged(java.lang.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()


Copyright © 2007 Apache Web Services Project. All Rights Reserved.