Class RequestState

java.lang.Object
org.exoplatform.processes.util.RequestState

public final class RequestState extends Object
A request's progress, read from its own state and never from the columns of its task project, which may have any names and any number: pending while its task is not completed, cancelled when its requester cancelled it and its task is completed, closed (decided by a manager) when its task is completed otherwise. The column the task sits in is a label only.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    Tells whether the requester cancelled a request still closed.
    static boolean
    Tells whether a manager closed a request: its task is completed and its requester did not cancel it.
    static boolean
    Tells whether a request changes no more unless reopened: decided or cancelled, which « Archive all » archives.
    static boolean
    Tells whether a request waits for a decision: its task is not completed, whatever its column; a request reopened after a cancel is pending again.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • isPending

      public static boolean isPending(Work work)
      Tells whether a request waits for a decision: its task is not completed, whatever its column; a request reopened after a cancel is pending again.
      Parameters:
      work - the request
      Returns:
      true when pending
    • isCanceled

      public static boolean isCanceled(Work work)
      Tells whether the requester cancelled a request still closed.
      Parameters:
      work - the request
      Returns:
      true when its task is completed and its record says cancelled
    • isDecided

      public static boolean isDecided(Work work)
      Tells whether a manager closed a request: its task is completed and its requester did not cancel it. The column it sits in words the outcome.
      Parameters:
      work - the request
      Returns:
      true when decided
    • isFinished

      public static boolean isFinished(Work work)
      Tells whether a request changes no more unless reopened: decided or cancelled, which « Archive all » archives.
      Parameters:
      work - the request
      Returns:
      true when its task is completed