public class DecisionQueue extends Object implements Serializable
Constructor and Description |
---|
DecisionQueue()
Constructs a new DecisionQueue.
|
Modifier and Type | Method and Description |
---|---|
protected void |
add(Decision decision)
Adds a Decision to the DecisionQueue; also sets the Decision's unique
identifier.
|
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.
|
Collection<Decision> |
getActorDecisions(WikiSession session)
Returns a Collection representing the current Decisions that pertain to a
users's WikiSession.
|
void |
reassign(Decision decision,
Principal owner)
Reassigns the owner of the Decision to a new owner.
|
protected void |
remove(Decision decision)
Protected method that removes a Decision from the queue.
|
public DecisionQueue()
protected void add(Decision decision)
decision
- the Decision to addprotected Decision[] decisions()
protected void remove(Decision decision)
decision
- the decision to removepublic Collection<Decision> getActorDecisions(WikiSession session)
Decision.getActor()
value match. If the wiki session is not
authenticated, this method returns an empty Collection.session
- the wiki sessionpublic void decide(Decision decision, Outcome outcome) throws WikiException
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.decision
- the Decision for which the Outcome will be suppliedoutcome
- the Outcome of the DecisionWikiException
- if the succeeding Step cannot start
for any reasonpublic void reassign(Decision decision, Principal owner) throws WikiException
Decision.reassign(Principal)
.decision
- the Decision to reassignowner
- the new ownerWikiException
- neverCopyright © 2001-2019 The Apache Software Foundation. All rights reserved.