org.systinet.wasp.admin
Interface DeployService


public interface DeployService

DeployService interface provides methods for deploying, redeploying and undeploying of the WSO2 SOA Enablement Server deployment packages. Also it provides methods for listing of the deployed packages and obtaining the particular deployement package as a Java archive file (JAR).

Since:
4.0
Component:
Core-Services

Field Summary
static java.lang.String NAMESPACE_PACKAGE_1_0
          Deprecated. use DeploymentDescriptor.NAMESPACE_PACKAGE_1_0 instead
static java.lang.String NAMESPACE_PACKAGE_1_1
          Deprecated. use DeploymentDescriptor.NAMESPACE_PACKAGE_1_1 instead
static java.lang.String NAMESPACE_PACKAGE_LATEST
          Use this constant as an argument of the getPackageDD(Package, MessageAttachment, String) method to obtain the package deployment descriptor wit the latest package namespace the server understands.
 
Method Summary
 Package deployPackage(java.lang.String context, boolean disabled, MessageAttachment jar)
          Deploys package to a given context.
 Package deployPackage(java.lang.String context, java.lang.String classLoader, boolean disabled, MessageAttachment jar)
          Deprecated. Use deployPackage(String,boolean,MessageAttachment) instead.
 PackageInfo findPackage(java.lang.String targetNamespace, java.lang.String name, java.lang.String context)
          Finds and gets info about package.
 PackageInfo[] getAllPackages()
          Gets infos about all deployed packages.
 java.lang.String[] getContexts()
          Gets available existing contexts.
 PackageInfo getPackage(Package pckg)
          Gets info about given installed package or null if package doesn't exist.
 void getPackage(Package pckg, MessageAttachment jar)
          Gets given package as a JAR.
 void getPackageDD(Package pckg, MessageAttachment dd)
          Deprecated. Use getPackageDD(Package, MessageAttachment, String) instead.
 void getPackageDD(Package pckg, MessageAttachment dd, java.lang.String ddNamespace)
          Gets deployment descriptor for given package.
 PackageInfo[] getPackages(java.lang.String context)
          Gets infos about deployed packages in given context or null if context doesn't exist.
 java.lang.String getSystemContext()
          Gets the system context.
 Package redeployPackage(java.lang.String context, boolean disabled, MessageAttachment jar, boolean force)
          Redeploys package to a given context.
 void undeployPackage(Package pckg, boolean force)
          Undeploys package with given name.
 

Field Detail

NAMESPACE_PACKAGE_1_0

public static final java.lang.String NAMESPACE_PACKAGE_1_0
Deprecated. use DeploymentDescriptor.NAMESPACE_PACKAGE_1_0 instead

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:
getPackageDD(Package, MessageAttachment), getPackageDD(Package, MessageAttachment, String), Constant Field Values

NAMESPACE_PACKAGE_1_1

public static final java.lang.String NAMESPACE_PACKAGE_1_1
Deprecated. use DeploymentDescriptor.NAMESPACE_PACKAGE_1_1 instead

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:
getPackageDD(Package, MessageAttachment, String), Constant Field Values

NAMESPACE_PACKAGE_LATEST

public static final java.lang.String NAMESPACE_PACKAGE_LATEST
Use this constant as an argument of the getPackageDD(Package, MessageAttachment, String) method to obtain the package deployment descriptor wit the latest package namespace the server understands.

See Also:
getPackageDD(Package, MessageAttachment, String), Constant Field Values
Method Detail

getContexts

public java.lang.String[] getContexts()
Gets available existing contexts.

Returns:
an array of contexts

getSystemContext

public java.lang.String getSystemContext()
Gets the system context.

Returns:
the system context

getAllPackages

public PackageInfo[] getAllPackages()
Gets infos about all deployed packages.

Returns:
an array of package infos

getPackages

public PackageInfo[] getPackages(java.lang.String context)
Gets infos about deployed packages in given context or null if context doesn't exist.

Parameters:
context - the context
Returns:
an array of package infos

getPackage

public PackageInfo getPackage(Package pckg)
Gets info about given installed package or null if package doesn't exist.

