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, Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
AbstractViewIssue, AbstractWorklogAction, CreateIssue, DeleteAttachment, ManageLinks, ManageTrackbacks, ManageWatchers, SimpleWorkflowAction, ViewVoters

public abstract class AbstractIssueSelectAction
extends IssueActionSupport
implements IssueSummaryAware

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

TODO: Test this class thoroughly - especially setKey()

See Also:
Serialized Form

Field Summary
protected  Long id
           
 
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, savedFilters, selectedProject
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface com.atlassian.jira.util.I18nHelper
DEFAULT_RESOURCE_BUNDLE
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
AbstractIssueSelectAction()
           
 
Method Summary
 Long getDefaultSecurityLevel()
          Get the default security level for issues within the current project
 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()
           
 String getIssuePath()
          Return a context-relative URL to this issue.
protected  String getKey()
          Get key of current issue.
 IssueSummaryLayoutBean getLayoutBean()
          Get the default layout bean for most actions.
 org.ofbiz.core.entity.GenericValue getProject()
           
 org.ofbiz.core.entity.GenericValue getSecurityLevel()
           
 org.ofbiz.core.entity.GenericValue getSecurityLevel(Long id)
           
 String getSecurityLevelName()
           
 Map getSecurityLevels()
          Deprecated. UserAccessor is no longer used and is scheduled for removal in v4.0
 Map getSecurityLevels(org.ofbiz.core.entity.GenericValue project)
          Deprecated. UserAccessor is no longer used and is scheduled for removal in v4.0
 Issue getSummaryIssue()
          This is used by the issue summary decorator to add the left-hand side decoration.
 String getViewIssueKey()
           
protected  String getViewUrl()
           
 boolean isEditable()
          Determine whether the current user can edit or resolve this issue
 boolean isEditable(Issue issue)
          Determine whether the current user can edit or resolve the passed issue.
 boolean isHasEditIssuePermission(Issue issue)
           
 boolean isIssueExists()
           
protected  boolean isWorkflowAllowsEdit(Issue issue)
           
protected  String redirectToView()
           
protected  void resetIssue()
           
 void setId(Long id)
          Set the the current issue by its id.
 void setIssue(org.ofbiz.core.entity.GenericValue issue)
           
 void setKey(String key)
          Set current issue by its key.
 void setViewIssueKey(String viewIssueKey)
           
 
Methods inherited from class com.atlassian.jira.web.action.IssueActionSupport
getAttachmentManager, getCustomFieldManager, getDaysPerWeek, getHoursPerDay, getIssueManager, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getSearchRequest, getUrlEncoded, getWorkflow, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isFieldHidden, isFieldHidden, isFieldHidden, setCurrentIssue, setSearchRequest, 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, forceRedirect, getAssignableUsers, getAssignableUsers, getCachedGroups, getComponentManager, getConstantsManager, getDateFormat, getDateTimeFormat, getDescTranslation, getExternalLinkUtils, getField, getFlushedErrorMessages, getGlobalPermissionManager, getJiraServiceContext, getLanguage, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getPropertySet, getRedirect, getRemoteUser, getReturnUrl, getSearchSortReverseDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getText, getTimeFormat, getUserFullName, getVersionManager, getWebworkStack, getWebworkStack, htmlEncode, isHasIssuePermission, isHasIssuePermission, isHasPermission, isHasPermission, isHasPermission, isHasProjectPermission, isHasProjectPermission, isSystemAdministrator, isUserExists, setReturnUrl, setSelectedProjectId
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getApplicationProperties, getDefaultResourceBundle, getDelegator, getJiraLocaleUtils, getLocale, getResult, getText, getText, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isEnterprise, isIndexing, isProfessional, isProfessionalOrEnterprise, isStandard, 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
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
setCommand
 

Field Detail

id

protected Long id
Constructor Detail

AbstractIssueSelectAction

public AbstractIssueSelectAction()
Method Detail

isIssueExists

public boolean isIssueExists()

getIssue

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

See Also:
getIssueObject()

setIssue

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

resetIssue

protected void resetIssue()

getId

public 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(Long id)
Set the the current issue by its id.

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

getKey

protected 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(String key)
Set current issue by its key.

Parameters:
key - Issue key.

getProject

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

getSecurityLevelName

public String getSecurityLevelName()
                            throws Exception
Throws:
Exception

getSecurityLevel

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

getSecurityLevel

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

getSecurityLevels

public Map getSecurityLevels()
                      throws Exception
Deprecated. UserAccessor is no longer used and is scheduled for removal in v4.0

Get the different levels of security that can be set for this issue

Returns:
Map containing the security levels
Throws:
Exception - Exception

getSecurityLevels

public Map getSecurityLevels(org.ofbiz.core.entity.GenericValue project)
                      throws Exception
Deprecated. UserAccessor is no longer used and is scheduled for removal in v4.0

Get the different levels of security that can be set for this project

Parameters:
project - project
Returns:
Map containing the security levels
Throws:
Exception - Exception

getDefaultSecurityLevel

public Long getDefaultSecurityLevel()
                             throws Exception
Get the default security level for issues within the current project

Returns:
The id of the security level
Throws:
Exception

getViewIssueKey

public String getViewIssueKey()

setViewIssueKey

public void setViewIssueKey(String viewIssueKey)

redirectToView

protected String redirectToView()
                         throws Exception
Throws:
Exception

getViewUrl

protected String getViewUrl()

getIssuePath

public String getIssuePath()
Return a context-relative URL to this issue.


isEditable

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


isEditable

public boolean isEditable(Issue issue)
Determine whether the current user can edit or resolve the passed issue.


isHasEditIssuePermission

public boolean isHasEditIssuePermission(Issue issue)

isWorkflowAllowsEdit

protected boolean isWorkflowAllowsEdit(Issue issue)

getIssueObject

public MutableIssue getIssueObject()
Returns the current Issue.

See Also:
getIssue()

getIssueObjectNoSecurityCheck

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

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


Copyright © 2002-2009 Atlassian. All Rights Reserved.