Package org.ametys.plugins.bpm.jcr
Class JCRWorkflowProcess
- java.lang.Object
-
- org.ametys.plugins.repository.AbstractAmetysObject
-
- org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
-
- org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject<JCRWorkflowProcessFactory>
-
- org.ametys.plugins.bpm.jcr.JCRWorkflowProcess
-
- All Implemented Interfaces:
WorkflowProcess,ACLAmetysObject,AmetysObject,JCRAmetysObject,JCRTraversableAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,ModifiableTraversableAmetysObject,RemovableAmetysObject,TraversableAmetysObject,WorkflowAwareAmetysObject
public class JCRWorkflowProcess extends DefaultTraversableAmetysObject<JCRWorkflowProcessFactory> implements WorkflowProcess, WorkflowAwareAmetysObject
Class representing of workflow's process, backed by a JCR node.
-
-
Field Summary
Fields Modifier and Type Field Description static StringMETADATA_CURRENT_STEP_IDConstants for currentStepId Metadata*static StringMETADATA_WORKFLOW_IDConstants for workflowId Metadata*
-
Constructor Summary
Constructors Constructor Description JCRWorkflowProcess(Node node, String parentPath, JCRWorkflowProcessFactory factory)Creates anJCRWorkflowProcess.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DategetCreationDate()Get the creation date of the processUserIdentitygetCreator()Get the creator of the processlonggetCurrentStepId()Retrieves the current step id of the Ametys objectStringgetDescription()Get the process descriptionResourceCollectiongetRootAttachments(boolean create)Retrieves the attachments root nodeStringgetSite()Get the site where the process was createdStringgetTitle()Get the process titleStringgetWorkflow()Get the workflow linked to this processlonggetWorkflowId()Retrieves the workflow id associated with the Ametys object.voidsetCreationDate(Date creationDate)Set the creation date of the processvoidsetCreator(UserIdentity creator)Set the creator of the processvoidsetCurrentStepId(long stepId)Set the current step id of the Ametys objectvoidsetDescription(String description)Set the process descriptionvoidsetSite(String site)Set the site where the process was createdvoidsetTitle(String title)Set the process titlevoidsetWorkflow(String workflowId)Set the workflow linked to this processvoidsetWorkflowId(long workflowId)Set the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.-
Methods inherited from class org.ametys.plugins.repository.jcr.DefaultTraversableAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, createChild, disallowInheritance, getChild, getChildren, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, hasChild, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers
-
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getNode, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
-
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
-
Methods inherited from interface org.ametys.plugins.repository.jcr.JCRAmetysObject
getNode
-
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Methods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolder
-
Methods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
Methods inherited from interface org.ametys.plugins.repository.TraversableAmetysObject
getChildAt, getChildPosition
-
-
-
-
Field Detail
-
METADATA_WORKFLOW_ID
public static final String METADATA_WORKFLOW_ID
Constants for workflowId Metadata*- See Also:
- Constant Field Values
-
METADATA_CURRENT_STEP_ID
public static final String METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*- See Also:
- Constant Field Values
-
-
Constructor Detail
-
JCRWorkflowProcess
public JCRWorkflowProcess(Node node, String parentPath, JCRWorkflowProcessFactory factory)
Creates anJCRWorkflowProcess.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the JCRWorkflowProcessFactory which created the AmetysObject
-
-
Method Detail
-
getTitle
public String getTitle() throws AmetysRepositoryException
Description copied from interface:WorkflowProcessGet the process title- Specified by:
getTitlein interfaceWorkflowProcess- Returns:
- The process title
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setTitle
public void setTitle(String title)
Description copied from interface:WorkflowProcessSet the process title- Specified by:
setTitlein interfaceWorkflowProcess- Parameters:
title- The title
-
getWorkflow
public String getWorkflow() throws AmetysRepositoryException
Description copied from interface:WorkflowProcessGet the workflow linked to this process- Specified by:
getWorkflowin interfaceWorkflowProcess- Returns:
- The workflow id
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setWorkflow
public void setWorkflow(String workflowId)
Description copied from interface:WorkflowProcessSet the workflow linked to this process- Specified by:
setWorkflowin interfaceWorkflowProcess- Parameters:
workflowId- The workflow id
-
getDescription
public String getDescription() throws AmetysRepositoryException
Description copied from interface:WorkflowProcessGet the process description- Specified by:
getDescriptionin interfaceWorkflowProcess- Returns:
- The description
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setDescription
public void setDescription(String description)
Description copied from interface:WorkflowProcessSet the process description- Specified by:
setDescriptionin interfaceWorkflowProcess- Parameters:
description- The description
-
getCreator
public UserIdentity getCreator() throws AmetysRepositoryException
Description copied from interface:WorkflowProcessGet the creator of the process- Specified by:
getCreatorin interfaceWorkflowProcess- Returns:
- The creator
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setCreator
public void setCreator(UserIdentity creator)
Description copied from interface:WorkflowProcessSet the creator of the process- Specified by:
setCreatorin interfaceWorkflowProcess- Parameters:
creator- The creator
-
getSite
public String getSite() throws AmetysRepositoryException
Description copied from interface:WorkflowProcessGet the site where the process was created- Specified by:
getSitein interfaceWorkflowProcess- Returns:
- The site
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setSite
public void setSite(String site)
Description copied from interface:WorkflowProcessSet the site where the process was created- Specified by:
setSitein interfaceWorkflowProcess- Parameters:
site- The site
-
getCreationDate
public Date getCreationDate() throws AmetysRepositoryException
Description copied from interface:WorkflowProcessGet the creation date of the process- Specified by:
getCreationDatein interfaceWorkflowProcess- Returns:
- The creation date
- Throws:
AmetysRepositoryException- If a repository error occurred
-
setCreationDate
public void setCreationDate(Date creationDate)
Description copied from interface:WorkflowProcessSet the creation date of the process- Specified by:
setCreationDatein interfaceWorkflowProcess- Parameters:
creationDate- The creation date
-
getRootAttachments
public ResourceCollection getRootAttachments(boolean create) throws AmetysRepositoryException
Description copied from interface:WorkflowProcessRetrieves the attachments root node- Specified by:
getRootAttachmentsin interfaceWorkflowProcess- Parameters:
create- True to create the node if it does not exist- Returns:
- The attachments root node.
- Throws:
AmetysRepositoryException- if an error occurs.
-
getWorkflowId
public long getWorkflowId() throws AmetysRepositoryException
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowIdin interfaceWorkflowAwareAmetysObject- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setWorkflowId
public void setWorkflowId(long workflowId) throws AmetysRepositoryException
Description copied from interface:WorkflowAwareAmetysObjectSet the workflow id of this Ametys object.
This method will throw Exception if the workflow id was already set on this Ametys object.- Specified by:
setWorkflowIdin interfaceWorkflowAwareAmetysObject- Parameters:
workflowId- the workflow id of the object.- Throws:
AmetysRepositoryException- if an error occurs.
-
getCurrentStepId
public long getCurrentStepId() throws AmetysRepositoryException
Description copied from interface:WorkflowAwareAmetysObjectRetrieves the current step id of the Ametys object- Specified by:
getCurrentStepIdin interfaceWorkflowAwareAmetysObject- Returns:
- the current step id
- Throws:
AmetysRepositoryException- if an error occurs.
-
setCurrentStepId
public void setCurrentStepId(long stepId) throws AmetysRepositoryException
Description copied from interface:WorkflowAwareAmetysObjectSet the current step id of the Ametys object- Specified by:
setCurrentStepIdin interfaceWorkflowAwareAmetysObject- Parameters:
stepId- the step id to set- Throws:
AmetysRepositoryException- if an error occurs.
-
-