|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.stratelia.silverpeas.peasCore.AbstractComponentSessionController
com.silverpeas.workflowdesigner.control.WorkflowDesignerSessionController
public class WorkflowDesignerSessionController
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 java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String TYPE_USER
public static final String FORMS
public static final String DATA_FOLDER
public static final String USER_INFOS
public static final String ACTIONS
public static final String INPUTS
public static final String STATES
public static final String PARAMETERS
public static final String PARTICIPANTS
public static final String PRESENTATION
public static final String ROLES
public static final String RELATED_USER
public static final String WORKING_USERS
public static final String INTERESTED_USERS
public static final String NOTIFIED_USERS
public static final String ALLOWED_USERS
public static final String CONSEQUENCES
public static final String FORM_TYPE_PRESENTATION
public static final String FORM_TYPE_PRINT
public static final String FORM_TYPE_ACTION
public static final String NEW_ELEMENT_NAME
public static final String TITLES
public static final String ACTIVITIES
public static final String DESCRIPTIONS
public static final String LABELS
Constructor Detail |
---|
public WorkflowDesignerSessionController(MainSessionController mainSessionCtrl, ComponentContext componentContext)
mainSessionCtrl
- The user's profilecomponentContext
- The component's profile
Method Detail |
---|
public List<String> listProcessModels() throws WorkflowDesignerException
WorkflowDesignerException
public ProcessModel createProcessModel() throws WorkflowDesignerException
WorkflowDesignerException
public ProcessModel loadProcessModel(String strProcessFileName) throws WorkflowDesignerException
strProcessFileName
- relative path and the file name
WorkflowDesignerException
public void saveProcessModel(String strProcessModelFileName) throws WorkflowDesignerException
strProcessModelFileName
- the relative path and the name of the file
WorkflowDesignerException
- when the saving goes wrong...public void removeProcessModel(String strProcessModelFileName) throws WorkflowDesignerException
strProcessModelFileName
- the relative path to the process file name
WorkflowDesignerException
- when something goes wrongpublic ProcessModel getProcessModel()
public Boolean isNewProcessModel()
public String getProcessFileName()
public String getComponentDescriptorName()
null
if no components
reference this process model.public void updateProcessModelHeader(ProcessModel processModel)
processModel
- the reference objectpublic Columns addColumns()
public void updateColumns(Columns source, String strRoleOriginal) throws WorkflowDesignerException
source
- the reference object
WorkflowDesignerException
public void deleteColumns(String strRoleName) throws WorkflowDesignerException
strRoleName
- the value of the role attribute
WorkflowDesignerException
- when something goes wrongpublic Role createRole()
public void updateRole(Role source, String strNameOriginal) throws WorkflowDesignerException
source
- the data carrier objectstrNameOriginal
- the original name of the object
WorkflowDesignerException
- if another object with the same name already existspublic void removeRole(String strRoleName) throws WorkflowDesignerException
strRoleName
- the name of the role
WorkflowDesignerException
- if the role cannot be found or is referenced elsewhere.public Participant createParticipant()
public void updateParticipant(Participant source, String strNameOriginal) throws WorkflowDesignerException
source
- the reference object
WorkflowDesignerException
public void removeParticipant(String strParticipantName) throws WorkflowDesignerException
strParticipantName
- the name of the participant
WorkflowDesignerException
- if the participant cannot be found or is referenced
elsewhere.public State createState()
public void updateState(State source, String strNameOriginal) throws WorkflowDesignerException
source
- the reference object
WorkflowDesignerException
public void removeState(String strStateName) throws WorkflowDesignerException
strStateName
- the name of the state
WorkflowDesignerException
- if the state cannot be found or is referenced elsewhere.public void updateQualifiedUsers(QualifiedUsers source, String strContext) throws WorkflowException, WorkflowDesignerException
null
before.
source
- the new Qualified UsersstrContext
- the context of the QualifiedUsers being updated
WorkflowException
- when the update goes wrong
WorkflowDesignerException
- when the update goes wrongpublic RelatedUser findRelatedUser(String strContext, String strParticipant, String strFolderItem, String strRelation, String strRole) throws WorkflowException
strContext
- the contextstrParticipant
- 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
WorkflowException
- when something goes wrongpublic void updateRelatedUser(RelatedUser source, String strContext, String strParticipantOriginal, String strFolderItemOriginal, String strRelationOriginal, String strRoleOriginal) throws WorkflowDesignerException, WorkflowException
strContext
- the contextstrParticipantOriginal
- 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
WorkflowDesignerException
- when something goes wrong
WorkflowException
- when something goes wrongpublic void removeRelatedUser(RelatedUser reference, String strContext) throws WorkflowException
reference
- the reference for the related user to removestrContext
- the context
WorkflowException
- if the related user cannot be found or when something goes
wrongpublic Action createAction()
public void updateAction(Action source, String strNameOriginal) throws WorkflowDesignerException, WorkflowException
source
- the reference objectstrNameOriginal
-
WorkflowDesignerException
- when something goes wrong
WorkflowException
- when something goes wrongpublic void removeAction(String strActionName) throws WorkflowException, WorkflowDesignerException
strActionName
- the name of the action
WorkflowException
- if the action cannot be found
WorkflowDesignerException
- if the action is referenced elsewherepublic void updateConsequence(Consequence source, String strContext) throws WorkflowDesignerException, WorkflowException
source
- the reference objectstrContext
- the context of Consequence
WorkflowDesignerException
- when something goes wrong
WorkflowException
- when something goes wrongpublic void moveConsequence(String strContext, int iConsequence, int nDirection) throws WorkflowDesignerException
strContext
- the context of the consequenceiConsequence
- the current index of the consequence in the collectionnDirection
- the offset and the direction to move by
WorkflowDesignerException
- if the consequence cannot be found.public void removeConsequence(String strContext) throws WorkflowDesignerException
strContext
- the context of the consequence
WorkflowDesignerException
- if the consequence cannot be found.public Form createForm()
public Form findForm(String strContext)
strContext
- the context
public void updateForm(Form source, String strContext, String strNameOriginal, String strRoleOriginal) throws WorkflowDesignerException
source
- the object carrying the new valuesstrContext
- the context of the form being updatedstrNameOriginal
- the original name of the form
WorkflowDesignerException
- when the update goes wrongpublic void removeForm(String strContext) throws WorkflowException, WorkflowDesignerException
strContext
- the context
WorkflowException
- if the form cannot be found
WorkflowDesignerException
- if the form is referenced elsewherepublic Input findInput(String strContext)
strContext
- the context
public void updateInput(Input source, String strContext) throws WorkflowDesignerException
source
- the reference objectstrContext
- the context of Input
WorkflowDesignerException
- when something goes wrongpublic void removeInput(String strContext) throws WorkflowDesignerException, WorkflowException
strContext
- the context of the input
WorkflowDesignerException
- if the input cannot be found.
WorkflowException
- if the input cannot be foundpublic ContextualDesignation createDesignation()
public void updateContextualDesignations(String strContext, ContextualDesignation source, String strLangOriginal, String strRoleOriginal) throws WorkflowDesignerException
strContext
- source
- the reference objectstrLangOriginal
- strRoleOriginal
-
WorkflowDesignerException
public ContextualDesignation findContextualDesignation(String strContext, String strRole, String strLanguage) throws WorkflowDesignerException
strContext
- the context of the designationstrLanguage
- the languagestrRole
- the role name
null
WorkflowDesignerException
- if something goes wrongpublic void removeContextualDesignation(String strContext, ContextualDesignation contextualDesignation) throws WorkflowDesignerException
strContext
- the context of the designationcontextualDesignation
- the reference object
WorkflowDesignerException
- when something goes wrong e.g. designation not foundpublic Item createItem(String strContext)
public Item findItem(String strContext)
strContext
- the context
null
public void updateItem(Item source, String strContext, String strNameOriginal) throws WorkflowDesignerException
source
- the object carrying the new valuesstrContext
- the context of the item being updatedstrNameOriginal
- the original name of the item
WorkflowDesignerException
- when the update goes wrongpublic void removeItem(String strContext) throws WorkflowException, WorkflowDesignerException
strContext
- the context
WorkflowException
- when the item cannot be found
WorkflowDesignerException
- when the item is referenced elsewherepublic void updateParameter(Parameter source, String strContext, String strNameOriginal) throws WorkflowDesignerException
source
- the object carrying the new valuesstrContext
- the context of the item being updatedstrNameOriginal
- the original name of the parameter
WorkflowDesignerException
- when the update goes wrongpublic void removeParameter(String strContext, String strName) throws WorkflowException
strContext
- the contextstrName
- the name of the parameter
WorkflowException
public QualifiedUsers findQualifiedUsers(String strContext) throws WorkflowException
strContext
- the context
null
WorkflowException
public void setQualifiedUsers(QualifiedUsers qualifiedUsers, String strContext) throws WorkflowException, WorkflowDesignerException
qualifiedUsers
- the new value of qualified usersstrContext
- the context
WorkflowDesignerException
- When the qualified users' parent could not be found
WorkflowException
public Action findAction(String strContext) throws WorkflowException
strContext
- the context
null
WorkflowException
public Consequence findConsequence(String strContext) throws WorkflowException
strContext
- the context
null
WorkflowException
public String[] retrieveLanguageCodes(boolean fDefault)
fDefault
- if true
the 'default' option shall be included
public String[] retrieveLanguageNames(boolean fDefault)
fDefault
- if true
the 'default' option shall be included
public String[] retrieveItemTypeCodes(boolean fNone)
fNone
- if true
the 'None' option shall be included
public String[] retrieveOperators(boolean fNone)
fNone
- if true
the 'none' option shall be included
public String[] retrieveActionKindCodes()
public Map<String,List<String>> retrieveTypesAndDisplayers()
public String[] retrieveActionNames(boolean fNone)
fNone
- if true
the 'None' option shall be included
public String[] retrieveRoleNames(boolean fNone, boolean fDefault)
fNone
- if true
the 'None' option shall be includedfDefault
- if true
the 'default' option shall be included
public String[] retrieveStateNames(boolean fNone)
fNone
- if true
the 'None' option shall be included
public String[] retrieveParticipantNames(boolean fNone)
fNone
- if true
the 'None' option shall be included
public String[] retrieveUserInfoItemNames(boolean fNone, boolean fUsersOnly)
fNone
- if true
the 'None' option shall be includedfUsersOnly
- if true
only the items of type 'user' shall be included
public String[] retrieveFolderItemNames(boolean fNone, boolean fUsersOnly)
fNone
- if true
the 'None' option shall be includedfUsersOnly
- if true
only the items of type 'user' shall be included
public List<Item> retrieveFolderItems()
public String[] retrieveFormNames(boolean fNone)
fNone
- if true
the 'None' option shall be included
public void generateComponentDescriptor() throws WorkflowDesignerException
WorkflowDesignerException
- when something goes wrongpublic void uploadProcessModel(org.apache.commons.fileupload.FileItem model) throws WorkflowDesignerException, WorkflowException
model
- process model file
WorkflowDesignerException
- , WorkflowException
WorkflowException
public void clearCache()
public static String replaceSpecialChars(String toParse)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |