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 String
METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*static String
METADATA_WORKFLOW_ID
Constants 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 Date
getCreationDate()
Get the creation date of the processUserIdentity
getCreator()
Get the creator of the processlong
getCurrentStepId()
Retrieves the current step id of the Ametys objectString
getDescription()
Get the process descriptionResourceCollection
getRootAttachments(boolean create)
Retrieves the attachments root nodeString
getSite()
Get the site where the process was createdString
getTitle()
Get the process titleString
getWorkflow()
Get the workflow linked to this processlong
getWorkflowId()
Retrieves the workflow id associated with the Ametys object.void
setCreationDate(Date creationDate)
Set the creation date of the processvoid
setCreator(UserIdentity creator)
Set the creator of the processvoid
setCurrentStepId(long stepId)
Set the current step id of the Ametys objectvoid
setDescription(String description)
Set the process descriptionvoid
setSite(String site)
Set the site where the process was createdvoid
setTitle(String title)
Set the process titlevoid
setWorkflow(String workflowId)
Set the workflow linked to this processvoid
setWorkflowId(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 thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the JCRWorkflowProcessFactory which created the AmetysObject
-
-
Method Detail
-
getTitle
public String getTitle() throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Get the process title- Specified by:
getTitle
in interfaceWorkflowProcess
- Returns:
- The process title
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setTitle
public void setTitle(String title)
Description copied from interface:WorkflowProcess
Set the process title- Specified by:
setTitle
in interfaceWorkflowProcess
- Parameters:
title
- The title
-
getWorkflow
public String getWorkflow() throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Get the workflow linked to this process- Specified by:
getWorkflow
in interfaceWorkflowProcess
- Returns:
- The workflow id
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setWorkflow
public void setWorkflow(String workflowId)
Description copied from interface:WorkflowProcess
Set the workflow linked to this process- Specified by:
setWorkflow
in interfaceWorkflowProcess
- Parameters:
workflowId
- The workflow id
-
getDescription
public String getDescription() throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Get the process description- Specified by:
getDescription
in interfaceWorkflowProcess
- Returns:
- The description
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setDescription
public void setDescription(String description)
Description copied from interface:WorkflowProcess
Set the process description- Specified by:
setDescription
in interfaceWorkflowProcess
- Parameters:
description
- The description
-
getCreator
public UserIdentity getCreator() throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Get the creator of the process- Specified by:
getCreator
in interfaceWorkflowProcess
- Returns:
- The creator
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setCreator
public void setCreator(UserIdentity creator)
Description copied from interface:WorkflowProcess
Set the creator of the process- Specified by:
setCreator
in interfaceWorkflowProcess
- Parameters:
creator
- The creator
-
getSite
public String getSite() throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Get the site where the process was created- Specified by:
getSite
in interfaceWorkflowProcess
- Returns:
- The site
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setSite
public void setSite(String site)
Description copied from interface:WorkflowProcess
Set the site where the process was created- Specified by:
setSite
in interfaceWorkflowProcess
- Parameters:
site
- The site
-
getCreationDate
public Date getCreationDate() throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Get the creation date of the process- Specified by:
getCreationDate
in interfaceWorkflowProcess
- Returns:
- The creation date
- Throws:
AmetysRepositoryException
- If a repository error occurred
-
setCreationDate
public void setCreationDate(Date creationDate)
Description copied from interface:WorkflowProcess
Set the creation date of the process- Specified by:
setCreationDate
in interfaceWorkflowProcess
- Parameters:
creationDate
- The creation date
-
getRootAttachments
public ResourceCollection getRootAttachments(boolean create) throws AmetysRepositoryException
Description copied from interface:WorkflowProcess
Retrieves the attachments root node- Specified by:
getRootAttachments
in 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:WorkflowAwareAmetysObject
Retrieves the workflow id associated with the Ametys object.- Specified by:
getWorkflowId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the workflow id.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWorkflowId
public void setWorkflowId(long workflowId) throws AmetysRepositoryException
Description copied from interface:WorkflowAwareAmetysObject
Set 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:
setWorkflowId
in 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:WorkflowAwareAmetysObject
Retrieves the current step id of the Ametys object- Specified by:
getCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Returns:
- the current step id
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCurrentStepId
public void setCurrentStepId(long stepId) throws AmetysRepositoryException
Description copied from interface:WorkflowAwareAmetysObject
Set the current step id of the Ametys object- Specified by:
setCurrentStepId
in interfaceWorkflowAwareAmetysObject
- Parameters:
stepId
- the step id to set- Throws:
AmetysRepositoryException
- if an error occurs.
-
-