1 package org.tigris.scarab.workflow; 2 3 48 49 import java.util.Map ; 50 import java.util.List ; 51 52 53 import org.tigris.scarab.om.ScarabUser; 54 import org.tigris.scarab.om.Issue; 55 import org.tigris.scarab.om.Module; 56 import org.tigris.scarab.om.IssueType; 57 import org.tigris.scarab.om.AttributeOption; 58 import org.tigris.scarab.om.OptionWorkflow; 59 import org.tigris.scarab.om.Attribute; 60 import org.tigris.scarab.om.WorkflowRules; 61 import org.tigris.scarab.util.ScarabException; 62 63 72 public interface Workflow 73 { 74 boolean canMakeTransition(ScarabUser user, 75 AttributeOption fromOption, 76 AttributeOption toOption, 77 Issue issue) 78 throws ScarabException; 79 80 81 String checkTransition(AttributeOption fromOption, 82 AttributeOption toOption, 83 Issue issue, Map newAttVals, 84 ScarabUser user) 85 throws ScarabException; 86 87 String checkInitialTransition(AttributeOption toOption, 88 Issue issue, Map newAttVals, 89 ScarabUser user) 90 throws ScarabException; 91 92 OptionWorkflow getWorkflowForRole(AttributeOption fromOption, 93 AttributeOption toOption, 94 String roleName, 95 Module module, 96 IssueType issueType) 97 throws ScarabException; 98 99 100 List getWorkflowsForRoleList(AttributeOption fromOption, 101 AttributeOption toOption, 102 List roleNames, Module module, 103 IssueType issueType) 104 throws ScarabException; 105 106 List getWorkflowsForIssueType(IssueType issueType) 107 throws ScarabException; 108 109 void saveWorkflow(AttributeOption fromOption, 110 AttributeOption toOption, 111 String roleName, Module module, 112 IssueType issueType, WorkflowRules workflowRule) 113 throws ScarabException; 114 115 OptionWorkflow inherit(AttributeOption fromOption, 116 AttributeOption toOption, 117 String roleName, Module module, 118 IssueType issueType) 119 throws ScarabException; 120 121 void resetWorkflow(AttributeOption fromOption, 122 AttributeOption toOption, 123 String roleName, Module module, 124 IssueType issueType) 125 throws ScarabException; 126 127 void resetWorkflows(String roleName, Module module, IssueType issueType, 128 boolean initial) 129 throws ScarabException; 130 131 132 void deleteWorkflowsForOption(AttributeOption option, 133 Module module, IssueType issueType) 134 throws ScarabException; 135 136 void deleteWorkflowsForAttribute(Attribute attr, Module module, 137 IssueType issueType) 138 throws ScarabException; 139 140 void addIssueTypeWorkflowToModule(Module module, 141 IssueType issueType) 142 throws ScarabException; 143 144 void copyIssueTypeWorkflows(IssueType issueType, IssueType newIssueType) 145 throws ScarabException; 146 147 void resetAllWorkflowsForIssueType(Module module, 148 IssueType issueType) 149 throws ScarabException; 150 151 } 152 | Popular Tags |