| java.lang.Object com.ecyrd.jspwiki.workflow.DecisionQueue
DecisionQueue | public class DecisionQueue (Code) | | Keeps a queue of pending Decisions that need to be acted on by named
Principals.
author: Andrew Jaquith since: 2.5 |
Constructor Summary | |
public | DecisionQueue() Constructs a new DecisionQueue. |
Method Summary | |
protected synchronized void | add(Decision decision) Adds a Decision to the DecisionQueue; also sets the Decision's unique
identifier. | public void | decide(Decision decision, Outcome outcome) Attempts to complete a Decision by calling
Decision.decide(Outcome) . | protected Decision[] | decisions() Protected method that returns all pending Decisions in the queue, in
order of submission. | public Collection | getActorDecisions(WikiSession session) Returns a Collection representing the current Decisions that pertain to a
users's WikiSession. | public synchronized void | reassign(Decision decision, Principal owner) Reassigns the owner of the Decision to a new owner. | protected synchronized void | remove(Decision decision) Protected method that removes a Decision from the queue. |
DecisionQueue | public DecisionQueue()(Code) | | Constructs a new DecisionQueue.
|
add | protected synchronized void add(Decision decision)(Code) | | Adds a Decision to the DecisionQueue; also sets the Decision's unique
identifier.
Parameters: decision - the Decision to add |
decide | public void decide(Decision decision, Outcome outcome) throws WikiException(Code) | | Attempts to complete a Decision by calling
Decision.decide(Outcome) . This will cause the Step immediately
following the Decision (if any) to start. If the decision completes
successfully, this method also removes the completed decision from the
queue.
Parameters: decision - the Decision for which the Outcome will be supplied Parameters: outcome - the Outcome of the Decision throws: WikiException - if the succeeding Step cannot startfor any reason |
decisions | protected Decision[] decisions()(Code) | | Protected method that returns all pending Decisions in the queue, in
order of submission. If no Decisions are pending, this method returns a
zero-length array.
the pending decisions TODO: explore whether this method could bemade protected |
getActorDecisions | public Collection getActorDecisions(WikiSession session)(Code) | | Returns a Collection representing the current Decisions that pertain to a
users's WikiSession. The Decisions are obtained by iterating through the
WikiSession's Principals and selecting those Decisions whose
Decision.getActor value match. If the wiki session is not
authenticated, this method returns an empty Collection.
Parameters: session - the wiki session the collection of Decisions, which may be empty |
remove | protected synchronized void remove(Decision decision)(Code) | | Protected method that removes a Decision from the queue.
Parameters: decision - the decision to remove |
|
|