Package de.xima.fc.workflow
Class WorkflowVersionStager
- java.lang.Object
-
- de.xima.fc.workflow.WorkflowVersionStager
-
public final class WorkflowVersionStager extends Object
When persisting aWorkflowProcess
entity graph, keeps track of all workflow entities that need to be created, updated, and deleted.- Since:
- 7.0.0
- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WorkflowVersionStager
forProcess(IEntityContext ec, WorkflowProcess newProcess, WorkflowProcess oldProcess)
static WorkflowVersionStager
forVersion(IEntityContext ec, WorkflowVersion newVersion, WorkflowVersion oldVersion)
Creates a new stager for persisting an unsavedWorkflowProcess
.void
perform(IEntityContext ec)
Persists the workflow process.
-
-
-
Method Detail
-
perform
public void perform(IEntityContext ec)
Persists the workflow process. Creates the workflow process, or overwrites the existing process if it exists.- Parameters:
ec
- Entity context to use for accessing the database.
-
forProcess
public static WorkflowVersionStager forProcess(IEntityContext ec, WorkflowProcess newProcess, WorkflowProcess oldProcess)
-
forVersion
public static WorkflowVersionStager forVersion(IEntityContext ec, @Nullable WorkflowVersion newVersion, @Nullable WorkflowVersion oldVersion)
Creates a new stager for persisting an unsavedWorkflowProcess
.- Parameters:
ec
- Current entity context for accessing the database.newVersion
- New version to persist. May benull
to delete the old process.oldVersion
- Existing version to overwrite. May benull
when no process exists yet.- Returns:
- The stager for persisting the new process.
-
-