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

java.lang.Object
  extended by org.exoplatform.services.workflow.impl.bonita.WorkflowServiceContainerHelper

public class WorkflowServiceContainerHelper
extends java.lang.Object

Contains helper methods for the Bonita Workflow Service implementation Created by Bull R&D

Author:
Brice Revenant Mar 2, 2006

Constructor Summary
WorkflowServiceContainerHelper()
           
 
Method Summary
static java.lang.String getModelName(java.lang.String instanceName)
          Retrieves the Process Model name from a Process Instance name.
static java.lang.String getProcessName(java.lang.String processId)
           
static java.lang.String objectToString(java.lang.Object value, java.lang.String component)
          Converts an Object to a String.
static java.lang.Object stringToObject(java.lang.String value, java.lang.String component)
          Converts a String to an Object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkflowServiceContainerHelper

public WorkflowServiceContainerHelper()
Method Detail

getProcessName

public static final java.lang.String getProcessName(java.lang.String processId)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

getModelName

public static final java.lang.String getModelName(java.lang.String instanceName)
Retrieves the Process Model name from a Process Instance name. In the past there was a convenient method in BnProject that enabled to retrieve the Model. But it was removed from Bonita for performance reasons. As a consequence, it was decided to retrieve the Project Model in this dedicated helper method.

Parameters:
instanceName - name of the instance whose model is to be retrieved
Returns:
a String corresponding to the Process Model name

stringToObject

public static final java.lang.Object stringToObject(java.lang.String value,
                                                    java.lang.String component)
Converts a String to an Object. Bonita handles Strings by default. This class provides conversion utility methods to make it possible to deal with Objects in eXo. It uses constants defined in UITask. However this class is currently bundled in a portlet and not in a jar file which prevents from importing it in Eclipse. As a consequence, those constants cannot be referenced and their value is used instead.

Parameters:
value - the String to be converted
type - identifies the component in which the value is displayed. It indicates the type of the object to produce. For instance, UITask.DATE indicates that the returned object should be of type Date. It should be one of the constants defined in UITask.
Returns:
an Object representing the specified value

objectToString

public static final java.lang.String objectToString(java.lang.Object value,
                                                    java.lang.String component)
Converts an Object to a String. Bonita handles Strings by default. This class provides conversion utility methods to make it possible to deal with Objects in eXo. It uses constants defined in UITask. However this class is currently bundled in a portlet and not in a jar file which prevents from importing it in Eclipse. As a consequence, those constants cannot be referenced and their value is used instead.

Parameters:
value - the Object to be converted
type - identifies the component in which the value is displayed. It indicates the expected type of the specified value. For instance, UITask.DATE indicates that the value is an Object of type Date. It should be one of the constants defined in UITask.
Returns:
a String representing the specified value


Copyright © 2012 eXo Platform SAS. All Rights Reserved.