|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object webwork.action.ActionSupport com.atlassian.jira.action.JiraActionSupport com.atlassian.jira.web.action.JiraWebActionSupport com.atlassian.jira.web.action.ProjectActionSupport com.atlassian.jira.web.action.IssueActionSupport com.atlassian.jira.web.action.issue.AbstractIssueSelectAction
public abstract class AbstractIssueSelectAction
An abstract action that should be extended by any action which wants to 'select' an issue
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.atlassian.jira.web.action.JiraWebActionSupport |
---|
JiraWebActionSupport.MessageType |
Nested classes/interfaces inherited from interface com.atlassian.jira.util.ErrorCollection |
---|
ErrorCollection.Reason |
Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper |
---|
I18nHelper.BeanFactory |
Field Summary | |
---|---|
protected Long |
id
|
static String |
ISSUE_PERMISSION_ERROR
This is used by subclasses to indicate that the issue is not valid because the caller does not have permission to view it. |
static String |
PREPOPULATED_ISSUE_OBJECT
|
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 | |
---|---|
void |
addErrorMessage(String message)
Add error message relating to system state (not field-specific). |
protected void |
assertIssueIsValid()
Ensures that the current issue is valid for the calling user. |
boolean |
cameFromIssue()
|
boolean |
cameFromParent()
|
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 . |
protected MutableIssue |
getIssueObjectWithoutDatabaseRead()
This can be called by sub class to read the current value of the issueObject variable WITHOUT causing a database read We need this because the CreateIssue variants dont have an issue to read and use this mechanims to make the create happen. |
String |
getIssuePath()
Gets the relative path to the current issue. |
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(Long id)
|
protected SubTaskManager |
getSubTaskManager()
|
Issue |
getSummaryIssue()
This is used by the issue summary decorator to add the left-hand side decoration. |
String |
getViewIssueKey()
|
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 String |
redirectToView()
|
protected MutableIssue |
refreshIssueObject()
Because some of the code works on the issueGV object (such as voting code) directly the issueObject variable representation can get out of synch with the underlying GV You can call this method to refresh the issueObject back to the current issueGV value. |
void |
setId(Long id)
Set the the current issue by its id. |
protected MutableIssue |
setIssueObject(MutableIssue issueObject)
Once this is called, the underlying issueGV and id and key will be updated to reflect the issue in play. |
void |
setKey(String key)
Set current issue by its key. |
void |
setViewIssueKey(String viewIssueKey)
|
Methods inherited from class com.atlassian.jira.web.action.ProjectActionSupport |
---|
getBrowsableProjects, getBrowseableProjects, getSelectedProjectId, setSelectedProject, setSelectedProject |
Methods inherited from class com.atlassian.jira.action.JiraActionSupport |
---|
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getDelegator, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getRemoteUser, getResourceBundle, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, getUserPreferences, getWatcherManager, hasAnyErrors, isIndexing, isKeyDefined, removeKeyOrAddError |
Methods inherited from class webwork.action.ActionSupport |
---|
addError, doDefault, doExecute, doValidation, getCommandName, 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, addErrorMessages, addErrors, hasAnyErrors, setErrorMessages |
Methods inherited from interface webwork.action.CommandDriven |
---|
getCommandName, setCommand |
Field Detail |
---|
public static final String ISSUE_PERMISSION_ERROR
public static final String PREPOPULATED_ISSUE_OBJECT
protected Long id
Constructor Detail |
---|
protected AbstractIssueSelectAction()
protected AbstractIssueSelectAction(SubTaskManager subTaskManager)
Method Detail |
---|
public boolean isIssueExists()
public boolean isIssueValid()
@Nonnull public org.ofbiz.core.entity.GenericValue getIssue() throws IssueNotFoundException, IssuePermissionException
IssuePermissionException
- if the current user does not have permission to read the issue
IssueNotFoundException
- if the issue does not existgetIssueObject()
@Nonnull public MutableIssue getIssueObject() throws IssueNotFoundException, IssuePermissionException
Issue
. This method performs the same security checks as getIssue()
.
IssuePermissionException
- if the current user does not have permission to read the issue
IssueNotFoundException
- if the issue does not existgetIssue()
protected MutableIssue refreshIssueObject()
protected MutableIssue getIssueObjectWithoutDatabaseRead()
public Long getId()
public String getKey()
protected MutableIssue setIssueObject(@Nullable MutableIssue issueObject)
issueObject
- the MutableIssue that has been created or read from the database
public void setId(Long id)
id
- Eg. from Issue.getId()
public void setKey(String key)
key
- Issue key.public org.ofbiz.core.entity.GenericValue getProject()
public org.ofbiz.core.entity.GenericValue getSecurityLevel(Long id) throws Exception
Exception
public String getViewIssueKey()
public void setViewIssueKey(String viewIssueKey)
protected String redirectToView() throws Exception
Exception
public String getViewUrl()
context path
.
public String getIssuePath()
context path
.
public boolean isEditable()
public boolean isEditable(Issue issue)
issue
- The issue in play.
public boolean isHasEditIssuePermission(Issue issue)
public boolean isWorkflowAllowsEdit(Issue issue)
public boolean cameFromIssue()
public boolean cameFromParent()
public Issue getSummaryIssue()
getSummaryIssue
in interface IssueSummaryAware
public IssueSummaryLayoutBean getLayoutBean()
getLayoutBean
in interface IssueSummaryAware
protected SubTaskManager getSubTaskManager()
public boolean isSubTask()
public boolean isSubTaskCreatable()
public Issue getParentIssueObject()
Issue
public void addErrorMessage(String message)
ErrorCollection
addErrorMessage
in interface ErrorCollection
addErrorMessage
in class webwork.action.ActionSupport
message
- Error message.protected void assertIssueIsValid() throws IssueNotFoundException, IssuePermissionException
IssueNotFoundException
- if the issue does not exist
IssuePermissionException
- if the calling user does not have permission to
view the issueisIssueValid()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |