org.ow2.bonita.facade
Interface ManagementAPI

All Superinterfaces:
org.ow2.bonita.facade.remote.RemoteManagementAPI

public interface ManagementAPI
extends org.ow2.bonita.facade.remote.RemoteManagementAPI

Workflow process deployment operations. Individual or grouped deployment of objects relating to the process definition: xpdl file, java classDatas for hooks, mappers, performer assignments, ....

Author:
Marc Blachon, Guillaume Porcher, Charles Souillard, Miguel Valdes, Pierre Vigneras
See Also:
TxHook

Method Summary
 void clearHistory()
          Clear the history data (archived data).
 java.util.Map<java.lang.String,ProcessDefinition> deploy(org.ow2.bonita.deployment.Deployment deployment)
          To deploy the XPDL Workflow giving the deployment object containing the XPDL Workflow Package and optionnally its required java classDatas.
 java.util.Map<java.lang.String,ProcessDefinition> deploy(java.net.URL xpdlURL, java.lang.Class<?>[] classes)
          To deploy the XPDL Workflow Package and its required java classDatas giving the URL of the XPDL file and the table of classDatas.
 java.util.Map<java.lang.String,ProcessDefinition> deployBar(byte[] barFile)
          To deploy a package giving the URL of the bar file.
 java.util.Map<java.lang.String,ProcessDefinition> deployBar(java.net.URL barFileURL)
          To deploy an XPDL workflow package giving the URL of archive file (.bar file) containing the XPDL definition file and optionally the classDatas to be deployed.
 void deployClass(byte[] clazz)
          To deploy a class giving its bytes table.
 void deployClasses(java.lang.Class<?>[] classes)
          To deploy several classDatas in global class repository giving a set of classDatas.
 void deployClasses(java.util.Set<byte[]> classes)
          To deploy several classDatas in global class repository giving a set of classDatas.
 void deployClassesInJar(byte[] classesArchive)
          To deploy several classDatas in global class repository giving an archive containing the classDatas.
 java.util.Map<java.lang.String,ProcessDefinition> deployXpdl(java.net.URL xpdlURL)
          To deploy the XPDL Workflow Package giving the URL of the XPDL file.
 java.util.Map<java.lang.String,ProcessDefinition> deployZip(byte[] zipFile)
          To deploy the XPDL Workflow giving the byte table of the zip archive containing the XPDL Workflow Package and optionnally its required java classDatas.
 java.util.Map<java.lang.String,ProcessDefinition> deployZip(java.net.URL zipURL)
          To deploy the XPDL Workflow giving the URL of the zip archive containing the XPDL Workflow Package and optionnally its required java classDatas.
 void removeClass(java.lang.String className)
          To remove a class giving the class name.
 void removeClasses(java.lang.String[] classNames)
          To remove classDatas giving the class names.
 void replaceClass(java.lang.String className, byte[] newClazz)
          Remove the class with the className name.
 void undeploy(PackageDefinitionUUID packageUUID)
          To undeploy a Workflow package giving the package UUID.
 

Method Detail

deployXpdl

java.util.Map<java.lang.String,ProcessDefinition> deployXpdl(java.net.URL xpdlURL)
                                                             throws DeploymentException
To deploy the XPDL Workflow Package giving the URL of the XPDL file.

Specified by:
deployXpdl in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
xpdlURL - the URL of the XPDL file.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
DeploymentException - if deploy error occurred.
BonitaInternalException - if an other exception occurs.

deploy

java.util.Map<java.lang.String,ProcessDefinition> deploy(java.net.URL xpdlURL,
                                                         java.lang.Class<?>[] classes)
                                                         throws DeploymentException
To deploy the XPDL Workflow Package and its required java classDatas giving the URL of the XPDL file and the table of classDatas.
Classes are deployed at package level (not global level repository).

Specified by:
deploy in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
xpdlURL - the URL of the XPDL file.
classDatas - the table of java classDatas.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
DeploymentException - if deploy error occurred.
BonitaInternalException - if an other exception occurs.

deployZip

java.util.Map<java.lang.String,ProcessDefinition> deployZip(java.net.URL zipURL)
                                                            throws DeploymentException
To deploy the XPDL Workflow giving the URL of the zip archive containing the XPDL Workflow Package and optionnally its required java classDatas.
Classes are deployed at package level (not global level repository).

Specified by:
deployZip in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
zipURL - the URL of the zip file.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
DeploymentException - if deploy error occurred.
BonitaInternalException - if an other exception occurs.

deployZip

java.util.Map<java.lang.String,ProcessDefinition> deployZip(byte[] zipFile)
                                                            throws DeploymentException
To deploy the XPDL Workflow giving the byte table of the zip archive containing the XPDL Workflow Package and optionnally its required java classDatas.
Classes are deployed at package level (not global level repository).

Specified by:
deployZip in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
zipFile - the bytes table of the zip file.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
DeploymentException - if deploy error occurred.
BonitaInternalException - if an other exception occurs.

deploy

