org.tigris.scarab.workflow
Class DefaultWorkflow

java.lang.Object
  extended byorg.tigris.scarab.workflow.DefaultWorkflow
All Implemented Interfaces:
Workflow
Direct Known Subclasses:
CheapWorkflow

public class DefaultWorkflow
extends java.lang.Object
implements Workflow

Default implementation of workflow is a noop. It doesn't do anything.

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

Constructor Summary
DefaultWorkflow()
           
 
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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultWorkflow

public DefaultWorkflow()
Method Detail

canMakeTransition

public boolean canMakeTransition(ScarabUser user,
                                 AttributeOption fromOption,
                                 AttributeOption toOption,
                                 Issue issue)
                          throws ScarabException
Specified by:
canMakeTransition in interface Workflow
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

Specified by:
getTransitions in interface Workflow
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.

Specified by:
getTransitionTree in interface Workflow
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.

Specified by:
getTransitionsFrom in interface Workflow
Throws:
org.apache.torque.TorqueException
ScarabException

canMakeTransitionsFrom

public boolean canMakeTransitionsFrom(ScarabUser user,
                                      IssueType issueType,
                                      Attribute attribute,
                                      AttributeOption fromOption)
                               throws ScarabException
Specified by:
canMakeTransitionsFrom in interface Workflow
Throws:
ScarabException

checkTransition

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

checkInitialTransition

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

getWorkflowForRole

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

getWorkflowsForIssueType

public java.util.List getWorkflowsForIssueType(IssueType issueType)
                                        throws ScarabException
Specified by:
getWorkflowsForIssueType in interface Workflow
Throws:
ScarabException

getWorkflowsForRoleList

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

inherit

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

saveWorkflow

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

resetWorkflow

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

resetWorkflows

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

deleteWorkflowsForOption

public void deleteWorkflowsForOption(AttributeOption option,
                                     Module module,
                                     IssueType issueType)
                              throws ScarabException
Specified by:
deleteWorkflowsForOption in interface Workflow
Throws:
ScarabException

deleteWorkflowsForAttribute

public void deleteWorkflowsForAttribute(Attribute attr,
                                        Module module,
                                        IssueType issueType)
                                 throws ScarabException
Specified by:
deleteWorkflowsForAttribute in interface Workflow
Throws:
ScarabException

addIssueTypeWorkflowToModule

public void addIssueTypeWorkflowToModule(Module module,
                                         IssueType issueType)
                                  throws ScarabException
Specified by:
addIssueTypeWorkflowToModule in interface Workflow
Throws:
ScarabException

copyIssueTypeWorkflows

public void copyIssueTypeWorkflows(IssueType issueType,
                                   IssueType newIssueType)
                            throws ScarabException
Specified by:
copyIssueTypeWorkflows in interface Workflow
Throws:
ScarabException

resetAllWorkflowsForIssueType

public void resetAllWorkflowsForIssueType(Module module,
                                          IssueType issueType)
                                   throws ScarabException
Specified by:
resetAllWorkflowsForIssueType in interface Workflow
Throws:
ScarabException


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