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