java.util.Map<java.lang.String,ProcessDefinition> deploy(org.ow2.bonita.deployment.Deployment deployment)
                                                         throws DeploymentException
To deploy the XPDL Workflow giving the deployment object containing the XPDL Workflow Package and optionnally its required java classDatas.
Classes are deployed at package level (not global level repository).

Specified by:
deploy in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
deployment - the deployment object that should contain the xpdl file and the map of required classDatas.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
DeploymentException - if deploy error occurred.
BonitaInternalException - if an exception occurs.

deployBar

java.util.Map<java.lang.String,ProcessDefinition> deployBar(java.net.URL barFileURL)
                                                            throws DeploymentException
To deploy an XPDL workflow package giving the URL of archive file (.bar file) containing the XPDL definition file and optionally the classDatas to be deployed.

Specified by:
deployBar in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
barFileURL - the URL of the bar file.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
java.lang.IllegalArgumentException - if the barFileURL is null parameter.
DeploymentException - if an IO exception is thrown.
BonitaInternalException - if an other exception occurs.

deployBar

java.util.Map<java.lang.String,ProcessDefinition> deployBar(byte[] barFile)
                                                            throws DeploymentException
To deploy a package giving the URL of the bar file.

Specified by:
deployBar in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
barFile - the file of the barfile.
Returns:
a map with ids of deployed processes (as specified by the value of the Id attribute of the WorkflowProcess elements in the xpdl file) as keys and ProcessDefinition objects as values.
Throws:
java.lang.IllegalArgumentException - if the barFile is null parameter.
DeploymentException - if the archive file is not found.
BonitaInternalException - if an other exception occurs.

deployClass

void deployClass(byte[] clazz)
                 throws DeploymentException
To deploy a class giving its bytes table.

Specified by:
deployClass in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
clazz - the bytes table of the class.
Throws:
DeploymentException - if there is already a deployed class with this name.
BonitaInternalException - if an other exception occurs.

deployClasses

void deployClasses(java.util.Set<byte[]> classes)
                   throws DeploymentException
To deploy several classDatas in global class repository giving a set of classDatas.

Specified by:
deployClasses in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
classDatas - a set of classDatas. Each class is represented by a bytes table.
Throws:
java.lang.IllegalArgumentException - if classDatas is null parameter.
DeploymentException - if there is already a deployed class with the name
BonitaInternalException - if an other exception occurs.

deployClasses

void deployClasses(java.lang.Class<?>[] classes)
                   throws DeploymentException
To deploy several classDatas in global class repository giving a set of classDatas.

Specified by:
deployClasses in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
classDatas - a table of Class type.
Throws:
java.lang.IllegalArgumentException - if the classDatas is null parameter.
DeploymentException - if there is already a deployed class with the name
BonitaInternalException - if an other exception occurs.

deployClassesInJar

void deployClassesInJar(byte[] classesArchive)
                        throws DeploymentException
To deploy several classDatas in global class repository giving an archive containing the classDatas.

Specified by:
deployClassesInJar in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
classesArchive - the archive containing the classDatas represented by a bytes table.
Throws:
java.lang.IllegalArgumentException - if the classDatas is null parameter.
DeploymentException - if there is already a deployed class with this name or there's an IOException occurs.
BonitaInternalException - if an other exception occurs.

undeploy

void undeploy(PackageDefinitionUUID packageUUID)
To undeploy a Workflow package giving the package UUID. This operation undeploys also the classDatas that have been deployed within the initial package deployment.

Specified by:
undeploy in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
packageUUID - the package definition UUID. This UUID can be retrieved from any DefinitionRecord (e.g. ProcessDefinition) by calling DefinitionRecord.getPackageDefinitionUUID()
Throws:
java.lang.IllegalStateException - if the given parameter is null
BonitaInternalException - if an exception occurs.

removeClass

void removeClass(java.lang.String className)
                 throws DeploymentException
To remove a class giving the class name.

Specified by:
removeClass in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
className - the name of the class.
Throws:
DeploymentException - if there's no class defined in global class repository with this name or a deployed package is still using this class.
BonitaInternalException - if an other exception occurs.

removeClasses

void removeClasses(java.lang.String[] classNames)
                   throws DeploymentException
To remove classDatas giving the class names.

Specified by:
removeClasses in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
classNames - the class names.
Throws:
DeploymentException - if there's no class defined in global class repository with this name or a package is still using global class.
BonitaInternalException - if an other exception occurs.

replaceClass

void replaceClass(java.lang.String className,
                  byte[] newClazz)
                  throws DeploymentException
Remove the class with the className name. Deploy the new given.

Specified by:
replaceClass in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Parameters:
className - the class name to be replaced.
newClazz - the bytes table of the new class.
Throws:
DeploymentException - if the class to be replaced is not found at global class repository.
BonitaInternalException - if an other exception occurs.

clearHistory

void clearHistory()
Clear the history data (archived data).

Specified by:
clearHistory in interface org.ow2.bonita.facade.remote.RemoteManagementAPI
Throws:
BonitaInternalException - if an other exception occurs.