com.silverpeas.workflowdesigner.control
Class WorkflowDesignerSessionController

java.lang.Object
  extended by com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
      extended by com.silverpeas.workflowdesigner.control.WorkflowDesignerSessionController
All Implemented Interfaces:
ComponentSessionController

public class WorkflowDesignerSessionController
extends AbstractComponentSessionController


Field Summary
static String ACTIONS
           
static String ACTIVITIES
           
static String ALLOWED_USERS
           
static String CONSEQUENCES
           
static String DATA_FOLDER
           
static String DESCRIPTIONS
           
static String FORM_TYPE_ACTION
           
static String FORM_TYPE_PRESENTATION
           
static String FORM_TYPE_PRINT
           
static String FORMS
           
static String INPUTS
           
static String INTERESTED_USERS
           
static String LABELS
           
static String NEW_ELEMENT_NAME
           
static String NOTIFIED_USERS
           
static String PARAMETERS
           
static String PARTICIPANTS
           
static String PRESENTATION
           
static String RELATED_USER
           
static String ROLES
           
static String STATES
           
static String TITLES
           
static String TYPE_USER
           
static String USER_INFOS
           
static String WORKING_USERS
           
 
Fields inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
CHARACTER_ENCODING, context
 
Constructor Summary
WorkflowDesignerSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
          Standard Session Controller Constructeur
 
Method Summary
 Columns addColumns()
          Create a new columns object to be added to the model
 void clearCache()
           
 Action createAction()
          Create a new action object to be added to the model
 ContextualDesignation createDesignation()
          Create a new ContextualDesignation object to be added to the model
 Form createForm()
          Create a new form object to be added to the model
 Item createItem(String strContext)
          Create a new item object to be added to the model
 Participant createParticipant()
          Create a new participant object to be added to the model
 ProcessModel createProcessModel()
          Create a new ProcessModel descriptor that is not yet saved in a XML file.
 Role createRole()
          Create a new role object to be added to the model
 State createState()
          Create a new state object to be added to the model
 void deleteColumns(String strRoleName)
          Removes the 'columns' object specified by the role name
 Action findAction(String strContext)
          Get the Action specified by the context
 Consequence findConsequence(String strContext)
          Find the Consequence specified by the context
 ContextualDesignation findContextualDesignation(String strContext, String strRole, String strLanguage)
          Finds the contextual designation with the given attributes in the specified context
 Form findForm(String strContext)
          Find the form by context
 Input findInput(String strContext)
          Find the input by context
 Item findItem(String strContext)
          Find the Item specified by the context
 QualifiedUsers findQualifiedUsers(String strContext)
          Find the QualifiedUsers specified by the context
 RelatedUser findRelatedUser(String strContext, String strParticipant, String strFolderItem, String strRelation, String strRole)
          Find a related user corresponding to the criteria given
 void generateComponentDescriptor()
          Generates component descriptor file in the appropriate directory, stores the new descriptor's name to be able to access it later
 String getComponentDescriptorName()
          The name of the component descriptor that references this process model definition
 String getProcessFileName()
          The relative path and file name of the currently loaded model or null if none.
 ProcessModel getProcessModel()
          An object implementing the ProcessModel interface containing the currently loaded model or null if none.
 Boolean isNewProcessModel()
          Is it a new Process Model that has not yet been saved to a file?
 List<String> listProcessModels()
          Get the list of all process models available for edition
 ProcessModel loadProcessModel(String strProcessFileName)
          Load the process model from the specified file, cache it before returning.
 void moveConsequence(String strContext, int iConsequence, int nDirection)
          Move the consequence specified by the context inside the collection
 void removeAction(String strActionName)
          Remove the action specified
 void removeConsequence(String strContext)
          Remove the consequence specified by the context
 void removeContextualDesignation(String strContext, ContextualDesignation contextualDesignation)
          Removes the contextual designation with the attributes as the reference object in the specified context
 void removeForm(String strContext)
          Remove the form described by the context
 void removeInput(String strContext)
          Remove the input specified by the context
 void removeItem(String strContext)
          Remove the item described by the context
 void removeParameter(String strContext, String strName)
          Remove the parameter described by the context and name
 void removeParticipant(String strParticipantName)
          Remove the participant specified
 void removeProcessModel(String strProcessModelFileName)
          Removes the process model descriptor file from the filesystem
 void removeRelatedUser(RelatedUser reference, String strContext)
          Remove the related user specified
 void removeRole(String strRoleName)
          Remove the role specified
 void removeState(String strStateName)
          Remove the state specified