Returns:
an package info

findPackage

public PackageInfo findPackage(java.lang.String targetNamespace,
                               java.lang.String name,
                               java.lang.String context)
Finds and gets info about package. It starts find out package from given context.

Parameters:
targetNamespace - target namespace
name - name
Returns:
an package info

getPackageDD

public void getPackageDD(Package pckg,
                         MessageAttachment dd)
                  throws PackageException
Deprecated. Use getPackageDD(Package, MessageAttachment, String) instead.

Gets deployment descriptor for given package. This method always returns deployment descriptor of version 1.0 .

Parameters:
pckg - given package
dd - a deployment descriptor
Throws:
PackageException - thrown when an error occurs
See Also:
DeploymentDescriptor.NAMESPACE_PACKAGE_1_0

getPackageDD

public void getPackageDD(Package pckg,
                         MessageAttachment dd,
                         java.lang.String ddNamespace)
                  throws PackageException
Gets deployment descriptor for given package. You have to choose deployment descriptor version.

Parameters:
pckg - given package
dd - a deployment descriptor
ddNamespace - current WSO2 SOA Enablement Server supports DeploymentDescriptor.NAMESPACE_PACKAGE_1_0 DeploymentDescriptor.NAMESPACE_PACKAGE_1_1 DeploymentDescriptor.NAMESPACE_PACKAGE_1_2 DeploymentDescriptor.NAMESPACE_PACKAGE_1_3, null value can be used to return the deployment descriptor with DeploymentDescriptor.NAMESPACE_PACKAGE_1_1 namespace, the value NAMESPACE_PACKAGE_LATEST to return the latest namespace the server understands.
Throws:
PackageException - thrown when an error occurs
See Also:
DeploymentDescriptor.NAMESPACE_PACKAGE_1_0, DeploymentDescriptor.NAMESPACE_PACKAGE_1_1, DeploymentDescriptor.NAMESPACE_PACKAGE_1_2, DeploymentDescriptor.NAMESPACE_PACKAGE_1_3, NAMESPACE_PACKAGE_LATEST

deployPackage

public Package deployPackage(java.lang.String context,
                             java.lang.String classLoader,
                             boolean disabled,
                             MessageAttachment jar)
                      throws PackageException
Deprecated. Use deployPackage(String,boolean,MessageAttachment) instead.

Deploys package to a given context. The context name is additional information to namespace from deployment descriptor for the package scope.

Parameters:
context - a context where to install
classLoader - a class loader name or null if a new one should be created for this package
disabled - true to deploy the package as disabled
jar - a given jar stream
Returns:
a package
Throws:
PackageException - thrown when an error occurs

deployPackage

public Package deployPackage(java.lang.String context,
                             boolean disabled,
                             MessageAttachment jar)
                      throws PackageException
Deploys package to a given context. The context name is additional information to namespace from deployment descriptor for the package scope.

Parameters:
context - a context where to install
disabled - true to deploy the package as disabled
jar - a given jar stream
Returns:
a package
Throws:
PackageException - thrown when an error occurs
Since:
4.5

undeployPackage

public void undeployPackage(Package pckg,
                            boolean force)
                     throws PackageException
Undeploys package with given name.

Parameters:
pckg - a package to undeploy
force - wherether undeploys package even thought dependant packages exist
Throws:
PackageException - thrown when an error occurs

redeployPackage

public Package redeployPackage(java.lang.String context,
                               boolean disabled,
                               MessageAttachment jar,
                               boolean force)
                        throws PackageException
Redeploys package to a given context. The context name is additional information to namespace from deployment descriptor for the package scope. If a given package doesn't exist will work as deploy.

Parameters:
context - a context where to install
disabled - true to deploy the package as disabled
jar - a given jar stream
force - wherether undeploys package even thought dependant packages exist
Returns:
a package
Throws:
PackageException - thrown when an error occurs
Since:
4.5

getPackage

public void getPackage(Package pckg,
                       MessageAttachment jar)
                throws PackageException
Gets given package as a JAR.

Parameters:
pckg - a package
jar - a given jar stream
Throws:
PackageException - thrown when an error occurs