Package org.ametys.cms.repository
Class WorkflowAwareContentHelper
- java.lang.Object
-
- org.ametys.cms.repository.WorkflowAwareContentHelper
-
public final class WorkflowAwareContentHelper extends Object
Provides helper methods to use theWorkflowAwareContent
API onJCRAmetysObject
s.
-
-
Field Summary
Fields Modifier and Type Field Description static String
METADATA_CURRENT_STEP_ID
Constants for currentStepId Metadata*static String
METADATA_LAST_PROPOSAL_DATE
Name of the metadata storing the proposal date.static String
METADATA_WORKFLOW_ID
Constants for workflowId Metadata*
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static long
getCurrentStepId(JCRAmetysObject object)
Get an object's current step ID.static ZonedDateTime
getProposalDate(ModifiableDataAwareVersionableAmetysObject object)
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 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
-
METADATA_LAST_PROPOSAL_DATE
public static final String METADATA_LAST_PROPOSAL_DATE
Name of the metadata storing the proposal date.- See Also:
- Constant Field Values
-
-
Method Detail
-
getWorkflowId
public static long getWorkflowId(JCRAmetysObject object) throws AmetysRepositoryException
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
public static void removeWorkflowId(JCRAmetysObject object)
Remove the workflow ID property if exists on an object- Parameters:
object
- The Ametys object
-
getCurrentStepId
public static long getCurrentStepId(JCRAmetysObject object) throws AmetysRepositoryException
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.
-
-