static String replaceSpecialChars(String toParse)
           
 String[] retrieveActionKindCodes()
          Returns the action kind codes as configured in the properties retrieve
 String[] retrieveActionNames(boolean fNone)
          Produce a list of action names
 String[] retrieveFolderItemNames(boolean fNone, boolean fUsersOnly)
          Produce a list of data folder item names, optionally those where the type = 'user'
 List<Item> retrieveFolderItems()
           
 String[] retrieveFormNames(boolean fNone)
          Produce a list of form names, only forms other than 'presentationForm' and 'printForm'
 String[] retrieveItemTypeCodes(boolean fNone)
          Returns the item type codes as configured in the properties
 String[] retrieveLanguageCodes(boolean fDefault)
          Returns the language codes as configured in the properties
 String[] retrieveLanguageNames(boolean fDefault)
          Returns names of available languages as configured in the properties, localised for the current user
 String[] retrieveOperators(boolean fNone)
          Returns a list of comparison operators as configured in the properties,
 String[] retrieveParticipantNames(boolean fNone)
          Produce a list of participant names
 String[] retrieveRoleNames(boolean fNone, boolean fDefault)
          Produce a list of role names
 String[] retrieveStateNames(boolean fNone)
          Produce a list of state names
 Map<String,List<String>> retrieveTypesAndDisplayers()
           
 String[] retrieveUserInfoItemNames(boolean fNone, boolean fUsersOnly)
          Produce a list of user info item names, optionally those where the type = 'user'
 void saveProcessModel(String strProcessModelFileName)
          Save the currently cached process model in a XML file
 void setQualifiedUsers(QualifiedUsers qualifiedUsers, String strContext)
          Set the QualifiedUsers specified by the context to the given value
 void updateAction(Action source, String strNameOriginal)
          Update or insert a new action element of the cached process model
 void updateColumns(Columns source, String strRoleOriginal)
          Update or insert a new columns section of the presentation element of the cached process model
 void updateConsequence(Consequence source, String strContext)
          Update or insert a new consequence element of the cached process model
 void updateContextualDesignations(String strContext, ContextualDesignation source, String strLangOriginal, String strRoleOriginal)
          Update or insert a new ContextualDesignation element of the cached process model
 void updateForm(Form source, String strContext, String strNameOriginal, String strRoleOriginal)
          Update Form referenced by the context.
 void updateInput(Input source, String strContext)
          Update or insert a new input element of the cached process model
 void updateItem(Item source, String strContext, String strNameOriginal)
          Update Item referenced by the context.
 void updateParameter(Parameter source, String strContext, String strNameOriginal)
          Update Parameter referenced by the context and parameter name.
 void updateParticipant(Participant source, String strNameOriginal)
          Update or insert a new participant element of the cached process model
 void updateProcessModelHeader(ProcessModel processModel)
          Update the header of the cached process model
 void updateQualifiedUsers(QualifiedUsers source, String strContext)
          Update Qualified Users referenced by the context, create the object if it was null before.
 void updateRelatedUser(RelatedUser source, String strContext, String strParticipantOriginal, String strFolderItemOriginal, String strRelationOriginal, String strRoleOriginal)
          Update a related user corresponding to the criteria given
 void updateRole(Role source, String strNameOriginal)
          Update or insert a new role element of the cached process model
 void updateState(State source, String strNameOriginal)
          Update or insert a new state element of the cached process model
 void uploadProcessModel(org.apache.commons.fileupload.FileItem model)
          Upload given process model in workflow repository.
 
