com.atlassian.jira.web.action.issue
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.atlassian.jira.web.action.ProjectActionSupport
                  extended by com.atlassian.jira.web.action.IssueActionSupport
                      extended by com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
All Implemented Interfaces:
ErrorCollection, I18nHelper, IssueSummaryAware, java.io.Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
AbstractViewIssue, AbstractWorklogAction, AttachTemporaryFile, CreateIssue, DeleteAttachment, DeleteComment, EditLabels, ManageLinks, ManageTrackbacks, ManageWatchers, SimpleWorkflowAction, ViewVoters, VoteOrWatchIssue

public abstract class AbstractIssueSelectAction
extends IssueActionSupport
implements 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.I18nHelper
I18nHelper.BeanFactory
 
Field Summary
protected  java.lang.Long id
           
protected  MutableIssue issueObject
           
 
Fields inherited from class com.atlassian.jira.web.action.IssueActionSupport
attachmentManager
 
Fields inherited from class com.atlassian.jira.web.action.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(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.
 MutableIssue getIssueObject()
          Returns the current 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.
 IssueSummaryLayoutBean getLayoutBean()
          Get the default layout bean for most actions.
 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  SubTaskManager getSubTaskManager()
           
 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(Issue issue)
          Determines whether the current user can edit or resolve an specified issue.
 boolean isHasEditIssuePermission(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(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.atlassian.jira.web.action.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.atlassian.jira.web.action.ProjectActionSupport
getBrowseableProjects, getBrowseableProjectsInCategory, getSelectedProjectId, setSelectedProject, setSelectedProject
 
Methods inherited from class com.atlassian.jira.web.action.JiraWebActionSupport
addErrorCollection, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, forceRedirect, getApplicationProperties, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRandomHint, getRedirect, getRemoteUser, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUriValidator, getUserFullName, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, htmlEncode, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isInlineDialogMode, isSystemAdministrator, isUserExists, returnComplete, returnComplete, returnCompleteWithInlineRedirect, setConglomerateCookieValue, setInline, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getDefaultResourceBundle, getDelegator, getKeysForPrefix, getLocale, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText0, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, removeKeyOrAddError
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, doDefault, doExecute, doValidation, getCommandName, 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
getRemoteUser
 
Methods inherited from interface com.atlassian.jira.util.ErrorCollection
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages
 
Methods inherited from interface webwork.action.CommandDriven
getCommandName, setCommand
 

Field Detail

id

protected java.lang.Long id

issueObject

protected MutableIssue issueObject
Constructor Detail

AbstractIssueSelectAction

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


AbstractIssueSelectAction

protected AbstractIssueSelectAction(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(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(Issue issue)

isWorkflowAllowsEdit

public boolean isWorkflowAllowsEdit(Issue issue)

getIssueObject

public MutableIssue getIssueObject()
Returns the current Issue.

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

getIssueObjectNoSecurityCheck

public Issue getIssueObjectNoSecurityCheck()
                                    throws org.ofbiz.core.entity.GenericEntityException
Throws:
org.ofbiz.core.entity.GenericEntityException

cameFromIssue

public boolean cameFromIssue()

cameFromParent

public boolean cameFromParent()

getSummaryIssue

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

Specified by:
getSummaryIssue in interface IssueSummaryAware
Returns:
The issue to display on the left hand side

getLayoutBean

public 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 IssueSummaryAware

getSubTaskManager

protected 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 Issue getParentIssueObject()
Returns the parent of the current Issue

Returns:
the parent issue object


Copyright © 2002-2010 Atlassian. All Rights Reserved.