org.idoox.wasp.tools.deployment.deploytool
Interface DeployTool


public interface DeployTool

DeployTool 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 deployment package as a Java archive file (JAR). See the WSO2 SOA Enablement Server documentation to see the structure of the deployment package. The deployment packages can be created by the WaspPackager tool and also the WaspPackager ANT task.

Since:
4.0
Component:
Core-Tools

Method Summary
 Package deploy(java.io.InputStream packageJar, java.lang.String serverURL)
          It deploys the deployment package to the given URL.
 Package deploy(java.io.InputStream packageJar, java.lang.String serverURL, boolean disabled)
          It deploys the deployment package to the given URL.
 Package deploy(java.io.InputStream packageJar, java.lang.String serverURL, java.lang.String context)
          It deploys the deployment package to the given URL.
 Package deploy(java.io.InputStream packageJar, java.lang.String serverURL, java.lang.String context, boolean disabled)
          It deploys the deployment package to the given URL.
 PackageInfo[] getDeployedPackages(java.lang.String serverURL)
          It returns information about deployed packages on the server.
 java.util.jar.JarInputStream getPackageAsJar(Package pack, java.lang.String serverURL)
          It returns the given deployed package as a JarInputStream.
 Package redeploy(java.io.InputStream packageJar, java.lang.String serverURL, java.lang.String context, boolean disabled, boolean force)
          Redeploys given package to the URL with the context.
 void undeploy(java.lang.String serverURL, Package pack)
          It undeploys the given deployed package from the server with the given URL.
 void undeploy(java.lang.String serverURL, Package pack, boolean force)
          It undeploys the given deployed package from the server with the given URL.
 

Method Detail

deploy

public Package deploy(java.io.InputStream packageJar,
                      java.lang.String serverURL)
               throws DeployException
It deploys the deployment package to the given URL. The deployment package is read from the given input stream. The deployed package will be installed on the server in the default context on the server (typically "/").

Parameters:
packageJar - InputStream of the package jar file
serverURL - URL of the server (e.g. "http://localhost:6060")
Returns:
information about the deployed package
Throws:
DeployException - when error during deployment occures

deploy

public Package deploy(java.io.InputStream packageJar,
                      java.lang.String serverURL,
                      java.lang.String context)
               throws DeployException
It deploys the deployment package to the given URL. The deployment package is read from the given input stream. The deployed package will be installed on the server in the given context.

Parameters:
packageJar - InputStream of the package jar file
serverURL - URL of the server (e.g. "http://localhost:6060")
context - context that will be appended to the URL
Returns:
information about the deployed package
Throws:
DeployException - when error during deployment occures

deploy

public Package deploy(java.io.InputStream packageJar,
                      java.lang.String serverURL,
                      boolean disabled)
               throws DeployException
It deploys the deployment package to the given URL. The deployment package is read from the given input stream. The deployed package will be installed on the server in the default context on the server (typically "/").

If the value of the parameter disabled is true, all services in the package will be deployed in the disabled mode.

Parameters:
packageJar - InputStream of the package jar file
serverURL - URL of the server
disabled - deploy all services in the deployment package in the disabled mode
Returns:
information about the deployed package
Throws:
DeployException - When error during deployment occures

deploy

public Package deploy(java.io.InputStream packageJar,
                      java.lang.String serverURL,
                      java.lang.String context,
                      boolean disabled)
               throws DeployException
It deploys the deployment package to the given URL. The deployment package is read from the given input stream. The deployed package will be installed on the server in the given context.
If the value of the parameter disabled is true, all services in the package will be deployed in the disabled mode.

Parameters:
packageJar - InputStream of the package jar file
serverURL - URL of the server (e.g. "http://localhost:6060")
context - context that will be appended to the URL
disabled - deploy all services in the deployment package in the disabled mode
Returns:
information about the deployed package
Throws:
DeployException - When error during deployment occures

undeploy

public void undeploy(java.lang.String serverURL,
                     Package pack)
              throws DeployException
It undeploys the given deployed package from the server with the given URL. If any other deployed package depends on the given package, the DeployException is thrown.

Parameters:
serverURL - URL of the server (e.g. "http://localhost:6060")
pack - deployment package identifier (it collects the target namespace of the package, package name and the context of the deployed package
Throws:
DeployException - if error during undeployment occures. (e.g. at least one other package depends on the package to be undeployed

undeploy

public void undeploy(java.lang.String serverURL,
                     Package pack,
                     boolean force)
              throws DeployException
It undeploys the given deployed package from the server with the given URL. If the value of the force parameter is true, the package will be undeployed even though there could exist other deployment package which depends on the given package.

Parameters:
serverURL - URL of the server (e.g. "http://localhost:6060")
pack - deployment package identifier (it collects the targer namespace of the package, package name and the context of the deployed package.
force - if the value of the parameter is true the package will be undeployed even though there could exist other deployment package which depends on the given package
Throws:
DeployException - If error during undeployment occures. (e.g. at least one other package depends on the package to be undeployed and the value of parameter force is false/pre>

getDeployedPackages

public PackageInfo[] getDeployedPackages(java.lang.String serverURL)
                                  throws DeployException
It returns information about deployed packages on the server.

Parameters:
serverURL - URL of the server (e.g. "http://localhost:6060")
Returns:
Array of structures PackageInfo which gives you details about deployed packages.
Throws:
DeployException - When error during operation occures.

getPackageAsJar

public java.util.jar.JarInputStream getPackageAsJar(Package pack,
                                                    java.lang.String serverURL)
                                             throws DeployException
It returns the given deployed package as a JarInputStream.

Parameters:
pack - deployment package identifier (it collects the target namespace of the package, package name and the context of the deployed package.
serverURL - URL of the server (e.g. "http://localhost:6060")
Returns:
JarInputStream of the requested package.
Throws:
DeployException - if error during operation occures

redeploy

public Package redeploy(java.io.InputStream packageJar,
                        java.lang.String serverURL,
                        java.lang.String context,
                        boolean disabled,
                        boolean force)
                 throws DeployException
Redeploys given package to the URL with the context. It means that if the given package is already installed on the server, it undeploys it first and then it continues with the package deployment. Parameter force has the same meaning in the undeployment phase like in the method undeploy(java.lang.String, org.systinet.wasp.admin.Package).

Parameters:
packageJar - InputStream of the package jar file.
serverURL - URL of the server (e.g. "http://localhost:6060")
context - context that will be appended to the URL.
disabled - deploy all services in the deployment package in the disabled mode
force - If the value of the parameter is true the package will be undeployed even though there could exist other deployment package which depends on the given package.
Returns:
information about the deployed package
Throws:
DeployException - if error during deployment occures