Methods inherited from class com.stratelia.silverpeas.peasCore.AbstractComponentSessionController
addClipboardSelection, clipboardPasteDone, close, getAlertUser, getClipboardCount, getClipboardErrorMessage, getClipboardExceptionError, getClipboardName, getClipboardObjects, getClipboardSelectedObjects, getClipboardSize, getComponentAccessController, getComponentId, getComponentLabel, getComponentName, getComponentParameters, getComponentParameterValue, getComponentParameterValue, getComponentRootName, getComponentUrl, getFavoriteSpace, getGenericPanel, getHighestSilverpeasUserRole, getIcon, getLanguage, getLastResults, getLook, getMultilang, getOrganisationController, getPersonalization, getRSSUrl, getSelection, getServerNameAndPort, getSettings, getSilverpeasUserRoles, getSpaceId, getSpaceLabel, getString, getSubscriptionContext, getUrlEncodedParameter, getUserAccessLevel, getUserAvailComponentIds, getUserAvailSpaceIds, getUserDetail, getUserDetail, getUserId, getUserManageableGroupIds, getUserManageableSpaceIds, getUserRoleLevel, getUserRoles, isAppInMaintenance, isGroupManager, isPasswordChangeAllowed, isSpaceInMaintenance, removeClipboardElement, setAppModeMaintenance, setClipboardError, setClipboardSelectedElement, setComponentRootName, setFavoriteSpaceToMainSessionController, setGenericPanel, setIconFileName, setLastResults, setMultilangFileName, setResourceFileName, setSpaceModeMaintenance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TYPE_USER

public static final String TYPE_USER
See Also:
Constant Field Values

FORMS

public static final String FORMS
See Also:
Constant Field Values

DATA_FOLDER

public static final String DATA_FOLDER
See Also:
Constant Field Values

USER_INFOS

public static final String USER_INFOS
See Also:
Constant Field Values

ACTIONS

public static final String ACTIONS
See Also:
Constant Field Values

INPUTS

public static final String INPUTS
See Also:
Constant Field Values

STATES

public static final String STATES
See Also:
Constant Field Values

PARAMETERS

public static final String PARAMETERS
See Also:
Constant Field Values

PARTICIPANTS

public static final String PARTICIPANTS
See Also:
Constant Field Values

PRESENTATION

public static final String PRESENTATION
See Also:
Constant Field Values

ROLES

public static final String ROLES
See Also:
Constant Field Values

RELATED_USER

public static final String RELATED_USER
See Also:
Constant Field Values

WORKING_USERS

public static final String WORKING_USERS
See Also:
Constant Field Values

INTERESTED_USERS

public static final String INTERESTED_USERS
See Also:
Constant Field Values

NOTIFIED_USERS

public static final String NOTIFIED_USERS
See Also:
Constant Field Values

ALLOWED_USERS

public static final String ALLOWED_USERS
See Also:
Constant Field Values

CONSEQUENCES

public static final String CONSEQUENCES
See Also:
Constant Field Values

FORM_TYPE_PRESENTATION

public static final String FORM_TYPE_PRESENTATION
See Also:
Constant Field Values

FORM_TYPE_PRINT

public static final String FORM_TYPE_PRINT
See Also:
Constant Field Values

FORM_TYPE_ACTION

public static final String FORM_TYPE_ACTION
See Also:
Constant Field Values

NEW_ELEMENT_NAME

public static final String NEW_ELEMENT_NAME
See Also:
Constant Field Values

TITLES

public static final String TITLES
See Also:
Constant Field Values

ACTIVITIES

public static final String ACTIVITIES
See Also:
Constant Field Values

DESCRIPTIONS

public static final String DESCRIPTIONS
See Also:
Constant Field Values

LABELS

public static final String LABELS
See Also:
Constant Field Values
Constructor Detail

WorkflowDesignerSessionController

public WorkflowDesignerSessionController(MainSessionController mainSessionCtrl,
                                         ComponentContext componentContext)
Standard Session Controller Constructeur

Parameters:
mainSessionCtrl - The user's profile
componentContext - The component's profile
See Also:
Method Detail

listProcessModels

public List<String> listProcessModels()
                               throws WorkflowDesignerException
Get the list of all process models available for edition

Returns:
A list of Strings containing relative paths to process model file names.
Throws:
WorkflowDesignerException

createProcessModel

public ProcessModel createProcessModel()
                                throws WorkflowDesignerException
Create a new ProcessModel descriptor that is not yet saved in a XML file.

Returns:
ProcessModel object
Throws:
WorkflowDesignerException

