org.tigris.scarab.workflow
Interface Workflow

All Known Implementing Classes:
DefaultWorkflow

public interface Workflow

This is the primary interface for workflow within Scarab. Implementations of this interface are loaded through the WorkflowFactory interface. It gets which class to load from the Scarab.properties file.

Version:
$Id: Workflow.java 10144 2006-06-05 18:36:19Z dabbous $
Author:
Elicia David

Method Summary
 void addIssueTypeWorkflowToModule(Module module, IssueType issueType)
           
 boolean canMakeTransition(ScarabUser user, AttributeOption fromOption, AttributeOption toOption, Issue issue)
           
 boolean canMakeTransitionsFrom(ScarabUser user, IssueType issueType, Attribute attribute, AttributeOption fromOption)
           
 java.lang.String checkInitialTransition(AttributeOption toOption, Issue issue, java.util.Map newAttVals, ScarabUser user)
           
 java.lang.String checkTransition(AttributeOption fromOption, AttributeOption toOption, Issue issue, java.util.Map newAttVals, ScarabUser user)
           
 void copyIssueTypeWorkflows(IssueType issueType, IssueType newIssueType)
           
 void deleteWorkflowsForAttribute(Attribute attr, Module module, IssueType issueType)
           
 void deleteWorkflowsForOption(AttributeOption option, Module module, IssueType issueType)
           
 java.util.List getTransitions(ScarabUser user, IssueType issueType, Attribute attribute)
          Returns the list of transitions allowed for the current user in the current module/issueType/attribute combination
 java.util.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.
 TransitionNode getTransitionTree(ScarabUser user, IssueType issueType, Attribute attribute)
          Returns the tree of transitions in the current module/issueType/attribute combination.
 OptionWorkflow getWorkflowForRole(AttributeOption fromOption, AttributeOption toOption, java.lang.String roleName, Module module, IssueType issueType)
           
 java.util.List getWorkflowsForIssueType(IssueType issueType)
           
 java.util.List getWorkflowsForRoleList(AttributeOption fromOption, AttributeOption toOption, java.util.List roleNames, Module module, IssueType issueType)
           
 OptionWorkflow inherit(AttributeOption fromOption, AttributeOption toOption, java.lang.String roleName, Module module, IssueType issueType)
           
 void resetAllWorkflowsForIssueType(Module module, IssueType issueType)
           
 void resetWorkflow(AttributeOption fromOption, AttributeOption toOption, java.lang.String roleName, Module module, IssueType issueType)
           
 void resetWorkflows(java.lang.String roleName, Module module, IssueType issueType, boolean initial)
           
 void saveWorkflow(AttributeOption fromOption, AttributeOption toOption, java.lang.String roleName, Module module, IssueType issueType, WorkflowRules workflowRule)
           
 

Method Detail

canMakeTransition

public boolean canMakeTransition(ScarabUser user,
                                 AttributeOption fromOption,
                                 AttributeOption toOption,
                                 Issue issue)
                          throws ScarabException
Throws:
ScarabException

getTransitions

public java.util.List getTransitions(ScarabUser user,
                                     IssueType issueType,
                                     Attribute attribute)
                              throws ScarabException
Returns the list of transitions allowed for the current user in the current module/issueType/attribute combination

Throws:
org.apache.torque.TorqueException
ScarabException

getTransitionTree

public TransitionNode getTransitionTree(ScarabUser user,
                                        IssueType issueType,
                                        Attribute attribute)
                                 throws ScarabException
Returns the tree of transitions in the current module/issueType/attribute combination.

Throws:
org.apache.torque.TorqueException
ScarabException

getTransitionsFrom

public java.util.List getTransitionsFrom(ScarabUser user,
                                         IssueType issueType,
                                         Attribute attribute,
                                         AttributeOption fromOption)
                                  throws ScarabException
Returns the list of transitions allowed for the current user in the current module/issueType/attribute combination starting from fromOption.

Throws:
org.apache.torque.TorqueException
ScarabException

canMakeTransitionsFrom

public boolean canMakeTransitionsFrom(ScarabUser user,
                                      IssueType issueType,
                                      Attribute attribute,
                                      AttributeOption fromOption)
                               throws ScarabException
Throws:
ScarabException

checkTransition

public java.lang.String checkTransition(AttributeOption fromOption,
                                        AttributeOption toOption,
                                        Issue issue,
                                        java.util.Map newAttVals,
                                        ScarabUser user)
                                 throws ScarabException
Throws:
ScarabException

checkInitialTransition

public java.lang.String checkInitialTransition(AttributeOption toOption,
                                               Issue issue,
                                               java.util.Map newAttVals,
                                               ScarabUser user)
                                        throws ScarabException
Throws:
ScarabException

getWorkflowForRole

public OptionWorkflow getWorkflowForRole(AttributeOption fromOption,
                                         AttributeOption toOption,
                                         java.lang.String roleName,
                                         Module module,
                                         IssueType issueType)
                                  throws ScarabException
Throws:
ScarabException

getWorkflowsForRoleList

public java.util.List getWorkflowsForRoleList(AttributeOption fromOption,
                                              AttributeOption toOption,
                                              java.util.List roleNames,
                                              Module module,
                                              IssueType issueType)
                                       throws ScarabException
Throws:
ScarabException

getWorkflowsForIssueType

public java.util.List getWorkflowsForIssueType(IssueType issueType)
                                        throws ScarabException
Throws:
ScarabException

saveWorkflow

public void saveWorkflow(AttributeOption fromOption,
                         AttributeOption toOption,
                         java.lang.String roleName,
                         Module module,
                         IssueType issueType,
                         WorkflowRules workflowRule)
                  throws ScarabException
Throws:
ScarabException

inherit

public OptionWorkflow inherit(AttributeOption fromOption,
                              AttributeOption toOption,
                              java.lang.String roleName,
                              Module module,
                              IssueType issueType)
                       throws ScarabException
Throws:
ScarabException

resetWorkflow

public void resetWorkflow(AttributeOption fromOption,
                          AttributeOption toOption,
                          java.lang.String roleName,
                          Module module,
                          IssueType issueType)
                   throws ScarabException
Throws:
ScarabException

resetWorkflows

public void resetWorkflows(java.lang.String roleName,
                           Module module,
                           IssueType issueType,
                           boolean initial)
                    throws ScarabException
Throws:
ScarabException

deleteWorkflowsForOption

public void deleteWorkflowsForOption(AttributeOption option,
                                     Module module,
                                     IssueType issueType)
                              throws ScarabException
Throws:
ScarabException

deleteWorkflowsForAttribute

public void deleteWorkflowsForAttribute(Attribute attr,
                                        Module module,
                                        IssueType issueType)
                                 throws ScarabException
Throws:
ScarabException

addIssueTypeWorkflowToModule

public void addIssueTypeWorkflowToModule(Module module,
                                         IssueType issueType)
                                  throws ScarabException
Throws:
ScarabException

copyIssueTypeWorkflows

public void copyIssueTypeWorkflows(IssueType issueType,
                                   IssueType newIssueType)
                            throws ScarabException
Throws:
ScarabException

resetAllWorkflowsForIssueType

public void resetAllWorkflowsForIssueType(Module module,
                                          IssueType issueType)
                                   throws ScarabException
Throws:
ScarabException


Copyright © 2000-2004 Tigris.org. All Rights Reserved.