com.pyxis.greenhopper.jira.actions
Class AbstractIssueSelectAction

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
          extended by com.atlassian.jira.web.action.JiraWebActionSupport
              extended by com.pyxis.greenhopper.jira.actions.ProjectActionSupport
                  extended by com.pyxis.greenhopper.jira.actions.IssueActionSupport
                      extended by com.pyxis.greenhopper.jira.actions.AbstractIssueSelectAction
All Implemented Interfaces:
com.atlassian.jira.util.ErrorCollection, com.atlassian.jira.util.I18nHelper, com.atlassian.jira.web.action.issue.IssueSummaryAware, com.atlassian.jira.web.util.AuthorizationSupport, java.io.Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
AbstractBoardAction

public abstract class AbstractIssueSelectAction
extends IssueActionSupport
implements com.atlassian.jira.web.action.issue.IssueSummaryAware

An abstract action that should be extended by any action which wants to 'select' an issue

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.ErrorCollection
com.atlassian.jira.util.ErrorCollection.Reason
 
Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper
com.atlassian.jira.util.I18nHelper.BeanFactory
 
Field Summary
protected  java.lang.Long id
           
protected  com.atlassian.jira.issue.MutableIssue issueObject
           
 
Fields inherited from class com.pyxis.greenhopper.jira.actions.IssueActionSupport
attachmentManager
 
Fields inherited from class com.pyxis.greenhopper.jira.actions.ProjectActionSupport
projectManager
 
Fields inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
protected AbstractIssueSelectAction()
          Our terrible action hierarchy makes this call necessary
protected AbstractIssueSelectAction(com.atlassian.jira.config.SubTaskManager subTaskManager)
           
 
Method Summary
 boolean cameFromIssue()
           
 boolean cameFromParent()
           
 java.lang.Long getId()
          Get Id of current issue.
 org.ofbiz.core.entity.GenericValue getIssue()
          Gets the current issue's GenericValue.
 com.atlassian.jira.issue.MutableIssue getIssueObject()
          Returns the current Issue.
 com.atlassian.jira.issue.Issue getIssueObjectNoSecurityCheck()
           
 java.lang.String getIssuePath()
          Gets the relative path to the current issue.
protected  java.lang.String getKey()
          Get key of current issue.
 com.atlassian.jira.web.component.issuesummary.IssueSummaryLayoutBean getLayoutBean()
          Get the default layout bean for most actions.
 com.atlassian.jira.issue.Issue getParentIssueObject()
          Returns the parent of the current Issue
 org.ofbiz.core.entity.GenericValue getProject()
           
 org.ofbiz.core.entity.GenericValue getSecurityLevel()
           
 org.ofbiz.core.entity.GenericValue getSecurityLevel(java.lang.Long id)
           
 java.lang.String getSecurityLevelName()
           
protected  com.atlassian.jira.config.SubTaskManager getSubTaskManager()
           
 com.atlassian.jira.issue.Issue getSummaryIssue()
          This is used by the issue summary decorator to add the left-hand side decoration.
 java.lang.String getViewIssueKey()
           
 java.lang.String getViewUrl()
          Gets the relative path to the current issue.
 boolean isEditable()
          Determines whether the current user can edit or resolve this issue.
 boolean isEditable(com.atlassian.jira.issue.Issue issue)
          Determines whether the current user can edit or resolve an specified issue.
 boolean isHasEditIssuePermission(com.atlassian.jira.issue.Issue issue)
           
 boolean isIssueExists()
           
 boolean isIssueValid()
          In comparison to isIssueExists() this method performs a permission check and returns true if the issue exists and the user has sufficient permissions.
 boolean isSubTask()
          Determines whether the issue is a sub task - i.e.
 boolean isSubTaskCreatable()
          Tests whether the sub-tasks are turned on and whether the the current issue is a 'parent' issue, i.e.
 boolean isWorkflowAllowsEdit(com.atlassian.jira.issue.Issue issue)
           
protected  java.lang.String redirectToView()
           
protected  void resetIssue()
           
 void setId(java.lang.Long id)
          Set the the current issue by its id.
 void setIssue(org.ofbiz.core.entity.GenericValue issue)
           
 void setKey(java.lang.String key)
          Set current issue by its key.
 void setViewIssueKey(java.lang.String viewIssueKey)
           
 
Methods inherited from class com.pyxis.greenhopper.jira.actions.IssueActionSupport
clearSelectedIssue, getAttachmentManager, getCurrentFailedLoginCount, getCurrentJQL, getCustomFieldManager, getDaysPerWeek, getEverLoggedIn, getHoursPerDay, getIssueManager, getLastFailedLogin, getLastLogin, getLoginCount, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getPreviousLogin, getSearchRequest, getSelectedIssueId, getSessionPagerFilterManager, getSessionSearchRequestManager, getSessionSearchRequestManagerFactory, getSessionSelectedIssueManager, getTotalFailedLoginCount, getUrlEncoded, getWorkflow, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isElevatedSecurityCheckRequired, isFieldHidden, isFieldHidden, isFieldHidden, isTimeTrackingEnabled, setCurrentIssue, setSearchRequest, setSelectedIssueId, updateSearchRequest
 
Methods inherited from class com.pyxis.greenhopper.jira.actions.ProjectActionSupport
escapeJavaScript, getHtmlEncodedText, getI18n, getSelectedProjectId, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, htmlEncode, setSelectedProject, setSelectedProject
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addReason, addReasons, forceRedirect, getAdministratorContactLink, getApplicationProperties, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDescTranslation, getDmyDateFormatter, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraContactHelper, getJiraServiceContext, getLanguage, getLoggedInUser, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirectChecker, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getTimeFormat, getUriValidator, getUserFullName, getUserManager, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, insertContextPath, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getDelegator, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getRemoteUser, getResult, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isIndexing, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, doDefault, doExecute, doValidation, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.web.action.issue.IssueSummaryAware
getLoggedInUser
 
