org.apache.axis2.deployment
Class DescriptionBuilder

java.lang.Object
  extended byorg.apache.axis2.deployment.DescriptionBuilder
All Implemented Interfaces:
DeploymentConstants
Direct Known Subclasses:
AxisConfigBuilder, ModuleBuilder, ServiceBuilder, ServiceGroupBuilder

public class DescriptionBuilder
extends Object
implements DeploymentConstants

This class does the common tasks for all *Builder class.


Field Summary
protected  AxisConfiguration axisConfig
           
protected  InputStream descriptionStream
           
protected  org.apache.commons.logging.Log log
           
 
Fields inherited from interface org.apache.axis2.deployment.DeploymentConstants
ATTRIBUTE_DEFAULT_VERSION, ATTRIBUTE_LOCKED, ATTRIBUTE_NAME, ATTRIBUTE_SCOPE, AXIS2_CONFIGURATION_RESOURCE, AXIS2_CONFIGURATION_XML, BOOLEAN_FALSE, BOOLEAN_TRUE, DIRECTORY_AXIS2_HOME, DIRECTORY_MODULES, DIRECTORY_SERVICES, META_INF, MODULE_PATH, MODULE_XML, POLICY_NS_URI, PROPERTY_TEMP_DIR, RESOURCE_MODULES, SEPARATOR_COLON, SEPARATOR_DOT, SERVICE_PATH, SERVICES_XML, SUFFIX_JAR, SUFFIX_MAR, SUFFIX_WSDL, TAG_AFTER, TAG_BEFORE, TAG_CLASS_NAME, TAG_DEFAULT_MODULE_VERSION, TAG_DESCRIPTION, TAG_DISPATCH_ORDER, TAG_DISPATCHER, TAG_EXTRACT_SERVICE_ARCHIVE, TAG_FLOW_IN, TAG_FLOW_IN_FAULT, TAG_FLOW_OUT, TAG_FLOW_OUT_FAULT, TAG_HANDLER, TAG_HOST_CONFIG, TAG_HOT_DEPLOYMENT, TAG_HOT_UPDATE, TAG_LABEL, TAG_LISTENER, TAG_MEP, TAG_MESSAGE, TAG_MESSAGE_RECEIVER, TAG_MESSAGE_RECEIVERS, TAG_MODULE, TAG_MODULE_CONFIG, TAG_OPERATION, TAG_ORDER, TAG_PARAMETER, TAG_PHASE, TAG_PHASE_FIRST, TAG_PHASE_LAST, TAG_PHASE_ORDER, TAG_POLICY, TAG_POLICY_REF, TAG_REFERENCE, TAG_SERVICE, TAG_SERVICE_GROUP, TAG_TRANSPORT_RECEIVER, TAG_TRANSPORT_SENDER, TAG_TYPE, TYPE_MODULE, TYPE_SERVICE
 
Constructor Summary
DescriptionBuilder()
           
DescriptionBuilder(InputStream serviceInputStream, AxisConfiguration axisConfig)
           
 
Method Summary
 OMElement buildOM()
          Creates OMElement for a given description document (axis2.xml , services.xml and module.xml).
static String getShortFileName(String fileName)
          Gets the short file name.
protected  String getValue(String in)
          Gets the value of an attribute.
protected  MessageReceiver loadDefaultMessageReceiver(String mepURL, AxisService service)
          Loads default message receivers.
protected  MessageReceiver loadMessageReceiver(ClassLoader loader, OMElement element)
           
protected  Flow processFlow(OMElement flowelement, ParameterInclude parent)
          Processes flow elements in services.xml .
protected  HandlerDescription processHandler(OMElement handler_element, ParameterInclude parent)
          Processes Handler element.
protected  HashMap processMessageReceivers(ClassLoader loader, OMElement element)
          Processes default message receivers specified either in axis2.xml or services.xml.