loadProcessModel

public ProcessModel loadProcessModel(String strProcessFileName)
                              throws WorkflowDesignerException
Load the process model from the specified file, cache it before returning.

Parameters:
strProcessFileName - relative path and the file name
Returns:
An object implementing the ProcessModel interface
Throws:
WorkflowDesignerException

saveProcessModel

public void saveProcessModel(String strProcessModelFileName)
                      throws WorkflowDesignerException
Save the currently cached process model in a XML file

Parameters:
strProcessModelFileName - the relative path and the name of the file
Throws:
WorkflowDesignerException - when the saving goes wrong...

removeProcessModel

public void removeProcessModel(String strProcessModelFileName)
                        throws WorkflowDesignerException
Removes the process model descriptor file from the filesystem

Parameters:
strProcessModelFileName - the relative path to the process file name
Throws:
WorkflowDesignerException - when something goes wrong

getProcessModel

public ProcessModel getProcessModel()
An object implementing the ProcessModel interface containing the currently loaded model or null if none.


isNewProcessModel

public Boolean isNewProcessModel()
Is it a new Process Model that has not yet been saved to a file?


getProcessFileName

public String getProcessFileName()
The relative path and file name of the currently loaded model or null if none.


getComponentDescriptorName

public String getComponentDescriptorName()
The name of the component descriptor that references this process model definition

Returns:
the component descriptor file name (without .xml) or null if no components reference this process model.

updateProcessModelHeader

public void updateProcessModelHeader(ProcessModel processModel)
Update the header of the cached process model

Parameters:
processModel - the reference object

addColumns

public Columns addColumns()
Create a new columns object to be added to the model

Returns:
an object implementing Columns

updateColumns

public void updateColumns(Columns source,
                          String strRoleOriginal)
                   throws WorkflowDesignerException
Update or insert a new columns section of the presentation element of the cached process model

Parameters:
source - the reference object
Throws:
WorkflowDesignerException

deleteColumns

public void deleteColumns(String strRoleName)
                   throws WorkflowDesignerException
Removes the 'columns' object specified by the role name

Parameters:
strRoleName - the value of the role attribute
Throws:
WorkflowDesignerException - when something goes wrong

createRole

public Role createRole()
Create a new role object to be added to the model

Returns:
an object implementing Role

updateRole

public void updateRole(Role source,
                       String strNameOriginal)
                throws WorkflowDesignerException
Update or insert a new role element of the cached process model

Parameters:
source - the data carrier object
strNameOriginal - the original name of the object
Throws:
WorkflowDesignerException - if another object with the same name already exists

removeRole

public void removeRole(String strRoleName)
                throws WorkflowDesignerException
Remove the role specified

Parameters:
strRoleName - the name of the role
Throws:
WorkflowDesignerException - if the role cannot be found or is referenced elsewhere.

createParticipant

public Participant createParticipant()
Create a new participant object to be added to the model

Returns:
an object implementing Participant

updateParticipant

public void updateParticipant(Participant source,
                              String strNameOriginal)
                       throws WorkflowDesignerException
Update or insert a new participant element of the cached process model

Parameters:
source - the reference object
Throws:
WorkflowDesignerException

removeParticipant

public void removeParticipant(String strParticipantName)
                       throws WorkflowDesignerException
Remove the participant specified

Parameters:
strParticipantName - the name of the participant
Throws:
WorkflowDesignerException - if the participant cannot be found or is referenced elsewhere.

createState

public State createState()
Create a new state object to be added to the model

Returns:
an object implementing State

updateState

public void updateState(State source,
                        String strNameOriginal)
                 throws WorkflowDesignerException
Update or insert a new state element of the cached process model

Parameters:
source - the reference object
Throws:
WorkflowDesignerException

removeState

public void removeState(String strStateName)
                 throws WorkflowDesignerException
Remove the state specified

Parameters:
strStateName - the name of the state
Throws:
WorkflowDesignerException - if the state cannot be found or is referenced elsewhere.

updateQualifiedUsers

public void updateQualifiedUsers(QualifiedUsers source,
                                 String strContext)
                          throws WorkflowException,
                                 WorkflowDesignerException
Update Qualified Users referenced by the context, create the object if it was null before.

