View Javadoc

1   package com.atlassian.jira.workflow.function;
2   
3   import java.util.Map;
4   
5   import com.atlassian.jira.issue.MutableIssue;
6   import com.atlassian.jira.issue.fields.screen.FieldScreen;
7   import com.atlassian.jira.web.bean.I18nBean;
8   import com.opensymphony.module.propertyset.PropertySet;
9   import com.opensymphony.workflow.InvalidInputException;
10  import com.opensymphony.workflow.WorkflowException;
11  import com.opensymphony.workflow.loader.ActionDescriptor;
12  
13  public interface ITransitionFunction {
14  
15  	/** Assume Validator initialisation   
16  	 * @param transientVars
17  	 * @param args Arguments issued from Validator Parameters in from Workflow Description
18  	 * @param ps PorpertySet
19  	 * @throws InvalidInputException
20  	 * @throws WorkflowException
21  	 */
22  	public void init(Map transientVars, Map args, PropertySet ps) throws InvalidInputException, WorkflowException;
23  
24  	
25  	public FieldScreen getScreen();
26  	
27  	public ActionDescriptor getActionDescriptor(final Map transientVars);
28  
29  //	public FieldScreen getScreen(final Map transientVars);
30  	
31  	/**
32  	 * @return Issue concerned by the Validation
33  	 */
34  	public MutableIssue getIssue();
35  
36  	/**
37  	 * @return Issue concerned by the Validation
38  	 */
39  	public MutableIssue getIssue(final Map transientVars);
40  
41  	/**
42  	 * @return I18Bean in dependence with called validator
43  	 */	
44  	public I18nBean getI18nBean();
45  
46  	/** Defaultly called by ATransitionFunction.validate()  
47  	 * @throws InvalidInputException
48  	 */
49  	public void throwOnError() throws InvalidInputException;
50  
51  //	public void setError(String fieldId, String errmsg);
52  //	
53  //	public void setError(Field field, String errmsg);
54  	
55  	/**
56  	 * @return inner Exception built occured during validation
57  	 */
58  	public InvalidInputException getInvalidInputException();
59  
60  	/** Force Exception on Validator
61  	 * @param invalidInputException
62  	 */
63  	public void setInvalidInputException(InvalidInputException invalidInputException);
64  	
65  }