org.ow2.bonita.facade
Interface ManagementAPI


public interface ManagementAPI

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

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

Method Summary
 java.util.Map<java.lang.String,ProcessDef> deploy(org.ow2.bonita.deployment.Deployment deployment)
          To deploy the package giving the deployment object.
 java.util.Map<java.lang.String,ProcessDef> deployBar(byte[] barFile)
          To deploy the package giving the file of the bar file.
 java.util.Map<java.lang.String,ProcessDef> deployBar(java.net.URL barFileURL)
          To deploy the package giving the URL of the bar file.
 void deployClass(java.lang.String className, byte[] clazz)
          To deploy a class giving its bytes table.
 void deployClasses(java.util.Map<java.lang.String,byte[]> classes)
          To deploy several classes giving a map of classes.
 void deployClassesInJar(byte[] classesArchive)
          To deploy several classes giving an archive containing the classes.
 void removeClass(java.lang.String className)
          To remove a class giving the class name.
 void removeClasses(java.lang.String[] classNames)
          To remove classes giving the class names.
 void replaceClass(java.lang.String className, byte[] newClazz)
           
 void undeploy(org.ow2.bonita.facade.uuid.PackageDefinitionUUID packageUUID)
          To undeploy a package.
 

Method Detail

deploy

java.util.Map<java.lang.String,ProcessDef> deploy(org.ow2.bonita.deployment.Deployment deployment)
                                                  throws DeploymentException
To deploy the package giving the deployment object.

Parameters:
deployment - the deployment object that should contain the xpdl file and the map of required classes.
Returns:
a map with ids of deployed process (as specified in the xpdl file) as keys and ProcessDef objects as values.
Throws:
DeploymentException
BonitaInternalException - if an exception occurs.

deployBar

java.util.Map<java.lang.String,ProcessDef> deployBar(java.net.URL barFileURL)
                                                     throws DeploymentException
To deploy the package giving the URL of the bar file.

Parameters:
barFileURL - the URL of the bar file.
Returns:
a map with ids of deployed process (as specified in the xpdl file) as keys and ProcessDef objects as values.
Throws:
DeploymentException - if an IO exception is thrown.
BonitaInternalException - if an other exception occurs.

deployBar

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

Parameters:
barFile - the file of the barfile.
Returns:
a map with ids of deployed process (as specified in the xpdl file) as keys and ProcessDef objects as values.
Throws:
DeploymentException - if the archive file is not found.
BonitaInternalException - if an other exception occurs.

deployClass

void deployClass(java.lang.String className,
                 byte[] clazz)
                 throws DeploymentException
To deploy a class giving its bytes table.

Parameters:
className - the name of the class.
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.Map<java.lang.String,byte[]> classes)
                   throws DeploymentException
To deploy several classes giving a map of classes.

Parameters:
classes - a map of key-value where key is the name of the class and value is the bytes table.
Throws:
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 classes giving an archive containing the classes.

Parameters:
classesArchive - the archives containing the classes.
Throws:
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(org.ow2.bonita.facade.uuid.PackageDefinitionUUID packageUUID)
To undeploy a package.

Parameters:
packageUUID - the package definition UUID. This UUID can be retrieved from any DefinitionRecord (e.g. ProcessDef) by calling DefinitionRecord.getPackageDefinitionUUID()
Throws:
BonitaInternalException - if an exception occurs.

removeClass

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

Parameters:
className - the name of the class.
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.

removeClasses

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

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
Throws:
DeploymentException