org.systinet.wasp.dd
Interface DeploymentDescriptor

All Superinterfaces:
ConfigurablePart, DeploymentPart, DocumentablePart, ExtensiblePart

public interface DeploymentDescriptor
extends ConfigurablePart, ExtensiblePart, DocumentablePart

This interface represents the deployment descriptor. It describes contents of a package used for package deployment.

Since:
4.0
Component:
Core

Field Summary
static java.lang.String NAMESPACE_PACKAGE_1_0
          Namespace of package deployment descriptor version 1.0.
static java.lang.String NAMESPACE_PACKAGE_1_1
          Namespace of package deployment descriptor version 1.1.
static java.lang.String NAMESPACE_PACKAGE_1_2
          Namespace of package deployment descriptor version 1.2.
static java.lang.String NAMESPACE_PACKAGE_1_3
          Namespace of package deployment descriptor version 1.3.
 
Method Summary
 Dependency addDependency(QName name, java.lang.String requiredVersion)
          Creates and adds a new Dependency object.
 Export addExport()
          Creates and adds a new Export object.
 FaultSerialization addFaultSerialization(java.lang.String name, java.lang.String serializerClass, java.lang.String deserializerClass)
          Creates and adds a new FaultSerialization object.
 Handler addHandler(java.lang.String name, java.lang.String implClass)
          Creates and adds a new Handler object.
 HeaderProcessor addHeaderProcessor(java.lang.String name, java.lang.String implClass)
          Deprecated. Use Handler instead of (@link HeaderProcessor}, addHandler(String, String) as a replacement.
 Interceptor addInterceptor(java.lang.String name, java.lang.String implClass)
          Creates and adds a new Interceptor object.
 Listener addListener(java.lang.String name, java.lang.String implClass)
          Creates and adds a new Listener object.
 Module addModule(java.lang.String name, java.lang.String implClass)
          Creates and adds a new Module object.
 PolicyAssertion addPolicyAssertion(QName name, java.lang.String implClass)
          Creates and adds a new PolicyAssertion object.
 Processing addProcessing(java.lang.String name)
          Creates and adds a new Processing object.
 Serialization addSerialization(java.lang.String name, java.lang.String serializerClass, java.lang.String deserializerClass)
          Creates and adds a new Serialization object.
 ServiceClient addServiceClient(QName servicePortType, Endpoint serviceURL)
          Creates and adds a new ServiceClientImpl object.
 ServiceEndpoint addServiceEndpoint(java.lang.String name, java.lang.String path, ServiceInstance serviceInstance)
          Creates and adds a new Service object.
 ServiceInstance addServiceInstance(java.lang.String name, java.lang.String implClass)
          Creates and adds a new ServiceInstance object.
 Transport addTransport(java.lang.String name, java.lang.String implClass)
          Creates and adds a new Transport object.
 TypeMapping addTypeMapping(java.lang.String name)
          Creates and adds a new TypeMapping object.
 java.util.List getDependencies()
          Returns a map of all dependencies defined in this deployment descriptor.
 java.util.List getExports()
          Returns a list of all exports defined in this deployment descriptor.
 java.util.Map getFaultSerializations()
          Returns a map of all fault serializations defined in this deployment descriptor.
 java.util.Map getHandlers()
          Returns a list of all handlers.
 java.util.Map getHeaderProcessors()
          Deprecated. Use Handler instead of (@link HeaderProcessor}, getHandlers() as a replacement.
 java.util.Map getInterceptors()
          Returns a map of all interceptors defined in this deployment descriptor.
 Endpoint getLicense()
          Returns the reference to a license document.
 java.util.Map getListeners()
          Returns a map of all Listeners defined in this deployment descriptor.
 java.lang.String getLocation()
          Returns the location of this deployment descriptor/package.
 java.util.Map getModules()
          Returns a map of all named modules defined in this deployment descriptor.
 java.lang.String getName()
          Returns the name of the deployment descriptor.
 java.lang.String getNamespace()
          Returns the namespace of the deployment descriptor according to the version of deserialized deplyment descriptor XML document.
 Packager getPackager()
          Returns the information about the packager.
 java.util.Map getPolicyAssertions()
          Returns a map of all policy assertions defined in this deployment descriptor.
 java.util.Map getProcessings()
          Returns a map of all named processings defined in this deployment descriptor.
 java.util.Map getSerializations()
          Returns a map of all serializations defined in this deployment descriptor.
 java.util.List getServiceClients()
          Returns a map of all named service clients defined in this deployment descriptor.
 java.util.Map getServiceEndpoints()
          Returns a map of all named services defined in this deployment descriptor.
 java.util.Map getServiceInstances()
          Returns a map of all named serviceInstances defined in this deployment descriptor.
 java.lang.String getTargetNamespace()
          Returns the target namespace or "" in case of an empty namespace.
 java.util.Map getTransports()
          Returns a map of all named transports defined in this deployment descriptor.
 java.util.Map getTypeMappings()
          Returns a map of all named type mappings defined in this deployment descriptor.
 Version getVersion()
          Returns the version of the deployment descriptor or null if not known.
 boolean isClientPackage()
          Returns the client flag of the package.
 boolean isLibrary()
          Returns true if the package is a library package, false otherwise.
 void setClientPackage(boolean clientPackage)
          Sets the client flag of the package.
 void setLibrary(boolean library)
          Sets the library flag of the package.
 void setLicense(Endpoint endpoint)
          Sets the reference to a license document.
 void setLocation(java.lang.String location)
          Sets the location of this deployment descriptor/package.
 void setName(java.lang.String name)
          Sets the name of the deployment descriptor.
 Packager setPackager(java.lang.String name)
          Creates object containing the information about the packager.
 void setTargetNamespace(java.lang.String targetNamespace)
          Sets the target namespace.
 Version setVersion(java.lang.String version)
          Sets the version of the deployment descriptor.
 
