org.ow2.bonita.facade
Interface DeployerAPI

All Known Implementing Classes:
DeployerAPIImpl

public interface DeployerAPI

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

Method Summary
 org.ow2.bonita.deployment.PackageKey deploy(org.ow2.bonita.deployment.Deployment deployment)
          To deploy the package giving the deployment object.
 org.ow2.bonita.deployment.PackageKey deployBar(byte[] barFile)
          To deploy the package giving the bytes table of the bar file.
 org.ow2.bonita.deployment.PackageKey deployBar(java.io.File barFile)
          To deploy the package giving the file of the bar file.
 org.ow2.bonita.deployment.PackageKey deployBar(java.io.InputStream barFileInputStream)
          To deploy the package giving the input stream of the bar file.
 org.ow2.bonita.deployment.PackageKey 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... className)
          To remove classes giving the class names.
 void undeploy(java.lang.String packageId)
          To undeploy a package.
 

Method Detail

deploy

org.ow2.bonita.deployment.PackageKey deploy(org.ow2.bonita.deployment.Deployment deployment)
To deploy the package giving the deployment object.

Parameters:
deployment - the deployment object that should contain the xpdl file and the map of required.
Returns:
PackageKey the package key.
Throws:
BonitaInternalException - if an exception occurs.

deployBar

org.ow2.bonita.deployment.PackageKey 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:
PackageKey the package key.
Throws:
DeploymentException - if an IO exception is thrown.
BonitaInternalException - if an other exception occurs.

deployBar

org.ow2.bonita.deployment.PackageKey deployBar(java.io.File barFile)
                                               throws DeploymentException
To deploy the package giving the file of the bar file.

Parameters:
barFile - the file of the barfile.
Returns:
PackageKey the package key.
Throws:
DeploymentException - if the archive file is not found.
BonitaInternalException - if an other exception occurs.

deployBar

org.ow2.bonita.deployment.PackageKey deployBar(byte[] barFile)
                                               throws DeploymentException
To deploy the package giving the bytes table of the bar file.

Parameters:
barFile - the bytes table of the bar file.
Returns:
PackageKey the package key.
Throws:
DeploymentException - if either the xpdl file does not exist or is not unique or a malformed URL has occurred.
BonitaInternalException - if an other exception occurs.

deployBar

org.ow2.bonita.deployment.PackageKey deployBar(java.io.InputStream barFileInputStream)
                                               throws DeploymentException
To deploy the package giving the input stream of the bar file.

Parameters:
barFileInputStream - the input stream of the bar file.
Returns:
PackageKey the package key.
Throws:
DeploymentException - if an IO exception is thrown.
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(java.lang.String packageId)
To undeploy a package.

Parameters:
packageId - the package id.
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... className)
                   throws DeploymentException
To remove classes giving the class names.

Parameters:
className - 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.