Class WorkflowAwareAmetysObjectHelper
java.lang.Object
org.ametys.plugins.workflow.repository.WorkflowAwareAmetysObjectHelper
Provides helper methods to use the
WorkflowAwareAmetysObject.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic longgetCurrentStepId(WorkflowAwareAmetysObject ametysObject) Get an ametys object's current step ID.static longgetWorkflowId(WorkflowAwareAmetysObject ametysObject) Get an ametys object's workflow IDstatic voidremoveWorkflowId(WorkflowAwareAmetysObject ametysObject) Remove the workflow ID property if exists onstatic voidsetCurrentStepId(WorkflowAwareAmetysObject ametysObject, long stepId) Set an ametys object's current step ID.static voidsetWorkflowId(WorkflowAwareAmetysObject ametysObject, long workflowId) Set an ametys 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:
-
-
Method Details
-
getWorkflowId
public static long getWorkflowId(WorkflowAwareAmetysObject ametysObject) throws AmetysRepositoryException Get an ametys object's workflow ID- Parameters:
ametysObject- the ametys object- Returns:
- the ametys object's workflow ID
- Throws:
AmetysRepositoryException- if an error occurs
-
setWorkflowId
public static void setWorkflowId(WorkflowAwareAmetysObject ametysObject, long workflowId) throws AmetysRepositoryException Set an ametys object's workflow ID.- Parameters:
ametysObject- the ametys objectworkflowId- the workflow ID to set.- Throws:
AmetysRepositoryException- if an error occurs.
-
removeWorkflowId
Remove the workflow ID property if exists on- Parameters:
ametysObject- the ametys object
-
getCurrentStepId
public static long getCurrentStepId(WorkflowAwareAmetysObject ametysObject) throws AmetysRepositoryException Get an ametys object's current step ID.- Parameters:
ametysObject- the ametys object- Returns:
- the ametys object's current step ID.
- Throws:
AmetysRepositoryException- if an error occurs.
-
setCurrentStepId
public static void setCurrentStepId(WorkflowAwareAmetysObject ametysObject, long stepId) throws AmetysRepositoryException Set an ametys object's current step ID.- Parameters:
ametysObject- the ametys objectstepId- the current step ID to set.- Throws:
AmetysRepositoryException- if an error occurs.
-