Package org.ametys.cms.repository
Class WorkflowAwareContentHelper
java.lang.Object
org.ametys.cms.repository.WorkflowAwareContentHelper
Provides helper methods to use the
WorkflowAwareContent
API on JCRAmetysObject
s.-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic long
getCurrentStepId
(JCRAmetysObject object) Get an object's current step ID.static ZonedDateTime
Get an object's proposal date.static long
getWorkflowId
(JCRAmetysObject object) Get an object's workflow ID.static void
removeWorkflowId
(JCRAmetysObject object) Remove the workflow ID property if exists on an objectstatic void
setCurrentStepId
(JCRAmetysObject object, long stepId) Set an object's current step ID.static void
setProposalDate
(ModifiableDataAwareVersionableAmetysObject object, ZonedDateTime proposalDate) Set an object's proposal date.static void
setWorkflowId
(JCRAmetysObject object, long workflowId) Set an object's workflow ID.
-
Field Details
-
METADATA_WORKFLOW_ID
Constants for workflowId Metadata*- See Also:
-
METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*- See Also:
-
METADATA_LAST_PROPOSAL_DATE
Name of the metadata storing the proposal date.- See Also:
-
-
Method Details
-
getWorkflowId
Get an object's workflow ID.- Parameters:
object
- the object.- Returns:
- the object's workflow ID.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setWorkflowId
public static void setWorkflowId(JCRAmetysObject object, long workflowId) throws AmetysRepositoryException Set an object's workflow ID.- Parameters:
object
- the object.workflowId
- the workflow ID to set.- Throws:
AmetysRepositoryException
- if an error occurs.
-
removeWorkflowId
Remove the workflow ID property if exists on an object- Parameters:
object
- The Ametys object
-
getCurrentStepId
Get an object's current step ID.- Parameters:
object
- the object.- Returns:
- the object's current step ID.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setCurrentStepId
public static void setCurrentStepId(JCRAmetysObject object, long stepId) throws AmetysRepositoryException Set an object's current step ID.- Parameters:
object
- the object.stepId
- the current step ID to set.- Throws:
AmetysRepositoryException
- if an error occurs.
-
getProposalDate
public static ZonedDateTime getProposalDate(ModifiableDataAwareVersionableAmetysObject object) throws AmetysRepositoryException Get an object's proposal date.- Parameters:
object
- the object.- Returns:
- the object's proposal date.
- Throws:
AmetysRepositoryException
- if an error occurs.
-
setProposalDate
public static void setProposalDate(ModifiableDataAwareVersionableAmetysObject object, ZonedDateTime proposalDate) throws AmetysRepositoryException Set an object's proposal date.- Parameters:
object
- the object.proposalDate
- the proposal date to set.- Throws:
AmetysRepositoryException
- if an error occurs.
-