protected  HashMap processMessageReceivers(OMElement messageReceivers)
          Processes default message receivers specified either in axis2.xml or services.xml.
protected  void processOperationModuleRefs(Iterator moduleRefs, AxisOperation operation)
           
protected  ArrayList processParameters(Iterator parameters, ParameterInclude parameterInclude, ParameterInclude parent)
          Gets the Parameter object from the OM.
protected  void processPolicyElements(int type, Iterator policyElements, PolicyInclude policyInclude)
           
protected  void processPolicyRefElements(int type, Iterator policyRefElements, PolicyInclude policyInclude)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected org.apache.commons.logging.Log log

axisConfig

protected AxisConfiguration axisConfig

descriptionStream

protected InputStream descriptionStream
Constructor Detail

DescriptionBuilder

public DescriptionBuilder()

DescriptionBuilder

public DescriptionBuilder(InputStream serviceInputStream,
                          AxisConfiguration axisConfig)
Method Detail

buildOM

public OMElement buildOM()
                  throws XMLStreamException
Creates OMElement for a given description document (axis2.xml , services.xml and module.xml).

Returns:
Returns OMElement .
Throws:
XMLStreamException

loadDefaultMessageReceiver

protected MessageReceiver loadDefaultMessageReceiver(String mepURL,
                                                     AxisService service)
Loads default message receivers. First searches in Axiservice for the given mepURL, if not found searches in AxisConfiguration with the given mepURL.

Parameters:
mepURL - : can be null
service - : This can be null AxisService

processMessageReceivers

protected HashMap processMessageReceivers(OMElement messageReceivers)
                                   throws DeploymentException
Processes default message receivers specified either in axis2.xml or services.xml.

Parameters:
messageReceivers -
Throws:
DeploymentException

processMessageReceivers

protected HashMap processMessageReceivers(ClassLoader loader,
                                          OMElement element)
                                   throws DeploymentException
Processes default message receivers specified either in axis2.xml or services.xml.

Parameters:
element -
Throws:
DeploymentException

loadMessageReceiver

protected MessageReceiver loadMessageReceiver(ClassLoader loader,
                                              OMElement element)
                                       throws DeploymentException
Throws:
DeploymentException

processFlow

protected Flow processFlow(OMElement flowelement,
                           ParameterInclude parent)
                    throws DeploymentException
Processes flow elements in services.xml .

Parameters:
flowelement - OMElement
Returns:
Returns Flow.
Throws:
DeploymentException - DeploymentException

processHandler

protected HandlerDescription processHandler(OMElement handler_element,
                                            ParameterInclude parent)
                                     throws DeploymentException
Processes Handler element.

Parameters:
handler_element - OMElement
Returns:
Returns HandlerDescription.
Throws:
DeploymentException - DeploymentException

processOperationModuleRefs

protected void processOperationModuleRefs(Iterator moduleRefs,
                                          AxisOperation operation)
                                   throws DeploymentException
Throws:
DeploymentException

processParameters

protected ArrayList processParameters(Iterator parameters,
                                      ParameterInclude parameterInclude,
                                      ParameterInclude parent)
                               throws DeploymentException
Gets the Parameter object from the OM.

Parameters:
parameters - Parameter
parameterInclude - ParameterInclude
parent - ParameterInclude
Returns:
list of WSA action parameters
Throws:
DeploymentException

processPolicyElements

protected void processPolicyElements(int type,
                                     Iterator policyElements,
                                     PolicyInclude policyInclude)

processPolicyRefElements

protected void processPolicyRefElements(int type,
                                        Iterator policyRefElements,
                                        PolicyInclude policyInclude)

getShortFileName

public static String getShortFileName(String fileName)
Gets the short file name. Short file name is the name before the dot.

Parameters:
fileName -
Returns:
Returns String.

getValue

protected String getValue(String in)
Gets the value of an attribute. eg xsd:anyVal --> anyVal

Returns:
Returns String.