Methods inherited from interface org.systinet.wasp.dd.ConfigurablePart
getConfiguration
 
Methods inherited from interface org.systinet.wasp.dd.DeploymentPart
getDeploymentDescriptor
 
Methods inherited from interface org.systinet.wasp.dd.ExtensiblePart
addElement, getElements
 
Methods inherited from interface org.systinet.wasp.dd.DocumentablePart
getDocumentation, setDocumentation
 

Field Detail

NAMESPACE_PACKAGE_1_0

public static final java.lang.String NAMESPACE_PACKAGE_1_0
Namespace of package deployment descriptor version 1.0. Its value is http://systinet.com/wasp/package/1.0. This version of deployment descriptor is supported by WASP 4.0 and newer.

See Also:
getNamespace(), Constant Field Values

NAMESPACE_PACKAGE_1_1

public static final java.lang.String NAMESPACE_PACKAGE_1_1
Namespace of package deployment descriptor version 1.1. Its value is http://systinet.com/wasp/package/1.1. This version of deployment descriptor is supported by WASP 4.5 and newer.

See Also:
getNamespace(), Constant Field Values

NAMESPACE_PACKAGE_1_2

public static final java.lang.String NAMESPACE_PACKAGE_1_2
Namespace of package deployment descriptor version 1.2. Its value is http://systinet.com/wasp/package/1.2. This version of deployment descriptor is supported by WASP 4.6 and newer.

See Also:
getNamespace(), Constant Field Values

NAMESPACE_PACKAGE_1_3

public static final java.lang.String NAMESPACE_PACKAGE_1_3
Namespace of package deployment descriptor version 1.3. Its value is http://systinet.com/wasp/package/1.3. This version of deployment descriptor is supported by WSO2 SOA Enablement Server 5.0 and newer.

See Also:
getNamespace(), Constant Field Values
Method Detail

getNamespace

public java.lang.String getNamespace()
Returns the namespace of the deployment descriptor according to the version of deserialized deplyment descriptor XML document.

