| java.lang.Object org.tigris.scarab.workflow.DefaultWorkflow org.tigris.scarab.workflow.CheapWorkflow
CheapWorkflow | public class CheapWorkflow extends DefaultWorkflow (Code) | | Simple implementation of Workflow, relies on the Transition tables, where every record defines a
transition available for a given Role, from an option to another.
- If there are no transitions defined, it will always return true
- If the "from" option of a transition is null, it will mean "Any option", and the "To" will
be available from any option.
- If the "to" option of a transition is null, any option will be available from the "From" option.
- If both the 'to' and 'from' options are null, the role will be able to change freely from one value
to another.
If any transition happens to have associated Conditions, will only be available when this condition
evals to true.
|
Method Summary | |
public boolean | canMakeTransition(ScarabUser user, AttributeOption fromOption, AttributeOption toOption, Issue issue) Returns true if the transition from the option fromOption to toOption is
allowed for the current user. | public boolean | canMakeTransitionsFrom(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption) Returns true if at least one transition from the fromOption
to any other option is allowed on the given attribute in the scope
of the given IssueType and for the current user. | public List | filterConditionalTransitions(List transitions, Issue issue) Filter the allowed transitions so only those not-conditioned,
those whose condition fulfill, and those not restricted by
the blocking condition, will remain. | public TransitionNode | getTransitionTree(ScarabUser user, IssueType issueType, Attribute attribute) Returns the tree of transitions
in the current module/issueType/attribute combination. | public void | getTransitionTree(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption, TransitionNode node, List visitedTransitions) | public List | getTransitions(ScarabUser user, IssueType issueType, Attribute attribute) | public List | getTransitionsFrom(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption) Returns the list of transitions allowed for the current user
in the current module/issueType/attribute combination
starting from fromOption. |
canMakeTransitionsFrom | public boolean canMakeTransitionsFrom(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption) throws ScarabException(Code) | | Returns true if at least one transition from the fromOption
to any other option is allowed on the given attribute in the scope
of the given IssueType and for the current user.
throws: TorqueException - |
filterConditionalTransitions | public List filterConditionalTransitions(List transitions, Issue issue) throws TorqueException(Code) | | Filter the allowed transitions so only those not-conditioned,
those whose condition fulfill, and those not restricted by
the blocking condition, will remain.
Parameters: transitions - Parameters: issue - throws: TorqueException - |
getTransitions | public List getTransitions(ScarabUser user, IssueType issueType, Attribute attribute) throws ScarabException(Code) | | Returns the list of transitions allowed for the current user
in the current module/issueType/attribute combination
throws: TorqueException - |
Methods inherited from org.tigris.scarab.workflow.DefaultWorkflow | public void addIssueTypeWorkflowToModule(Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public boolean canMakeTransition(ScarabUser user, AttributeOption fromOption, AttributeOption toOption, Issue issue) throws ScarabException(Code)(Java Doc) public boolean canMakeTransitionsFrom(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption) throws ScarabException(Code)(Java Doc) public String checkInitialTransition(AttributeOption toOption, Issue issue, Map newAttVals, ScarabUser user) throws ScarabException(Code)(Java Doc) public String checkTransition(AttributeOption fromOption, AttributeOption toOption, Issue issue, Map newAttVals, ScarabUser user) throws ScarabException(Code)(Java Doc) public void copyIssueTypeWorkflows(IssueType issueType, IssueType newIssueType) throws ScarabException(Code)(Java Doc) public void deleteWorkflowsForAttribute(Attribute attr, Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public void deleteWorkflowsForOption(AttributeOption option, Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public TransitionNode getTransitionTree(ScarabUser user, IssueType issueType, Attribute attribute) throws ScarabException(Code)(Java Doc) public List getTransitions(ScarabUser user, IssueType issueType, Attribute attribute) throws ScarabException(Code)(Java Doc) public List getTransitionsFrom(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption) throws ScarabException(Code)(Java Doc) public OptionWorkflow getWorkflowForRole(AttributeOption fromOption, AttributeOption toOption, String roleName, Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public List getWorkflowsForIssueType(IssueType issueType) throws ScarabException(Code)(Java Doc) public List getWorkflowsForRoleList(AttributeOption fromOption, AttributeOption toOption, List roleNames, Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public OptionWorkflow inherit(AttributeOption fromOption, AttributeOption toOption, String roleName, Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public void resetAllWorkflowsForIssueType(Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public void resetWorkflow(AttributeOption fromOption, AttributeOption toOption, String roleName, Module module, IssueType issueType) throws ScarabException(Code)(Java Doc) public void resetWorkflows(String roleName, Module module, IssueType issueType, boolean initial) throws ScarabException(Code)(Java Doc) public void saveWorkflow(AttributeOption fromOption, AttributeOption toOption, String roleName, Module module, IssueType issueType, WorkflowRules workflowRule) throws ScarabException(Code)(Java Doc)
|
|
|