org.apache.axis2.deployment
Class DescriptionBuilder

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

public class DescriptionBuilder
extends java.lang.Object
implements DeploymentConstants

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


Field Summary
protected  AxisConfiguration axisConfig
           
protected  ConfigurationContext configCtx
           
protected  java.io.InputStream descriptionStream
           
 
Fields inherited from interface org.apache.axis2.deployment.DeploymentConstants
ATTACHMENTS_LIFECYCLE_MANAGER, ATTRIBUTE_ACTIVATE, ATTRIBUTE_CLASS, ATTRIBUTE_DEFAULT_VERSION, ATTRIBUTE_LOCKED, ATTRIBUTE_NAME, ATTRIBUTE_NAMESPACE, ATTRIBUTE_PACKAGE, ATTRIBUTE_SCOPE, ATTRIBUTE_WSADDRESSING, AXIS2_CONFIGURATION_RESOURCE, AXIS2_CONFIGURATION_XML, AXIS2_REPO, BOOLEAN_FALSE, BOOLEAN_TRUE, DEPLOYER, DIRECTORY, DIRECTORY_AXIS2_HOME, DIRECTORY_CONF, EXTENSION, MAPPING, META_INF, MODULE_DRI_PATH, MODULE_PATH, MODULE_XML, POLICY_NS_URI, PROPERTY_TEMP_DIR, RESOURCE_MODULES, SCHEMA, SCHEMA_ELEMENT_QUALIFIED, SCHEMA_NAME_SPACE, SEPARATOR_COLON, SEPARATOR_DOT, SERVICE_DIR_PATH, SERVICE_PATH, SERVICES_XML, SUFFIX_JAR, SUFFIX_MAR, SUFFIX_WSDL, TAG_AFTER, TAG_ANTI_JAR_LOCKING, TAG_APPLIES_TO, TAG_AXISCONFIG, TAG_BEFORE, TAG_CLASS_NAME, TAG_CLUSTER, TAG_CONFIGURATION_MANAGER, TAG_CONTENT_TYPE, TAG_CONTEXT, TAG_CONTEXT_MANAGER, TAG_DEFAULT_MODULE_VERSION, TAG_DEFAULTS, TAG_DESCRIPTION, TAG_DISPATCH_ORDER, TAG_DISPATCHER, TAG_EXCLUDE, TAG_EXCLUDE_OPERATIONS, TAG_EXCLUDE_PROPERTIES, TAG_EXPOSE, TAG_EXTRACT_SERVICE_ARCHIVE, TAG_FLOW_IN, TAG_FLOW_IN_FAULT, TAG_FLOW_OUT, TAG_FLOW_OUT_FAULT, TAG_HANDLER, TAG_HOT_DEPLOYMENT, TAG_HOT_UPDATE, TAG_INCLUDE_PROPERTIES, TAG_LABEL, TAG_LIST_ID, TAG_LISTENER, TAG_MAPPING, TAG_MEP, TAG_MESSAGE, TAG_MESSAGE_BUILDER, TAG_MESSAGE_BUILDERS, TAG_MESSAGE_FORMATTER, TAG_MESSAGE_FORMATTERS, TAG_MESSAGE_RECEIVER, TAG_MESSAGE_RECEIVERS, TAG_MODULE, TAG_MODULE_CONFIG, TAG_NAMESPACES, TAG_OBJECT_SUPPLIER, TAG_OPERATION, TAG_ORDER, TAG_PACKAGE_NAME, TAG_PACKAGE2QNAME, TAG_PARAMETER, TAG_PHASE, TAG_PHASE_FIRST, TAG_PHASE_LAST, TAG_PHASE_ORDER, TAG_POLICY, TAG_POLICY_ATTACHMENT, TAG_POLICY_REF, TAG_QNAME, TAG_REFERENCE, TAG_REPLICATION, TAG_SERVICE, TAG_SERVICE_GROUP, TAG_SUPPORTED_POLICY_NAMESPACES, TAG_TARGET_RESOLVER, TAG_TARGET_RESOLVERS, TAG_THREAD_CONTEXT_MIGRATOR, TAG_THREAD_CONTEXT_MIGRATORS, TAG_TRANSPORT, TAG_TRANSPORT_RECEIVER, TAG_TRANSPORT_SENDER, TAG_TRANSPORTS, TAG_TYPE, TARGET_NAME_SPACE
 
Constructor Summary
DescriptionBuilder()
           
DescriptionBuilder(java.io.InputStream serviceInputStream, AxisConfiguration axisConfig)
           
DescriptionBuilder(java.io.InputStream serviceInputStream, ConfigurationContext configCtx)
           
 
Method Summary
 org.apache.axiom.om.OMElement buildOM()
          Creates OMElement for a given description document (axis2.xml , services.xml and module.xml).
protected  java.lang.Class findAndValidateSelectorClass(java.lang.String className, java.lang.String errorMsg)
           
protected  QName[] getLocalPolicyAssertionNames(org.apache.axiom.om.OMElement localPolicyAssertionsElement)
           
static java.lang.String getShortFileName(java.lang.String fileName)
          Gets the short file name.
protected  java.lang.String getValue(java.lang.String in)
          Gets the value of an attribute.
protected  MessageReceiver loadDefaultMessageReceiver(java.lang.String mepURL, AxisService service)
          Loads default message receivers.
protected  MessageReceiver loadMessageReceiver(java.lang.ClassLoader loader, org.apache.axiom.om.OMElement element)
           
protected  void processActionMappings(org.apache.axiom.om.OMElement operation, AxisOperation op_descrip)
          Populate the AxisOperation with details from the actionMapping, outputActionMapping and faultActionMapping elements from the operation element.