Returns:
the namespace, one of NAMESPACE_PACKAGE_1_0, NAMESPACE_PACKAGE_1_1, NAMESPACE_PACKAGE_1_2 and NAMESPACE_PACKAGE_1_3.

getTargetNamespace

public java.lang.String getTargetNamespace()
Returns the target namespace or "" in case of an empty namespace.

Returns:
the target namespace

setTargetNamespace

public void setTargetNamespace(java.lang.String targetNamespace)
Sets the target namespace.

Parameters:
targetNamespace - the target namespace or "" in case of an empty namespace. null is handled as "".

getName

public java.lang.String getName()
Returns the name of the deployment descriptor.

Returns:
returns the name of the deployment descriptor or "" if name has not been set yet.

setName

public void setName(java.lang.String name)
Sets the name of the deployment descriptor.

Parameters:
name - the name, it's length must be greater than 0.

getVersion

public Version getVersion()
Returns the version of the deployment descriptor or null if not known.

Returns:
the version of the deployment descriptor

setVersion

public Version setVersion(java.lang.String version)
Sets the version of the deployment descriptor.

Parameters:
version - the version being set, MUST NOT be null.
Returns:
newly created Version object

isLibrary

public boolean isLibrary()
Returns true if the package is a library package, false otherwise.

Returns:
true if the package is a library package, false otherwise

setLibrary

public void setLibrary(boolean library)
Sets the library flag of the package.

Parameters:
library - the library flag of the package

isClientPackage

public boolean isClientPackage()
Returns the client flag of the package.

Returns:
true if the package is a client one

setClientPackage

public void setClientPackage(boolean clientPackage)
Sets the client flag of the package.

Parameters:
clientPackage - true if the package is a client one

addInterceptor

public Interceptor addInterceptor(java.lang.String name,
                                  java.lang.String implClass)
                           throws DuplicatedNameException
Creates and adds a new Interceptor object.

Parameters:
name - the local part of the QName of the interceptor to be added
implClass - the implementation class
Returns:
the newly created Interceptor object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getInterceptors

public java.util.Map getInterceptors()
Returns a map of all interceptors defined in this deployment descriptor.

Returns:
non-null map of all interceptors. Key is the local part of the QName of the interceptor, value is Interceptor object reference.

addDependency

public Dependency addDependency(QName name,
                                java.lang.String requiredVersion)
                         throws DuplicatedNameException
Creates and adds a new Dependency object.

Parameters:
name - the QName of the dependency to be added
requiredVersion - the required version of the deployment descriptor.
Returns:
the newly created Dependency object
Throws:
DuplicatedNameException
See Also:
Dependency.getReferredName(), Dependency.setRequiredVersion(java.lang.String)

getDependencies

public java.util.List getDependencies()
Returns a map of all dependencies defined in this deployment descriptor.

Returns:
list of all dependencies

getPackager

public Packager getPackager()
Returns the information about the packager.

Returns:
information about the packager

setPackager

public Packager setPackager(java.lang.String name)
Creates object containing the information about the packager.

Parameters:
name - name of the packager, use null to clear the packager
Returns:
newly created Packager object or null
See Also:
Packager.setName(java.lang.String)

getLicense

public Endpoint getLicense()
Returns the reference to a license document.

Returns:
the reference to a license document

setLicense

public void setLicense(Endpoint endpoint)
Sets the reference to a license document.

Parameters:
endpoint - non-null endpoint of the license document

getLocation

public java.lang.String getLocation()
Returns the location of this deployment descriptor/package.

Returns:
the location of the deployment descriptor/package

setLocation

public void setLocation(java.lang.String location)
                 throws java.lang.IllegalStateException
Sets the location of this deployment descriptor/package.

Parameters:
location - the location of this deployment descriptor/package
Throws:
java.lang.IllegalStateException - when trying to set location of deployment descriptor/package not created from scratch (i.e. read from a file)

addSerialization

public Serialization addSerialization(java.lang.String name,
                                      java.lang.String serializerClass,
                                      java.lang.String deserializerClass)
                               throws DuplicatedNameException
Creates and adds a new Serialization object.

