org.exoplatform.services.workflow.impl.bonita
Class BARFileDefinition

java.lang.Object
  extended by org.exoplatform.services.workflow.impl.bonita.BARFileDefinition
All Implemented Interfaces:
FileDefinition
Direct Known Subclasses:
XPDLFileDefinition

public class BARFileDefinition
extends java.lang.Object
implements FileDefinition

This class maps in memory a deployable Business Process Archive. Among others, it stores array of bytes corresponding to the XPDL definition file, the form definition file (ie forms.xml) and the resource bundles. Created by Bull R&D

Author:
Brice Revenant, Patrick Silani Feb 21, 2005

Field Summary
protected  java.util.Hashtable<java.lang.String,byte[]> entries
          Contains bytes corresponding to the files in the archive
 
Constructor Summary
BARFileDefinition()
           
BARFileDefinition(java.io.InputStream inputStream)
          This constructor builds a file definition based on an Input Stream corresponding to a Business Process Archive.
BARFileDefinition(javax.jcr.Node node)
          This constructor builds a file definition from a Node stored in the JCR representing a Business Process.
 
Method Summary
 void deploy()
           
 java.lang.String getCustomizedView(java.lang.String stateName)
           
 java.util.Hashtable<java.lang.String,byte[]> getEntries()
           
 byte[] getEntry(java.lang.String path)
           
 org.w3c.dom.Element getForm(java.lang.String stateName)
          Retrieves a Form corresponding to a State as a DOM Element
 org.w3c.dom.Element getFormsDefinition()
          Retrieves the whole Form definition as a DOM Element
 java.lang.String getProcessModelName()
           
 java.util.ResourceBundle getResourceBundle(java.lang.String stateName, java.util.Locale locale)
           
 java.lang.String getResourceBundleName(java.lang.String stateName)
          Retrieves the Bundle name of a Form corresponding to a State name
 java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getVariables(java.lang.String stateName)
           
 byte[] getXPDLDefinition()
          Retrieves the XPDL Process definition
 boolean isDelegatedView(java.lang.String stateName)
           
 boolean isFormDefined(java.lang.String stateName)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

entries

protected java.util.Hashtable<java.lang.String,byte[]> entries
Contains bytes corresponding to the files in the archive

Constructor Detail

BARFileDefinition

public BARFileDefinition()

BARFileDefinition

public BARFileDefinition(java.io.InputStream inputStream)
                  throws java.io.IOException
This constructor builds a file definition based on an Input Stream corresponding to a Business Process Archive. It is typically invoked while deploying a new process in eXo.

Parameters:
inputStream - Input Stream corresponding to the process archive
Throws:
java.io.IOException

BARFileDefinition

public BARFileDefinition(javax.jcr.Node node)
This constructor builds a file definition from a Node stored in the JCR representing a Business Process. It is typically invoked after a restart of eXo.

Parameters:
node - stored in the JCR which represents the process model
Method Detail

deploy

public void deploy()
            throws java.lang.Exception
Specified by:
deploy in interface FileDefinition
Throws:
java.lang.Exception

getProcessModelName

public java.lang.String getProcessModelName()
Specified by:
getProcessModelName in interface FileDefinition

getResourceBundle

public java.util.ResourceBundle getResourceBundle(java.lang.String stateName,
                                                  java.util.Locale locale)
Specified by:
getResourceBundle in interface FileDefinition

getCustomizedView

public java.lang.String getCustomizedView(java.lang.String stateName)
Specified by:
getCustomizedView in interface FileDefinition

getEntry

public byte[] getEntry(java.lang.String path)
                throws java.lang.Exception
Specified by:
getEntry in interface FileDefinition
Throws:
java.lang.Exception

getForm

public org.w3c.dom.Element getForm(java.lang.String stateName)
Retrieves a Form corresponding to a State as a DOM Element

Parameters:
stateName - name of the state
Returns:
a DOM Element corresponding to the requested Form

getFormsDefinition

public org.w3c.dom.Element getFormsDefinition()
Retrieves the whole Form definition as a DOM Element

Returns:
a DOM Element corresponding to the Form definition file

getResourceBundleName

public java.lang.String getResourceBundleName(java.lang.String stateName)
Retrieves the Bundle name of a Form corresponding to a State name

Parameters:
stateName - identifies the Form
Returns:
the requested bundle name

getVariables

public java.util.List<java.util.Map<java.lang.String,java.lang.Object>> getVariables(java.lang.String stateName)
Specified by:
getVariables in interface FileDefinition

getXPDLDefinition

public byte[] getXPDLDefinition()
Retrieves the XPDL Process definition

Returns:
the requested item or null if not found

isDelegatedView

public boolean isDelegatedView(java.lang.String stateName)
Specified by:
isDelegatedView in interface FileDefinition

isFormDefined

public boolean isFormDefined(java.lang.String stateName)
Specified by:
isFormDefined in interface FileDefinition

getEntries

public java.util.Hashtable<java.lang.String,byte[]> getEntries()
Specified by:
getEntries in interface FileDefinition


Copyright © 2014 eXo Platform SAS. All Rights Reserved.