Interface IWorkflowStateDao

All Superinterfaces:
de.xima.cmn.dao.interfaces.IAbstractDao<WorkflowState,Long,IEntityContext>, IGenericDao<WorkflowState>
All Known Implementing Classes:
WorkflowStateDao

public interface IWorkflowStateDao extends IGenericDao<WorkflowState>
Data access object for creating, updating, and deleting WorkflowState entities.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Method Details

    • createDefaultStates

      @Deprecated List<WorkflowState> createDefaultStates()
      Creates the system default workflow states
      Returns:
      list of system default states
    • createDefaultStates

      List<WorkflowState> createDefaultStates(Locale locale)
      Creates the system default workflow states
      Parameters:
      locale - the current locale
      Returns:
      list of system default states
    • getAllByWorkflowVersion

      List<WorkflowState> getAllByWorkflowVersion(IEntityContext ec, Projekt project, long versionNumber)
      Finds all states of the given workflow version.
      Parameters:
      ec - Entity context for accessing the database.
      project - Project which contains the workflow version.
      versionNumber - Version number of the workflow version, must belong to the given project.
      Returns:
      A list of all WorkflowState contained in the given workflow version.
    • getAllByWorkflowVersion

      List<WorkflowState> getAllByWorkflowVersion(IEntityContext ec, WorkflowVersion workflowVersion)
      Finds all states of the given workflow version.
      Parameters:
      ec - Entity context for accessing the database.
      workflowVersion - Workflow version for which to retrieve the states.
      Returns:
      A list of all WorkflowState contained in the given workflow version.
    • getAllForActiveVersion

      List<WorkflowState> getAllForActiveVersion(IEntityContext ec, Projekt project)
      Finds all states of the active workflow version of the given project.
      Parameters:
      ec - Entity context for accessing the database.
      project - Project which contains the workflow version.
      Returns:
      A list of all WorkflowState contained in the active workflow version of the given project.
    • getByUuid

      WorkflowState getByUuid(IEntityContext ec, WorkflowVersion workflowVersion, UUID uuid)
      Finds the state with the given UUID contained in the given workflow version. Note that the WorkflowState.getUuid() is unique only within all states of a certain workflow version.
      Parameters:
      ec - Entity context for accessing the database.
      workflowVersion - The workflow version for which to retrieve the state.
      uuid - The UUID of the workflow state to retrieve.
      Returns:
      A workflow state with the given UUID that is contained in the given workflow version, or null if no such state exists.
    • getOrCreateSystemState

      WorkflowState getOrCreateSystemState(IEntityContext ec, WorkflowVersion workflowVersion, EWorkflowStateType type)
      Finds the given built-in workflow state. Creates it if it does not exist yet.
      Parameters:
      ec - Entity context for accessing the database.
      workflowVersion - Workflow version with states to search.
      type - Workflow state type to find.
      Returns:
      The state with the given type.
      Throws:
      IllegalArgumentException - When type is null or EWorkflowStateType.CUSTOM was passed.