Mercurial > public > JIRA
comparison ssdt-jira-plugins-v2/plugins/src/main/java/org/nwoca/ssdt/jira/BlockFixedResolutionValidator.java @ 0:92d945347fc0
V2 of the SSDT JIRA Plugins. Uses new Maven 2 based project. Created
for JIRA 3.12.
author | smith |
---|---|
date | Tue, 20 May 2008 17:11:35 -0400 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:92d945347fc0 |
---|---|
1 /* | |
2 * RequireDocumentIssueValidator.java | |
3 * | |
4 * Created on May 14, 2007, 1:04 PM | |
5 * | |
6 * To change this template, choose Tools | Template Manager | |
7 * and open the template in the editor. | |
8 */ | |
9 | |
10 package org.nwoca.ssdt.jira; | |
11 | |
12 import com.atlassian.jira.ComponentManager; | |
13 import com.atlassian.jira.ManagerFactory; | |
14 import com.atlassian.jira.issue.Issue; | |
15 import com.atlassian.jira.issue.MutableIssue; | |
16 import com.atlassian.jira.issue.fields.CustomField; | |
17 import com.atlassian.jira.issue.link.IssueLink; | |
18 import com.atlassian.jira.issue.link.IssueLinkManager; | |
19 import com.atlassian.jira.workflow.WorkflowActionsBean; | |
20 import com.opensymphony.module.propertyset.PropertySet; | |
21 import com.opensymphony.workflow.InvalidInputException; | |
22 import com.opensymphony.workflow.Validator; | |
23 import com.opensymphony.workflow.WorkflowException; | |
24 import java.util.Collection; | |
25 import java.util.List; | |
26 import java.util.Map; | |
27 | |
28 /** | |
29 * Validator blocks Fixed resolution. Use for Workflow steps where "fixed" is | |
30 *not appropriate. | |
31 * | |
32 * @author SMITH | |
33 */ | |
34 public class BlockFixedResolutionValidator implements Validator { | |
35 | |
36 | |
37 /** | |
38 * Creates a new instance of RequireDocumentIssueValidator. | |
39 */ | |
40 public BlockFixedResolutionValidator() { | |
41 } | |
42 | |
43 public void validate(Map transientVars, Map args, PropertySet ps) | |
44 throws InvalidInputException, WorkflowException { | |
45 | |
46 Issue issue = (Issue) transientVars.get("issue"); | |
47 if ("Fixed".equalsIgnoreCase(issue.getResolutionObject().getName()) ) { | |
48 throw new InvalidInputException("Can not use 'Fixed' resolution at this step"); | |
49 } | |
50 | |
51 } | |
52 | |
53 } |