protected  Flow processFlow(org.apache.axiom.om.OMElement flowelement, ParameterInclude parent)
          Processes flow elements in services.xml .
protected  HandlerDescription processHandler(org.apache.axiom.om.OMElement handler_element, ParameterInclude parent)
           
protected  HandlerDescription processHandler(org.apache.axiom.om.OMElement handler_element, ParameterInclude parent, java.lang.String containingPhase)
          Processes Handler element.
protected  java.util.HashMap processMessageBuilders(org.apache.axiom.om.OMElement messageBuildersElement)
          Processes the message builders specified in axis2.xml or services.xml.
protected  java.util.HashMap processMessageFormatters(org.apache.axiom.om.OMElement messageFormattersElement)
          Processes the message builders specified in axis2.xml or services.xml.
protected  java.util.HashMap processMessageReceivers(java.lang.ClassLoader loader, org.apache.axiom.om.OMElement element)
          Processes default message receivers specified either in axis2.xml or services.xml.
protected  java.util.HashMap processMessageReceivers(org.apache.axiom.om.OMElement messageReceivers)
          Processes default message receivers specified either in axis2.xml or services.xml.
protected  void processOperationModuleRefs(java.util.Iterator moduleRefs, AxisOperation operation)
           
protected  void processParameters(java.util.Iterator parameters, ParameterInclude parameterInclude, ParameterInclude parent)
          Gets the Parameter object from the OM.
protected  void processPolicyElements(java.util.Iterator policyElements, PolicySubject policySubject)
           
protected  void processPolicyRefElements(java.util.Iterator policyRefElements, PolicySubject policySubject)
           
protected  java.lang.String[] processSupportedPolicyNamespaces(org.apache.axiom.om.OMElement supportedPolicyElements)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configCtx

protected ConfigurationContext configCtx

axisConfig

protected AxisConfiguration axisConfig

descriptionStream

protected java.io.InputStream descriptionStream
Constructor Detail

DescriptionBuilder

public DescriptionBuilder()

DescriptionBuilder

public DescriptionBuilder(java.io.InputStream serviceInputStream,
                          ConfigurationContext configCtx)

DescriptionBuilder

public DescriptionBuilder(java.io.InputStream serviceInputStream,
                          AxisConfiguration axisConfig)
Method Detail

buildOM

public org.apache.axiom.om.OMElement buildOM()
                                      throws javax.xml.stream.XMLStreamException
Creates OMElement for a given description document (axis2.xml , services.xml and module.xml).

Returns:
Returns OMElement .
Throws:
javax.xml.stream.XMLStreamException

loadDefaultMessageReceiver

protected MessageReceiver loadDefaultMessageReceiver(java.lang.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 java.util.HashMap processMessageReceivers(org.apache.axiom.om.OMElement messageReceivers)
                                             throws DeploymentException
Processes default message receivers specified either in axis2.xml or services.xml.

Throws:
DeploymentException

processMessageReceivers

protected java.util.HashMap processMessageReceivers(java.lang.ClassLoader loader,
                                                    org.apache.axiom.om.OMElement element)
                                             throws DeploymentException
Processes default message receivers specified either in axis2.xml or services.xml.

Throws:
DeploymentException

loadMessageReceiver

protected MessageReceiver loadMessageReceiver(java.lang.ClassLoader loader,
                                              org.apache.axiom.om.OMElement element)
                                       throws DeploymentException
Throws:
DeploymentException

processMessageBuilders

protected java.util.HashMap processMessageBuilders(org.apache.axiom.om.OMElement messageBuildersElement)
                                            throws DeploymentException
Processes the message builders specified in axis2.xml or services.xml.

Parameters:
messageBuildersElement -
Throws:
DeploymentException

processMessageFormatters

protected java.util.HashMap processMessageFormatters(org.apache.axiom.om.OMElement messageFormattersElement)
                                              throws DeploymentException
Processes the message builders specified in axis2.xml or services.xml.

Throws:
DeploymentException

findAndValidateSelectorClass

protected java.lang.Class findAndValidateSelectorClass(java.lang.String className,
                                                       java.lang.String errorMsg)
                                                throws java.security.PrivilegedActionException
Throws:
java.security.PrivilegedActionException

processFlow

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

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

processSupportedPolicyNamespaces

protected java.lang.String[] processSupportedPolicyNamespaces(org.apache.axiom.om.OMElement supportedPolicyElements)

getLocalPolicyAssertionNames

protected QName[] getLocalPolicyAssertionNames(org.apache.axiom.om.OMElement localPolicyAssertionsElement)

processHandler

protected HandlerDescription processHandler(org.apache.axiom.om.OMElement handler_element,
                                            ParameterInclude parent)
                                     throws DeploymentException
Throws:
DeploymentException

processHandler

protected HandlerDescription processHandler(org.apache.axiom.om.OMElement handler_element,
                                            ParameterInclude parent,
                                            java.lang.String containingPhase)
                                     throws DeploymentException
Processes Handler element.

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

processOperationModuleRefs

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

processParameters

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

Parameters:
parameters - Parameter
parameterInclude - ParameterInclude
parent - ParameterInclude
Throws:
DeploymentException

processActionMappings

protected void processActionMappings(org.apache.axiom.om.OMElement operation,
                                     AxisOperation op_descrip)
Populate the AxisOperation with details from the actionMapping, outputActionMapping and faultActionMapping elements from the operation element.

Parameters:
operation -
op_descrip -

processPolicyElements

protected void processPolicyElements(java.util.Iterator policyElements,
                                     PolicySubject policySubject)

processPolicyRefElements

protected void processPolicyRefElements(java.util.Iterator policyRefElements,
                                        PolicySubject policySubject)

getShortFileName

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

Parameters:
fileName -
Returns:
Returns String.

getValue

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

Returns:
Returns String.


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