Parameters:
name - the local part of the QName of the serialization to be added
serializerClass - the implementation class of the serializer
deserializerClass - the implementation class of the deserializer
Returns:
the newly created Serialization object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), Serialization.setSerializerClass(java.lang.String), Serialization.setDeserializerClass(java.lang.String)

getSerializations

public java.util.Map getSerializations()
Returns a map of all serializations defined in this deployment descriptor.

Returns:
non-null map of all serializations. Key is the local part of the QName of the serialization, value is a Serialization object reference.

addFaultSerialization

public FaultSerialization addFaultSerialization(java.lang.String name,
                                                java.lang.String serializerClass,
                                                java.lang.String deserializerClass)
                                         throws DuplicatedNameException
Creates and adds a new FaultSerialization object.

Parameters:
name - the local part of the QName of the fault serialization to be added
serializerClass - the implementation class of the serializer
deserializerClass - the implementation class of the deserializer
Returns:
the newly created FaultSerialization object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), FaultSerialization.setSerializerClass(java.lang.String), FaultSerialization.setDeserializerClass(java.lang.String)

getFaultSerializations

public java.util.Map getFaultSerializations()
Returns a map of all fault serializations defined in this deployment descriptor.

Returns:
non-null map of all fault serializations. Key is the local part of the QName of the fault serialization, value is a FaultSerialization object reference.

addProcessing

public Processing addProcessing(java.lang.String name)
                         throws DuplicatedNameException
Creates and adds a new Processing object.

Parameters:
name - the local part of the QName of the processing to be added
Returns:
the newly created Processing object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String)

getProcessings

public java.util.Map getProcessings()
Returns a map of all named processings defined in this deployment descriptor.

Returns:
the non-null map of all processings. Key is the local part of the QName of the processing, value is a Processing object reference.

addServiceEndpoint

public ServiceEndpoint addServiceEndpoint(java.lang.String name,
                                          java.lang.String path,
                                          ServiceInstance serviceInstance)
                                   throws DuplicatedNameException
Creates and adds a new Service object.

Parameters:
name - the local part of the QName of the service to be added
path - endpoint of the service
serviceInstance - reference to an existing ServiceInstance object
Returns:
the newly created ServiceEndpointImpl object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ServiceEndpoint.setPath(java.lang.String), ServiceEndpoint.setServiceInstance(org.systinet.wasp.dd.ServiceInstance)

getServiceEndpoints

public java.util.Map getServiceEndpoints()
Returns a map of all named services defined in this deployment descriptor.

Returns:
non-null map of all service endpoints. Key is the local part of the QName of the service, value is a ServiceEndpointImpl object reference.

addHeaderProcessor

public HeaderProcessor addHeaderProcessor(java.lang.String name,
                                          java.lang.String implClass)
                                   throws DuplicatedNameException
Deprecated. Use Handler instead of (@link HeaderProcessor}, addHandler(String, String) as a replacement.

Creates and adds a new HeaderProcessor object.

Parameters:
name - the local part of the QName of the header processor to be added
implClass - the implementation class
Returns:
the newly created HeaderProcessor object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getHeaderProcessors

public java.util.Map getHeaderProcessors()
Deprecated. Use Handler instead of (@link HeaderProcessor}, getHandlers() as a replacement.

Returns a map of all named header processors defined in this deployment descriptor

Returns:
non-null map of all header processors. Key is the local part of the QName of the header processor, value is a HeaderProcessor object reference.

addHandler

public Handler addHandler(java.lang.String name,
                          java.lang.String implClass)
                   throws DuplicatedNameException
Creates and adds a new Handler object.

Parameters:
name - the local part of the QName of the header processor to be added
implClass - the implementation class
Returns:
the newly created Handler object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getHandlers

public java.util.Map getHandlers()
Returns a list of all handlers.

Returns:
the list of all handlers

addExport

public Export addExport()
Creates and adds a new Export object.

Returns:
the newly created Export object

getExports

public java.util.List getExports()
Returns a list of all exports defined in this deployment descriptor.