Parameters:
source - the new Qualified Users
strContext - the context of the QualifiedUsers being updated
Throws:
WorkflowException - when the update goes wrong
WorkflowDesignerException - when the update goes wrong

findRelatedUser

public RelatedUser findRelatedUser(String strContext,
                                   String strParticipant,
                                   String strFolderItem,
                                   String strRelation,
                                   String strRole)
                            throws WorkflowException
Find a related user corresponding to the criteria given

Parameters:
strContext - the context
strParticipant - the name of the participant, may be null
strFolderItem - the name of the data folder item, may be null
strRelation - the relation, may be null
strRole - the name of the role, may be null
Returns:
an object implementing RelatedUser
Throws:
WorkflowException - when something goes wrong

updateRelatedUser

public void updateRelatedUser(RelatedUser source,
                              String strContext,
                              String strParticipantOriginal,
                              String strFolderItemOriginal,
                              String strRelationOriginal,
                              String strRoleOriginal)
                       throws WorkflowDesignerException,
                              WorkflowException
Update a related user corresponding to the criteria given

Parameters:
strContext - the context
strParticipantOriginal - the original name of the participant, may be null
strFolderItemOriginal - the original name of the data folder item, may be null
strRelationOriginal - the original relation, may be null
strRoleOriginal - the original name of the role, may be null
Throws:
WorkflowDesignerException - when something goes wrong
WorkflowException - when something goes wrong

removeRelatedUser

public void removeRelatedUser(RelatedUser reference,
                              String strContext)
                       throws WorkflowException
Remove the related user specified

Parameters:
reference - the reference for the related user to remove
strContext - the context
Throws:
WorkflowException - if the related user cannot be found or when something goes wrong

createAction

public Action createAction()
Create a new action object to be added to the model

Returns:
an object implementing Action

updateAction

public void updateAction(Action source,
                         String strNameOriginal)
                  throws WorkflowDesignerException,
                         WorkflowException
Update or insert a new action element of the cached process model

Parameters:
source - the reference object
strNameOriginal -
Throws:
WorkflowDesignerException - when something goes wrong
WorkflowException - when something goes wrong

removeAction

public void removeAction(String strActionName)
                  throws WorkflowException,
                         WorkflowDesignerException
Remove the action specified

Parameters:
strActionName - the name of the action
Throws:
WorkflowException - if the action cannot be found
WorkflowDesignerException - if the action is referenced elsewhere

updateConsequence

public void updateConsequence(Consequence source,
                              String strContext)
                       throws WorkflowDesignerException,
                              WorkflowException
Update or insert a new consequence element of the cached process model

Parameters:
source - the reference object
strContext - the context of Consequence
Throws:
WorkflowDesignerException - when something goes wrong
WorkflowException - when something goes wrong

moveConsequence

public void moveConsequence(String strContext,
                            int iConsequence,
                            int nDirection)
                     throws WorkflowDesignerException
Move the consequence specified by the context inside the collection

Parameters:
strContext - the context of the consequence
iConsequence - the current index of the consequence in the collection
nDirection - the offset and the direction to move by
Throws:
WorkflowDesignerException - if the consequence cannot be found.

removeConsequence

public void removeConsequence(String strContext)
                       throws WorkflowDesignerException
Remove the consequence specified by the context

Parameters:
strContext - the context of the consequence
Throws:
WorkflowDesignerException - if the consequence cannot be found.

createForm

public Form createForm()
Create a new form object to be added to the model

Returns:
an object implementing Form

findForm

public Form findForm(String strContext)
Find the form by context

Parameters:
strContext - the context
Returns:
a Form object

updateForm

public void updateForm(Form source,
                       String strContext,
                       String strNameOriginal,
                       String strRoleOriginal)
                throws WorkflowDesignerException
Update Form referenced by the context.

Parameters:
source - the object carrying the new values
strContext - the context of the form being updated
strNameOriginal - the original name of the form
Throws:
WorkflowDesignerException - when the update goes wrong

removeForm

public void removeForm(String strContext)
                throws WorkflowException,
                       WorkflowDesignerException
Remove the form described by the context

Parameters:
strContext - the context
Throws:
WorkflowException - if the form cannot be found
WorkflowDesignerException - if the form is referenced elsewhere

