Class ProcessModelImpl
- java.lang.Object
-
- org.silverpeas.core.workflow.engine.model.ProcessModelImpl
-
- All Implemented Interfaces:
Serializable
,ProcessModel
public class ProcessModelImpl extends Object implements ProcessModel, Serializable
Class implementing the representation of the main <processModel> element of a Process Model.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ProcessModelImpl()
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Actions
createActions()
Create ActionsDataFolder
createDataFolder()
Create DataFolderForms
createForms()
Create FormsParticipants
createParticipants()
Create ParticipantsPresentation
createPresentation()
Create a PresentationQualifiedUsers
createQualifiedUsers()
Create an object implementing QualifiedUsersRelatedUser
createRelatedUser()
Create an object implementing RelatedUserRoles
createRoles()
Create RolesStates
createStates()
Create StatesAction
getAction(String name)
Get the action with the given nameForm
getActionForm(String actionName)
Returns the form (if any) associated to the named action.Action[]
getActions()
Get the actions defined for this process modelActions
getActionsEx()
Get the actions definitionsRecordTemplate
getAllDataTemplate(String role, String lang)
Returns the recordTemplate which describes the data record of the process instance built from this model.Action
getCreateAction(String role)
Returns the action of kind create Throws a WorkflowException if there is no action of type createString[]
getCreationRoles()
Returns the roles under which an user can create a new instanceDataFolder
getDataFolder()
Get the data folder defined for this process modelString
getDescription(String role, String language)
Get description in specific language for the given roleContextualDesignations
getDescriptions()
Get all the descriptionsRecordSet
getFolderRecordSet()
Returns the record set where are saved all the folder of the instance built from this model.String
getFolderRecordSetName()
Returns the name of the record set where are saved all the folder of the instance built from this model.Form
getForm(String name)
Get the form with the given nameForm
getForm(String name, String role)
Get the form definition with given name for the given roleRecordSet
getFormRecordSet(String formName)
Returns the record set where are saved all the data of the named form.String
getFormRecordSetName(String formName)
Returns the name of the record set where are saved all the data of the named form.Forms
getForms()
Get the forms definitionsString
getLabel(String role, String language)
Get label in specific language for the given roleContextualDesignations
getLabels()
Get all the labelsString
getModelId()
Get the id of this process modelString
getName()
Get the name of this process modelDataRecord
getNewActionRecord(String actionName, String roleName, String lang, DataRecord data)
Returns an empty DataRecord which must be filled in order to process the named action.DataRecord
getNewUserInfosRecord(String roleName, String lang)
Returns an empty DataRecord which must be filled in order to fill the user information Throws a WorkflowException if problem encountered.Participant[]
getParticipants()
Get the participants definitionParticipants
getParticipantsEx()
Get all the participants definitionsPresentation
getPresentation()
Get the presentation configurationForm
getPresentationForm(String name, String roleName, String lang)
Returns the Form which be used to publish the form associated to the named action or form.Form
getPublicationForm(String actionName, String roleName, String lang)
Returns the Form which be used to publish the form associated to the named action.Role
getRole(String name)
Get the role definition with given nameRole[]
getRoles()
Get the roles definitionRoles
getRolesEx()
Get the Roles definitionsRecordTemplate
getRowTemplate(String role, String lang)
Returns the recordTemplate which describes the data record used to show process instance as a row in list.RecordTemplate
getRowTemplate(String role, String lang, boolean isProcessIdVisible)
Returns the recordTemplate which describes the data record used to show process instance as a row in list.State
getState(String name)
Get the state with the given nameState[]
getStates()
Get the states defined for this process modelStates
getStatesEx()
Get the states definitionsDataFolder
getUserInfos()
Get the user infos defined for this process model It contains all the items necessary about user to allow him to use the instancevoid
setActions(Actions actions)
Set the actions defined for this process modelvoid
setDataFolder(DataFolder dataFolder)
Set the data folder defined for this process modelvoid
setForms(Forms forms)
Set the forms defined for this process modelvoid
setModelId(String modelId)
Set the id of this process modelvoid
setName(String name)
Set the name of this process modelvoid
setParticipants(Participants participants)
Set the participants definitionvoid
setPresentation(Presentation presentation)
Set the presentation's configurationvoid
setRoles(Roles roles)
Set the roles definitionvoid
setStates(States states)
Set the states defined for this process modelvoid
setUserInfos(DataFolder userInfos)
Set the user infos defined for this process model It contains all the items necessary about user to allow him to use the instance
-
-
-
Method Detail
-
getModelId
public String getModelId()
Get the id of this process model- Specified by:
getModelId
in interfaceProcessModel
- Returns:
- process model id
-
setModelId
public void setModelId(String modelId)
Set the id of this process model- Specified by:
setModelId
in interfaceProcessModel
- Parameters:
modelId
- process model id
-
getName
public String getName()
Get the name of this process model- Specified by:
getName
in interfaceProcessModel
- Returns:
- process model's name
-
setName
public void setName(String name)
Set the name of this process model- Specified by:
setName
in interfaceProcessModel
- Parameters:
name
- process model's name
-
getPresentation
public Presentation getPresentation()
Get the presentation configuration- Specified by:
getPresentation
in interfaceProcessModel
- Returns:
- presentation configuration
-
setPresentation
public void setPresentation(Presentation presentation)
Set the presentation's configuration- Specified by:
setPresentation
in interfaceProcessModel
- Parameters:
presentation
- presentation's configuration
-
createPresentation
public Presentation createPresentation()
Description copied from interface:ProcessModel
Create a Presentation- Specified by:
createPresentation
in interfaceProcessModel
- Returns:
- an object implementing Presentation
-
getParticipants
public Participant[] getParticipants()
Get the participants definition- Specified by:
getParticipants
in interfaceProcessModel
- Returns:
- participants definition
-
getParticipantsEx
public Participants getParticipantsEx()
Description copied from interface:ProcessModel
Get all the participants definitions- Specified by:
getParticipantsEx
in interfaceProcessModel
-
setParticipants
public void setParticipants(Participants participants)
Set the participants definition- Specified by:
setParticipants
in interfaceProcessModel
- Parameters:
participants
- participants definition
-
createParticipants
public Participants createParticipants()
Description copied from interface:ProcessModel
Create Participants- Specified by:
createParticipants
in interfaceProcessModel
- Returns:
- an object implementing Participants
-
getRoles
public Role[] getRoles()
Get the roles definition- Specified by:
getRoles
in interfaceProcessModel
- Returns:
- roles definition
-
getRole
public Role getRole(String name)
Get the role definition with given name- Specified by:
getRole
in interfaceProcessModel
- Parameters:
name
- role name- Returns:
- wanted role definition
-
getRolesEx
public Roles getRolesEx()
Description copied from interface:ProcessModel
Get the Roles definitions- Specified by:
getRolesEx
in interfaceProcessModel
-
setRoles
public void setRoles(Roles roles)
Set the roles definition- Specified by:
setRoles
in interfaceProcessModel
- Parameters:
roles
- roles definition
-
createRoles
public Roles createRoles()
Description copied from interface:ProcessModel
Create Roles- Specified by:
createRoles
in interfaceProcessModel
- Returns:
- an object implementing Roles
-
getStates
public State[] getStates()
Get the states defined for this process model- Specified by:
getStates
in interfaceProcessModel
- Returns:
- states defined for this process model
-
getStatesEx
public States getStatesEx()
Description copied from interface:ProcessModel
Get the states definitions- Specified by:
getStatesEx
in interfaceProcessModel
-
getState
public State getState(String name)
Get the state with the given name- Specified by:
getState
in interfaceProcessModel
- Parameters:
name
- state name- Returns:
- wanted state
-
setStates
public void setStates(States states)
Set the states defined for this process model- Specified by:
setStates
in interfaceProcessModel
- Parameters:
states
- states defined for this process model
-
createStates
public States createStates()
Description copied from interface:ProcessModel
Create States- Specified by:
createStates
in interfaceProcessModel
- Returns:
- an object implementing States
-
getActions
public Action[] getActions()
Get the actions defined for this process model- Specified by:
getActions
in interfaceProcessModel
- Returns:
- actions defined for this process model
-
getActionsEx
public Actions getActionsEx()
Description copied from interface:ProcessModel
Get the actions definitions- Specified by:
getActionsEx
in interfaceProcessModel
-
getAction
public Action getAction(String name) throws WorkflowException
Get the action with the given name- Specified by:
getAction
in interfaceProcessModel
- Parameters:
name
- action name- Returns:
- the wanted action
- Throws:
WorkflowException
-
setActions
public void setActions(Actions actions)
Set the actions defined for this process model- Specified by:
setActions
in interfaceProcessModel
- Parameters:
actions
- actions defined for this process model
-
createActions
public Actions createActions()
Description copied from interface:ProcessModel
Create Actions- Specified by:
createActions
in interfaceProcessModel
- Returns:
- an object implementing Actions
-
getDataFolder
public DataFolder getDataFolder()
Get the data folder defined for this process model- Specified by:
getDataFolder
in interfaceProcessModel
- Returns:
- data folder defined for this process model. it contains all the items declarations
-
setDataFolder
public void setDataFolder(DataFolder dataFolder)
Set the data folder defined for this process model- Specified by:
setDataFolder
in interfaceProcessModel
- Parameters:
dataFolder
- data folder defined for this process model. it contains all the items declarations
-
createDataFolder
public DataFolder createDataFolder()
Description copied from interface:ProcessModel
Create DataFolder- Specified by:
createDataFolder
in interfaceProcessModel
- Returns:
- an object implementing DataFolder
-
getUserInfos
public DataFolder getUserInfos()
Get the user infos defined for this process model It contains all the items necessary about user to allow him to use the instance- Specified by:
getUserInfos
in interfaceProcessModel
- Returns:
- user infos defined for this process model.
-
setUserInfos
public void setUserInfos(DataFolder userInfos)
Set the user infos defined for this process model It contains all the items necessary about user to allow him to use the instance- Specified by:
setUserInfos
in interfaceProcessModel
- Parameters:
userInfos
- user infos defined for this process model.
-
getForms
public Forms getForms()
Description copied from interface:ProcessModel
Get the forms definitions- Specified by:
getForms
in interfaceProcessModel
-
getForm
public Form getForm(String name)
Get the form with the given name- Specified by:
getForm
in interfaceProcessModel
- Parameters:
name
- form name- Returns:
- the wanted form
-
getForm
public Form getForm(String name, String role)
Description copied from interface:ProcessModel
Get the form definition with given name for the given role- Specified by:
getForm
in interfaceProcessModel
- Parameters:
name
- action form- Returns:
- wanted form definition
-
setForms
public void setForms(Forms forms)
Set the forms defined for this process model- Specified by:
setForms
in interfaceProcessModel
- Parameters:
forms
- forms defined for this process model.
-
createForms
public Forms createForms()
Description copied from interface:ProcessModel
Create Forms- Specified by:
createForms
in interfaceProcessModel
- Returns:
- an object implementing Forms
-
getLabels
public ContextualDesignations getLabels()
Description copied from interface:ProcessModel
Get all the labels- Specified by:
getLabels
in interfaceProcessModel
- Returns:
- an object containing the collection of the labels
-
getLabel
public String getLabel(String role, String language)
Get label in specific language for the given role- Specified by:
getLabel
in interfaceProcessModel
- Parameters:
role
- role for which the label islanguage
- label's language- Returns:
- wanted label as a String object. If label is not found, search label with given role and default language, if not found again, return the default label in given language, if not found again, return the default label in default language, if not found again, return empty string.
-
getDescriptions
public ContextualDesignations getDescriptions()
Description copied from interface:ProcessModel
Get all the descriptions- Specified by:
getDescriptions
in interfaceProcessModel
- Returns:
- an object containing the collection of the descriptions
-
getDescription
public String getDescription(String role, String language)
Get description in specific language for the given role- Specified by:
getDescription
in interfaceProcessModel
- Parameters:
role
- role for which the description islanguage
- description's language- Returns:
- wanted description as a String object. If description is not found, search description with given role and default language, if not found again, return the default description in given language, if not found again, return the default description in default language, if not found again, return empty string.
-
createQualifiedUsers
public QualifiedUsers createQualifiedUsers()
Description copied from interface:ProcessModel
Create an object implementing QualifiedUsers- Specified by:
createQualifiedUsers
in interfaceProcessModel
-
createRelatedUser
public RelatedUser createRelatedUser()
Description copied from interface:ProcessModel
Create an object implementing RelatedUser- Specified by:
createRelatedUser
in interfaceProcessModel
-
getFolderRecordSetName
public String getFolderRecordSetName()
Returns the name of the record set where are saved all the folder of the instance built from this model.- Specified by:
getFolderRecordSetName
in interfaceProcessModel
-
getFormRecordSetName
public String getFormRecordSetName(String formName)
Returns the name of the record set where are saved all the data of the named form.- Specified by:
getFormRecordSetName
in interfaceProcessModel
-
getFolderRecordSet
public RecordSet getFolderRecordSet() throws WorkflowException
Returns the record set where are saved all the folder of the instance built from this model.- Specified by:
getFolderRecordSet
in interfaceProcessModel
- Throws:
WorkflowException
-
getFormRecordSet
public RecordSet getFormRecordSet(String formName) throws WorkflowException
Returns the record set where are saved all the data of the named form.- Specified by:
getFormRecordSet
in interfaceProcessModel
- Throws:
WorkflowException
-
getActionForm
public Form getActionForm(String actionName) throws WorkflowException
Returns the form (if any) associated to the named action. Returns null if the action has no form. Throws a WorkflowException if the action is unknown.- Specified by:
getActionForm
in interfaceProcessModel
- Throws:
WorkflowException
-
getCreateAction
public Action getCreateAction(String role) throws WorkflowException
Returns the action of kind create Throws a WorkflowException if there is no action of type create- Specified by:
getCreateAction
in interfaceProcessModel
- Throws:
WorkflowException
-
getPublicationForm
public Form getPublicationForm(String actionName, String roleName, String lang) throws WorkflowException
Returns the Form which be used to publish the form associated to the named action. Returns null if the action has no form. Throws a WorkflowException if the action is unknown.- Specified by:
getPublicationForm
in interfaceProcessModel
- Throws:
WorkflowException
-
getPresentationForm
public Form getPresentationForm(String name, String roleName, String lang) throws WorkflowException
Returns the Form which be used to publish the form associated to the named action or form. Returns null if the action has no form.- Specified by:
getPresentationForm
in interfaceProcessModel
- Throws:
WorkflowException
-
getNewActionRecord
public DataRecord getNewActionRecord(String actionName, String roleName, String lang, DataRecord data) throws WorkflowException
Returns an empty DataRecord which must be filled in order to process the named action. Returns null if no form is required to process this action. Throws a WorkflowException if the action is unknown.- Specified by:
getNewActionRecord
in interfaceProcessModel
- Parameters:
actionName
- Name of the actionroleName
- Role of the current userlang
- Lang of the current user- Throws:
WorkflowException
-
getNewUserInfosRecord
public DataRecord getNewUserInfosRecord(String roleName, String lang) throws WorkflowException
Returns an empty DataRecord which must be filled in order to fill the user information Throws a WorkflowException if problem encountered.- Specified by:
getNewUserInfosRecord
in interfaceProcessModel
- Parameters:
roleName
- Role of the current userlang
- Lang of the current user- Throws:
WorkflowException
-
getCreationRoles
public String[] getCreationRoles() throws WorkflowException
Returns the roles under which an user can create a new instance- Specified by:
getCreationRoles
in interfaceProcessModel
- Throws:
WorkflowException
-
getAllDataTemplate
public RecordTemplate getAllDataTemplate(String role, String lang)
Returns the recordTemplate which describes the data record of the process instance built from this model.- Specified by:
getAllDataTemplate
in interfaceProcessModel
- Parameters:
role
- Role of the current userlang
- Lang of the current user
-
getRowTemplate
public RecordTemplate getRowTemplate(String role, String lang)
Returns the recordTemplate which describes the data record used to show process instance as a row in list.- Specified by:
getRowTemplate
in interfaceProcessModel
- Parameters:
role
- Role of the current userlang
- Lang of the current user
-
getRowTemplate
public RecordTemplate getRowTemplate(String role, String lang, boolean isProcessIdVisible)
Returns the recordTemplate which describes the data record used to show process instance as a row in list.- Specified by:
getRowTemplate
in interfaceProcessModel
- Parameters:
role
- Role of the current userlang
- Lang of the current userisProcessIdVisible
- Case if id is deplayed or not
-
-