Interface State

All Superinterfaces:
Activity

public interface State extends Activity
This class represent the state activity of a Page. All the states recorded in the document's lifecycle are recorded and the latest state is considered as the current state
Since:
1.0
  • Method Details

    • getName

      String getName()
      Returns the state name
      Returns:
      the state name
      Since:
      1.0
    • getDescription

      String getDescription()
      Deprecated.
      Returns the state description defined in the workflow
      Returns:
      description
      Since:
      1.3
    • getContentVersion

      int getContentVersion()
      Returns the content's version at the time it reached this state.
      Returns:
      the content version
      Since:
      1.0
    • getAttachmentVersions

      List<? extends AttachmentVersion> getAttachmentVersions()
      Returns a list of the version of the content's attachments, at the time the content reached this state
      Returns:
      a list of AttachmentVersion records
      Since:
      1.0
    • getAssignments

      List<? extends Assignment> getAssignments()
      Returns a list of assignments on this state. The latest attachment (if any) is consider as the content's assignment
      Returns:
      a list of assignment
      Since:
      1.0
    • getLastAssignment

      Assignment getLastAssignment()
      Deprecated.
      state assignment is no longer supported.
      Returns the latest assignment in this state
      Returns:
      the latest assignment, or null if the content has not been assigned
    • getTasks

      List<? extends Task> getTasks()
      Returns the list of active tasks in the state
      Returns:
      a list of Tasks
      Since:
      1.0
    • getAllTasks

      List<? extends Task> getAllTasks()
      Returns the list of all tasks (completed or not) in the state
      Returns:
      a list of all tasks
      Since:
      1.0
    • getApprovals

      List<Approval> getApprovals()
      Deprecated.
      Returns the list of approvals given in this state
      Returns:
      a list of approvals
      Since:
      1.0
    • getRejections

      List<Rejection> getRejections()
      Deprecated.
      use StateApproval.getApprovals() instead and check Approval.isApproved() is false.
      Returns the list of rejections given in this state
      Returns:
      a list of rejections
      Since:
      1.0
    • getExpirationDate

      Date getExpirationDate()
      Returns the expiration date for this state. This date may be null if no state expiration date is set.
      Returns:
      Date the expiration date for this state.
      Since:
      1.2
    • isPublished

      boolean isPublished()
      Returns true if the current state activity represents the published version of a page.
      Returns:
      true and this state activity represents the published version of a page
    • isVersionsCompleted

      boolean isVersionsCompleted()
      Returns:
      versionscompleted parameter of the state
    • isTaskable

      boolean isTaskable()
      Deprecated.
      This attribute is actually associated with the workflow, not a state activity. This property was previously set correctly when retrieving the current state, but may not be accurate for historic states. From 1.4 to determine if a future state will be taskable use Workflow.State.isTaskable().
      Returns true is the state is taskable
    • isAssignable

      boolean isAssignable()
      Deprecated.
      State assignment is no longer supported. This attribute will be removed in a future version.
      Returns true if the state allows the page assignment to be set.
    • getColour

      String getColour()
      Returns a string that represents the colour of the state
      Returns:
      the state colour
      Since:
      1.18.0