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 Detail

      • getName

        String getName()
        Returns the state name
        Returns:
        the state name
        Since:
        1.0
      • 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
      • 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