Methods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Field Detail

id

protected java.lang.Long id

issueObject

protected com.atlassian.jira.issue.MutableIssue issueObject
Constructor Detail

AbstractIssueSelectAction

protected AbstractIssueSelectAction()
Our terrible action hierarchy makes this call necessary


AbstractIssueSelectAction

protected AbstractIssueSelectAction(com.atlassian.jira.config.SubTaskManager subTaskManager)
Method Detail

isIssueExists

public boolean isIssueExists()

isIssueValid

public boolean isIssueValid()
In comparison to isIssueExists() this method performs a permission check and returns true if the issue exists and the user has sufficient permissions.

Returns:
true if the issue exists and the user has sufficient permissions otherwise false.

getIssue

public org.ofbiz.core.entity.GenericValue getIssue()
Gets the current issue's GenericValue.

Returns:
A generic value which contains the data of the current issue.
See Also:
getIssueObject()

setIssue

public void setIssue(org.ofbiz.core.entity.GenericValue issue)

resetIssue

protected void resetIssue()

getId

public java.lang.Long getId()
                     throws org.ofbiz.core.entity.GenericEntityException
Get Id of current issue.

Returns:
Integer Id, or null if issue not set
Throws:
org.ofbiz.core.entity.GenericEntityException

setId

public void setId(java.lang.Long id)
Set the the current issue by its id.

Parameters:
id - Eg. from Issue.getId()

getKey

protected java.lang.String getKey()
                           throws org.ofbiz.core.entity.GenericEntityException
Get key of current issue.

Returns:
Issue key, or null if not set
Throws:
org.ofbiz.core.entity.GenericEntityException

setKey

public void setKey(java.lang.String key)
Set current issue by its key.

Parameters:
key - Issue key.

getProject

public org.ofbiz.core.entity.GenericValue getProject()

getSecurityLevelName

public java.lang.String getSecurityLevelName()
                                      throws java.lang.Exception
Throws:
java.lang.Exception

getSecurityLevel

public org.ofbiz.core.entity.GenericValue getSecurityLevel()
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getSecurityLevel

public org.ofbiz.core.entity.GenericValue getSecurityLevel(java.lang.Long id)
                                                    throws java.lang.Exception
Throws:
java.lang.Exception

getViewIssueKey

public java.lang.String getViewIssueKey()

setViewIssueKey

public void setViewIssueKey(java.lang.String viewIssueKey)

redirectToView

protected java.lang.String redirectToView()
                                   throws java.lang.Exception
Throws:
java.lang.Exception

getViewUrl

public java.lang.String getViewUrl()
Gets the relative path to the current issue. It does not include the context path.

Returns:
The relative path to the current issue.

getIssuePath

public java.lang.String getIssuePath()
Gets the relative path to the current issue. It does not include the context path.

Returns:
The relative path to the current issue.

isEditable

public boolean isEditable()
Determines whether the current user can edit or resolve this issue.

Returns:
whether the current user can edit or resolve this issue.

isEditable

public boolean isEditable(com.atlassian.jira.issue.Issue issue)
Determines whether the current user can edit or resolve an specified issue.

Parameters:
issue - The issue in play.
Returns:
whether the current user can edit or resolve an specified issue.

isHasEditIssuePermission

public boolean isHasEditIssuePermission(com.atlassian.jira.issue.Issue issue)

isWorkflowAllowsEdit

public boolean isWorkflowAllowsEdit(com.atlassian.jira.issue.Issue issue)

getIssueObject

public com.atlassian.jira.issue.MutableIssue getIssueObject()
Returns the current Issue.

Returns:
The current issue.
See Also:
getIssue()

getIssueObjectNoSecurityCheck

public com.atlassian.jira.issue.Issue getIssueObjectNoSecurityCheck()
                                                             throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

cameFromIssue

public boolean cameFromIssue()

cameFromParent

public boolean cameFromParent()

getSummaryIssue

public com.atlassian.jira.issue.Issue getSummaryIssue()
This is used by the issue summary decorator to add the left-hand side decoration.

Specified by:
getSummaryIssue in interface com.atlassian.jira.web.action.issue.IssueSummaryAware

getLayoutBean

public com.atlassian.jira.web.component.issuesummary.IssueSummaryLayoutBean getLayoutBean()
Get the default layout bean for most actions. This will work for 99% of actions, but specific actions may want different views, and can override this method.

Specified by:
getLayoutBean in interface com.atlassian.jira.web.action.issue.IssueSummaryAware

getSubTaskManager

protected com.atlassian.jira.config.SubTaskManager getSubTaskManager()

isSubTask

public boolean isSubTask()
Determines whether the issue is a sub task - i.e. if it has any incoming sub-task issue links

Returns:
whether the issue is a sub task.

isSubTaskCreatable

public boolean isSubTaskCreatable()
Tests whether the sub-tasks are turned on and whether the the current issue is a 'parent' issue, i.e. it is not a sub-task, as we do not allow a sub-task hierarchy. Also test whether the user has CREATE issue permission for the current project. Sub-tasks are always created in the same project as its parent issue.

Since 3.4, we also need to check whether the project has any sub-task issue types


getParentIssueObject

public com.atlassian.jira.issue.Issue getParentIssueObject()
Returns the parent of the current Issue

Returns:
the parent issue object


Copyright © 2007-2013 Atlassian. All Rights Reserved.