findInput

public Input findInput(String strContext)
Find the input by context

Parameters:
strContext - the context
Returns:
a Input object

updateInput

public void updateInput(Input source,
                        String strContext)
                 throws WorkflowDesignerException
Update or insert a new input element of the cached process model

Parameters:
source - the reference object
strContext - the context of Input
Throws:
WorkflowDesignerException - when something goes wrong

removeInput

public void removeInput(String strContext)
                 throws WorkflowDesignerException,
                        WorkflowException
Remove the input specified by the context

Parameters:
strContext - the context of the input
Throws:
WorkflowDesignerException - if the input cannot be found.
WorkflowException - if the input cannot be found

createDesignation

public ContextualDesignation createDesignation()
Create a new ContextualDesignation object to be added to the model

Returns:
an object implementing ContextualDesignation

updateContextualDesignations

public void updateContextualDesignations(String strContext,
                                         ContextualDesignation source,
                                         String strLangOriginal,
                                         String strRoleOriginal)
                                  throws WorkflowDesignerException
Update or insert a new ContextualDesignation element of the cached process model

Parameters:
strContext -
source - the reference object
strLangOriginal -
strRoleOriginal -
Throws:
WorkflowDesignerException

findContextualDesignation

public ContextualDesignation findContextualDesignation(String strContext,
                                                       String strRole,
                                                       String strLanguage)
                                                throws WorkflowDesignerException
Finds the contextual designation with the given attributes in the specified context

Parameters:
strContext - the context of the designation
strLanguage - the language
strRole - the role name
Returns:
contextual designation of the given role & name or null
Throws:
WorkflowDesignerException - if something goes wrong

removeContextualDesignation

public void removeContextualDesignation(String strContext,
                                        ContextualDesignation contextualDesignation)
                                 throws WorkflowDesignerException
Removes the contextual designation with the attributes as the reference object in the specified context

Parameters:
strContext - the context of the designation
contextualDesignation - the reference object
Throws:
WorkflowDesignerException - when something goes wrong e.g. designation not found

createItem

public Item createItem(String strContext)
Create a new item object to be added to the model

Returns:
an object implementing Item

findItem

public Item findItem(String strContext)
Find the Item specified by the context

Parameters:
strContext - the context
Returns:
an Item object or null

updateItem

public void updateItem(Item source,
                       String strContext,
                       String strNameOriginal)
                throws WorkflowDesignerException
Update Item referenced by the context.

Parameters:
source - the object carrying the new values
strContext - the context of the item being updated
strNameOriginal - the original name of the item
Throws:
WorkflowDesignerException - when the update goes wrong

removeItem

public void removeItem(String strContext)
                throws WorkflowException,
                       WorkflowDesignerException
Remove the item described by the context

Parameters:
strContext - the context
Throws:
WorkflowException - when the item cannot be found
WorkflowDesignerException - when the item is referenced elsewhere

updateParameter

public void updateParameter(Parameter source,
                            String strContext,
                            String strNameOriginal)
                     throws WorkflowDesignerException
Update Parameter referenced by the context and parameter name.

Parameters:
source - the object carrying the new values
strContext - the context of the item being updated
strNameOriginal - the original name of the parameter
Throws:
WorkflowDesignerException - when the update goes wrong

removeParameter

public void removeParameter(String strContext,
                            String strName)
                     throws WorkflowException
Remove the parameter described by the context and name

Parameters:
strContext - the context
strName - the name of the parameter
Throws:
WorkflowException

findQualifiedUsers

public QualifiedUsers findQualifiedUsers(String strContext)
                                  throws WorkflowException
Find the QualifiedUsers specified by the context

Parameters:
strContext - the context
Returns:
a QualifiedUsers object or null
Throws:
WorkflowException

setQualifiedUsers

public void setQualifiedUsers(QualifiedUsers qualifiedUsers,
                              String strContext)
                       throws WorkflowException,
                              WorkflowDesignerException
Set the QualifiedUsers specified by the context to the given value

Parameters:
qualifiedUsers - the new value of qualified users
strContext - the context
Throws:
WorkflowDesignerException - When the qualified users' parent could not be found
WorkflowException

findAction

