com.atlassian.jira.workflow.condition
Class AbstractJiraCondition

java.lang.Object
  extended by com.atlassian.jira.workflow.WorkflowFunctionUtils
      extended by com.atlassian.jira.workflow.condition.AbstractJiraCondition
All Implemented Interfaces:
com.opensymphony.workflow.Condition
Direct Known Subclasses:
AllowOnlyAssignee, AllowOnlyReporter, CloseCondition, InGroupCFCondition, InProjectRoleCondition, PermissionCondition, ReferenceCondition, SubTaskBlockingCondition, UserInGroupCondition

public abstract class AbstractJiraCondition
extends WorkflowFunctionUtils
implements com.opensymphony.workflow.Condition

Abstract base class for all JIRA workflow Conditions.


Field Summary
 
Fields inherited from class com.atlassian.jira.workflow.WorkflowFunctionUtils
ORIGINAL_ISSUE_KEY, ORIGNAL_ISSUE_KEY
 
Constructor Summary
AbstractJiraCondition()
           
 
Method Summary
protected  Issue getIssue(Map transientVars)
          This method retrieves the original (unmodified) issue object that will be examined for the condition check.
 
Methods inherited from class com.atlassian.jira.workflow.WorkflowFunctionUtils
getCaller, getCallerName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.opensymphony.workflow.Condition
passesCondition
 

Constructor Detail

AbstractJiraCondition

public AbstractJiraCondition()
Method Detail

getIssue

protected Issue getIssue(Map transientVars)
                  throws DataAccessException
This method retrieves the original (unmodified) issue object that will be examined for the condition check. In order to avoid multiple calls to the database to retrieve this object - include the original issue object in the map passed - transientVars - for example: GenericValue origianlIssueGV = ComponentAccessor.getIssueManager().getIssue(issue.getId()); fields.put(AbstractJiraCondition.ORIGNAL_ISSUE_KEY, IssueImpl.getIssueObject(origianlIssueGV)); If this method is overwriten, the logic should accommodate the retrieval of the original issue object.

Parameters:
transientVars - see Condition.passesCondition(java.util.Map, java.util.Map, com.opensymphony.module.propertyset.PropertySet)
Returns:
the original issue object
Throws:
DataAccessException - If for some reason the issue doesn't exist.


Copyright © 2002-2012 Atlassian. All Rights Reserved.