Returns:
the list of all exports. Elements are Export object references.

addTransport

public Transport addTransport(java.lang.String name,
                              java.lang.String implClass)
                       throws DuplicatedNameException
Creates and adds a new Transport object.

Parameters:
name - the local part of the QName of the transport to be added
implClass - the implementation class
Returns:
the newly created Transport object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getTransports

public java.util.Map getTransports()
Returns a map of all named transports defined in this deployment descriptor.

Returns:
non-null map of all transports. Key is the local part of the QName of the transport, value is a Transport object reference.

addModule

public Module addModule(java.lang.String name,
                        java.lang.String implClass)
                 throws DuplicatedNameException
Creates and adds a new Module object.

Parameters:
name - the local part of the QName of the module to be added
implClass - the implementation class
Returns:
the newly created Module object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getModules

public java.util.Map getModules()
Returns a map of all named modules defined in this deployment descriptor.

Returns:
non-null map of all modules. Key is the local part of the QName of the module, value is a Module object reference.

addServiceInstance

public ServiceInstance addServiceInstance(java.lang.String name,
                                          java.lang.String implClass)
                                   throws DuplicatedNameException
Creates and adds a new ServiceInstance object.

Parameters:
name - the local part of the QName of the service instance to be added
implClass - the implementation class
Returns:
the newly created ServiceInstance object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getServiceInstances

public java.util.Map getServiceInstances()
Returns a map of all named serviceInstances defined in this deployment descriptor.

Returns:
non-null map of all service instances. Key is the local part of the QName of the service instance, value is ServiceInstance object reference.

addServiceClient

public ServiceClient addServiceClient(QName servicePortType,
                                      Endpoint serviceURL)
Creates and adds a new ServiceClientImpl object.

Parameters:
servicePortType - service port type
serviceURL - service endpoint
Returns:
the newly created ServiceClientImpl object
See Also:
ServiceClient.setServicePortType(javax.xml.namespace.QName), ServiceClient.setServiceURL(org.idoox.transport.client.Endpoint)

getServiceClients

public java.util.List getServiceClients()
Returns a map of all named service clients defined in this deployment descriptor.

Returns:
non-null list of all service clients, elements are ServiceClientImpl object references.

addTypeMapping

public TypeMapping addTypeMapping(java.lang.String name)
                           throws DuplicatedNameException
Creates and adds a new TypeMapping object.

Parameters:
name - the local part of the QName of the type mapping to be added
Returns:
the newly created TypeMapping object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String)

getTypeMappings

public java.util.Map getTypeMappings()
Returns a map of all named type mappings defined in this deployment descriptor.

Returns:
non-null map of all type mappings. Key is the local part of the QName of the type mapping, value is a TypeMapping object reference.

addListener

public Listener addListener(java.lang.String name,
                            java.lang.String implClass)
                     throws DuplicatedNameException
Creates and adds a new Listener object.

Parameters:
name - the local part of the QName of the listener to be added
implClass - the implementation class
Returns:
the newly created Listener object
Throws:
DuplicatedNameException
See Also:
NamedPart.setName(java.lang.String), ImplementablePart.setImplementationClass(java.lang.String)

getListeners

public java.util.Map getListeners()
Returns a map of all Listeners defined in this deployment descriptor.

Returns:
non-null map of all listeners. Key is the local part of the QName of the listener, value is Listener object reference.

addPolicyAssertion

public PolicyAssertion addPolicyAssertion(QName name,
                                          java.lang.String implClass)
                                   throws DuplicatedNameException
Creates and adds a new PolicyAssertion object.

Parameters:
name - the QName of the policy assertion to be added
implClass - the implementation class
Returns:
the newly created PolicyAssertion object
Throws:
DuplicatedNameException

getPolicyAssertions

public java.util.Map getPolicyAssertions()
Returns a map of all policy assertions defined in this deployment descriptor.

Returns:
non-null map of all assertions. Key is the QName of the assertion, value is PolicyAssertion object reference.