public Action findAction(String strContext)
                  throws WorkflowException
Get the Action specified by the context

Parameters:
strContext - the context
Returns:
an Action object or null
Throws:
WorkflowException

findConsequence

public Consequence findConsequence(String strContext)
                            throws WorkflowException
Find the Consequence specified by the context

Parameters:
strContext - the context
Returns:
an Consequence object or null
Throws:
WorkflowException

retrieveLanguageCodes

public String[] retrieveLanguageCodes(boolean fDefault)
Returns the language codes as configured in the properties

Parameters:
fDefault - if true the 'default' option shall be included
Returns:
an array of language codes

retrieveLanguageNames

public String[] retrieveLanguageNames(boolean fDefault)
Returns names of available languages as configured in the properties, localised for the current user

Parameters:
fDefault - if true the 'default' option shall be included
Returns:
an array of language names

retrieveItemTypeCodes

public String[] retrieveItemTypeCodes(boolean fNone)
Returns the item type codes as configured in the properties

Parameters:
fNone - if true the 'None' option shall be included
Returns:
an array of codes

retrieveOperators

public String[] retrieveOperators(boolean fNone)
Returns a list of comparison operators as configured in the properties,

Parameters:
fNone - if true the 'none' option shall be included
Returns:
an array of operators

retrieveActionKindCodes

public String[] retrieveActionKindCodes()
Returns the action kind codes as configured in the properties retrieve

Returns:
an array of codes

retrieveTypesAndDisplayers

public Map<String,List<String>> retrieveTypesAndDisplayers()

retrieveActionNames

public String[] retrieveActionNames(boolean fNone)
Produce a list of action names

Parameters:
fNone - if true the 'None' option shall be included
Returns:
an array of Strings or an empty array.

retrieveRoleNames

public String[] retrieveRoleNames(boolean fNone,
                                  boolean fDefault)
Produce a list of role names

Parameters:
fNone - if true the 'None' option shall be included
fDefault - if true the 'default' option shall be included
Returns:
an array of Strings or an empty array.

retrieveStateNames

public String[] retrieveStateNames(boolean fNone)
Produce a list of state names

Parameters:
fNone - if true the 'None' option shall be included
Returns:
an array of Strings or an empty array.

retrieveParticipantNames

public String[] retrieveParticipantNames(boolean fNone)
Produce a list of participant names

Parameters:
fNone - if true the 'None' option shall be included
Returns:
an array of Strings or an empty array.

retrieveUserInfoItemNames

public String[] retrieveUserInfoItemNames(boolean fNone,
                                          boolean fUsersOnly)
Produce a list of user info item names, optionally those where the type = 'user'

Parameters:
fNone - if true the 'None' option shall be included
fUsersOnly - if true only the items of type 'user' shall be included
Returns:
an array of Strings or an empty array.

retrieveFolderItemNames

public String[] retrieveFolderItemNames(boolean fNone,
                                        boolean fUsersOnly)
Produce a list of data folder item names, optionally those where the type = 'user'

Parameters:
fNone - if true the 'None' option shall be included
fUsersOnly - if true only the items of type 'user' shall be included
Returns:
an array of Strings or an empty array.

retrieveFolderItems

public List<Item> retrieveFolderItems()

retrieveFormNames

public String[] retrieveFormNames(boolean fNone)
Produce a list of form names, only forms other than 'presentationForm' and 'printForm'

Parameters:
fNone - if true the 'None' option shall be included
Returns:
an array of Strings or an empty array.

generateComponentDescriptor

public void generateComponentDescriptor()
                                 throws WorkflowDesignerException
Generates component descriptor file in the appropriate directory, stores the new descriptor's name to be able to access it later

Throws:
WorkflowDesignerException - when something goes wrong

uploadProcessModel

public void uploadProcessModel(org.apache.commons.fileupload.FileItem model)
                        throws WorkflowDesignerException,
                               WorkflowException
Upload given process model in workflow repository.

Parameters:
model - process model file
Throws:
WorkflowDesignerException - , WorkflowException
WorkflowException

clearCache

public void clearCache()

replaceSpecialChars

public static String replaceSpecialChars(String toParse)


Copyright © 2016 Silverpeas. All Rights Reserved.