public abstract class AbstractIssueSelectAction extends IssueActionSupport implements IssueSummaryAware
JiraWebActionSupport.MessageType
ErrorCollection.Reason
I18nHelper.BeanFactory
Modifier and Type | Field and Description |
---|---|
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 |
attachmentManager
projectManager
ISSUE_NOT_FOUND_RESULT, PERMISSION_VIOLATION_RESULT, request, RETURN_URL_PARAMETER, savedFilters
log
Modifier | Constructor and Description |
---|---|
protected |
AbstractIssueSelectAction()
Our terrible action hierarchy makes this call necessary
|
protected |
AbstractIssueSelectAction(SubTaskManager subTaskManager) |
Modifier and Type | Method and Description |
---|---|
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.
|
Issue |
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
|
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.
|
MutableIssue |
getMutableIssue() |
Issue |
getParentIssueObject()
Returns the parent of the current
Issue |
Project |
getProject() |
Project |
getProjectObject() |
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 Issue |
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
|
void |
setId(Long id)
Set the the current issue by its id.
|
protected Issue |
setIssueObject(Issue 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) |
addIssueToHistory, getAttachmentManager, getCurrentDateTimeInUsersTimezone, getCurrentFailedLoginCount, getCurrentJQL, getCustomFieldManager, getDaysPerWeek, getEverLoggedIn, getFormToken, getHoursPerDay, getIssueManager, getLastFailedLogin, getLastLogin, getLoginCount, getPossibleVersions, getPossibleVersionsReleasedFirst, getPrettyDuration, getPreviousLogin, getSearchRequest, getSelectedIssueId, getSessionPagerFilterManager, getSessionSearchRequestManager, getSessionSearchRequestManagerFactory, getSessionSelectedIssueManager, getTotalFailedLoginCount, getUrlEncoded, getWorkflow, getWorkflowTransitionDescription, getWorkflowTransitionDisplayName, isCustomFieldHidden, isElevatedSecurityCheckRequired, isFieldHidden, isFieldHidden, isTimeTrackingEnabled, setFormToken, setSearchRequest, setSelectedIssueId, updateSearchRequest
getBrowsableProjects, getSelectedProjectId, setSelectedProject, setSelectedProject
addError, addErrorCollection, addErrorMessage, addErrorMessageByKeyIfAbsent, addErrorMessageIfAbsent, addMessageToResponse, addReason, addReasons, forceRedirect, getAdministratorContactLink, getApplicationProperties, getAuthorizationSupport, getConglomerateCookieValue, getConstantsManager, getDateFormat, getDateTimeFormat, getDateTimeFormatter, getDescTranslation, getDescTranslation, getDmyDateFormatter, getEmptyResponse, getErrorMessages, getErrors, getField, getFlushedErrorMessages, getGlobalPermissionManager, getHint, getHintManager, getHttpRequest, getHttpResponse, getHttpSession, getJiraContactHelper, getJiraServiceContext, getLanguage, getLoggedInApplicationUser, getLoggedInUser, getNameTranslation, getNameTranslation, getOutlookDate, getPermissionManager, getProjectManager, getRandomHint, getReasons, getRedirect, getRedirect, getRedirectSanitiser, getRequestSourceType, getReturnUrl, getReturnUrlForCancelLink, getSearchSortDescriptions, getSelectedProject, getSelectedProjectObject, getServerId, getServletContext, getTimeFormat, getUriValidator, getUserFullName, getUserManager, getUserProjectHistoryManager, getVersionManager, getWebworkStack, getWebworkStack, getXsrfToken, hasErrorMessage, hasErrorMessageByKey, hasGlobalPermission, hasGlobalPermission, hasIssuePermission, hasIssuePermission, hasIssuePermission, hasPermission, hasProjectPermission, hasProjectPermission, htmlEncode, insertContextPath, isInlineDialogMode, isSystemAdministrator, isUserExists, isUserExistsByKey, isUserExistsByName, returnComplete, returnComplete, returnCompleteWithInlineRedirect, returnCompleteWithInlineRedirectAndMsg, returnCompleteWithInlineRedirectAndMsg, returnMsgToUser, returnMsgToUser, setConglomerateCookieValue, setInline, setReasons, setReturnUrl, setSelectedProjectId, tagMauEventWithApplication, tagMauEventWithProject, urlEncode
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getI18nHelper, getKeysForPrefix, getLocale, getOfBizDelegator, getResourceBundle, getResult, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getUnescapedText, getUntransformedRawText, getUserPreferences, hasAnyErrors, isIndexing, isKeyDefined, removeKeyOrAddError
addError, doDefault, doExecute, doValidation, getCommandName, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, getTimezone, invalidInput, invokeCommand, isCommand, setCommand, setErrorMessages, setErrors, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getLoggedInApplicationUser
addError, addErrorMessages, addErrors, hasAnyErrors, setErrorMessages
public static final String ISSUE_PERMISSION_ERROR
public static final String PREPOPULATED_ISSUE_OBJECT
protected Long id
protected AbstractIssueSelectAction()
protected AbstractIssueSelectAction(SubTaskManager subTaskManager)
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 issueIssueNotFoundException
- if the issue does not existgetIssueObject()
@Nonnull public Issue 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 issueIssueNotFoundException
- if the issue does not existgetIssue()
@Nonnull public MutableIssue getMutableIssue() throws IssueNotFoundException, IssuePermissionException
protected Issue refreshIssueObject()
You can call this method to refresh the issueObject back to the current issueGV value.
protected MutableIssue getIssueObjectWithoutDatabaseRead()
We need this because the CreateIssue variants dont have an issue to read and use this mechanims to make the create happen. The code instatiates an empty unsaved MutableIssue on create and clone and the like.
This kinda sucks BUT here we are.
public Long getId()
public String getKey()
protected Issue setIssueObject(@Nullable Issue issueObject)
issueObject
- the MutableIssue that has been created or read from the databasepublic void setId(Long id)
id
- Eg. from Issue.getId()
public void setKey(String key)
key
- Issue key.public Project getProject()
public Project getProjectObject()
public org.ofbiz.core.entity.GenericValue getSecurityLevel(Long id) throws Exception
Exception
public String getViewIssueKey()
public void setViewIssueKey(String viewIssueKey)
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()
Since 3.4, we also need to check whether the project has any sub-task issue types
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 existIssuePermissionException
- if the calling user does not have permission to
view the issueisIssueValid()
Copyright © 2002-2017 Atlassian. All Rights Reserved.