|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectwebwork.action.ActionSupport
com.atlassian.jira.action.JiraActionSupport
com.atlassian.jira.web.action.JiraWebActionSupport
@NotThreadSafe public class JiraWebActionSupport
All web actions should extend this class - it provides basic common functionality for all web actions.
When adding to this class, be sure that what you are adding is used by a large number of actions - otherwise add it to a sub class of this.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper |
|---|
I18nHelper.BeanFactory |
| Field Summary | |
|---|---|
static String |
ISSUE_NOT_FOUND_RESULT
|
static String |
PERMISSION_VIOLATION_RESULT
|
protected javax.servlet.http.HttpServletRequest |
request
|
static String |
RETURN_URL_PARAMETER
|
protected Collection |
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 | |
|---|---|
JiraWebActionSupport()
|
|
| Method Summary | |
|---|---|
void |
addErrorCollection(ErrorCollection errors)
Populate this ErrorCollection with general and field-specific errors. |
protected void |
addErrorMessageByKeyIfAbsent(String errorMsgKey)
|
protected void |
addErrorMessageIfAbsent(String errorMsg)
|
protected String |
forceRedirect(String redirect)
This method will force a server redirect. |
ApplicationProperties |
getApplicationProperties()
|
Map |
getAssignableUsers(org.ofbiz.core.entity.GenericValue entity)
|
Map |
getAssignableUsers(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue issue)
|
ComponentManager |
getComponentManager()
Deprecated. |
String |
getConglomerateCookieValue(String cookieName,
String key)
Retrieve the value from a conglomerate Cookie from the request. |
ConstantsManager |
getConstantsManager()
|
String |
getDateFormat()
|
String |
getDateTimeFormat()
|
String |
getDescTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
|
static ExternalLinkUtil |
getExternalLinkUtils()
Deprecated. Use constructor injection to obtain an instance of this class in your actions. If for some reason you are unable to use dependency injection, use ComponentManager.getComponentInstanceOfType(Class) |
Field |
getField(String id)
|
Collection<String> |
getFlushedErrorMessages()
Get error messages, then get rid of them. |
protected GlobalPermissionManager |
getGlobalPermissionManager()
|
Hint |
getHint(String context)
|
protected HintManager |
getHintManager()
|
JiraServiceContext |
getJiraServiceContext()
Provides a service context with the current user which contains this action as its ErrorCollection. |
String |
getLanguage()
|
com.atlassian.crowd.embedded.api.User |
getLoggedInUser()
|
String |
getNameTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
|
OutlookDate |
getOutlookDate()
|
protected PermissionManager |
getPermissionManager()
|
ProjectManager |
getProjectManager()
|
com.opensymphony.module.propertyset.PropertySet |
getPropertySet(org.ofbiz.core.entity.GenericValue gv)
|
Hint |
getRandomHint()
|
String |
getRedirect(String defaultUrl)
Get a definitive result with a redirect upon success. |
protected SafeRedirectChecker |
getRedirectChecker()
|
User |
getRemoteUser()
Deprecated. |
String |
getReturnUrl()
|
String |
getReturnUrlForCancelLink()
The cancel links should not included the selectedIssueId, otherwise when returning to the issue navigator an issue updated notification will be shown. |
List<String> |
getSearchSortDescriptions(SearchRequest searchRequest)
|
org.ofbiz.core.entity.GenericValue |
getSelectedProject()
Gets the "active" project. |
Project |
getSelectedProjectObject()
|
String |
getServerId()
|
String |
getTimeFormat()
|
UriValidator |
getUriValidator()
|
String |
getUserFullName(String username)
|
protected UserProjectHistoryManager |
getUserProjectHistoryManager()
|
VersionManager |
getVersionManager()
|
String |
getWebworkStack()
For debugging JSPs; prints the webwork stack. |
String |
getWebworkStack(String selected)
For debugging JSPs; prints the webwork stack, highlighting the specified node. |
String |
getXsrfToken()
|
protected boolean |
hasErrorMessage(String errorMsg)
|
protected boolean |
hasErrorMessageByKey(String errorMsgKey)
|
String |
htmlEncode(String encodeMe)
Convenience instance method to call static utility from webwork EL. |
protected String |
insertContextPath(String url)
Prepends the context path to the URL if it begins with a forward slash (this is commonly used for redirects within a JIRA instance). |
boolean |
isHasIssuePermission(int permissionsId,
org.ofbiz.core.entity.GenericValue issue)
|
boolean |
isHasIssuePermission(String permName,
org.ofbiz.core.entity.GenericValue issue)
|
boolean |
isHasPermission(int permissionsId)
|
boolean |
isHasPermission(String permName)
|
boolean |
isHasPermission(String permName,
org.ofbiz.core.entity.GenericValue entity)
Deprecated. |
boolean |
isHasProjectPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project)
|
boolean |
isHasProjectPermission(String permName,
org.ofbiz.core.entity.GenericValue project)
|
boolean |
isInlineDialogMode()
This returns true if the action has been invoked as an inline dialog. |
boolean |
isSystemAdministrator()
|
boolean |
isUserExists(String username)
|
String |
returnComplete()
|
String |
returnComplete(String url)
|
protected String |
returnCompleteWithInlineRedirect(String url)
This will return success response with body containing url to redirect. |
void |
setConglomerateCookieValue(String cookieName,
String key,
String value)
Set the value key/value pair in a conglomerate Cookie. |
void |
setInline(boolean inline)
This is the web parameter setter for invoking an action as an inline dialog |
void |
setReturnUrl(String returnUrl)
|
void |
setSelectedProjectId(Long id)
|
| Methods inherited from class com.atlassian.jira.action.JiraActionSupport |
|---|
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getComponentInstanceOfType, getDefaultResourceBundle, getDelegator, getI18nHelper, getKeysForPrefix, getLocale, getResult, getText, getText, getText, getText, getText, getText, getText, getText, 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, 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.util.ErrorCollection |
|---|
addError, addErrorMessage, addErrorMessages, addErrors, getErrorMessages, getErrors, hasAnyErrors, setErrorMessages |
| Methods inherited from interface webwork.action.CommandDriven |
|---|
getCommandName, setCommand |
| Field Detail |
|---|
public static final String RETURN_URL_PARAMETER
public static final String PERMISSION_VIOLATION_RESULT
public static final String ISSUE_NOT_FOUND_RESULT
protected javax.servlet.http.HttpServletRequest request
protected Collection savedFilters
| Constructor Detail |
|---|
public JiraWebActionSupport()
| Method Detail |
|---|
@Deprecated public ComponentManager getComponentManager()
ComponentManager. Do not use this, please use constructor injection in
your actions. Otherwise, if for some reason you are unable to use dependency injection user JiraActionSupport.getComponentInstanceOfType(Class).
ComponentManager.public com.atlassian.crowd.embedded.api.User getLoggedInUser()
getLoggedInUser in class JiraActionSupport@Deprecated public User getRemoteUser()
getRemoteUser in class JiraActionSupportpublic String getXsrfToken()
public ApplicationProperties getApplicationProperties()
getApplicationProperties in class JiraActionSupportpublic UriValidator getUriValidator()
protected SafeRedirectChecker getRedirectChecker()
protected GlobalPermissionManager getGlobalPermissionManager()
protected PermissionManager getPermissionManager()
protected UserProjectHistoryManager getUserProjectHistoryManager()
public ConstantsManager getConstantsManager()
public ProjectManager getProjectManager()
public VersionManager getVersionManager()
public OutlookDate getOutlookDate()
protected final HintManager getHintManager()
public String getRedirect(String defaultUrl)
Action.ERROR if there are error messages, otherwise redirects to another URL if successful. If URL
starts with '/', interpreted as context-relative
Since 3.1 now redirects to a the "returnUrl" if one exists. Will clear this value once this occurs
defaultUrl - default URL to redirect to
protected String forceRedirect(String redirect)
redirect - redirect URL
Action.NONE. It'll just redirect to where you've specifiedpublic com.opensymphony.module.propertyset.PropertySet getPropertySet(org.ofbiz.core.entity.GenericValue gv)
public boolean isHasPermission(String permName)
isHasPermission in interface AuthorizationSupportpublic boolean isHasPermission(int permissionsId)
isHasPermission in interface AuthorizationSupport
public boolean isHasIssuePermission(String permName,
org.ofbiz.core.entity.GenericValue issue)
isHasIssuePermission in interface AuthorizationSupport
public boolean isHasIssuePermission(int permissionsId,
org.ofbiz.core.entity.GenericValue issue)
isHasIssuePermission in interface AuthorizationSupport
public boolean isHasProjectPermission(String permName,
org.ofbiz.core.entity.GenericValue project)
isHasProjectPermission in interface AuthorizationSupport
public boolean isHasProjectPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project)
isHasProjectPermission in interface AuthorizationSupport
@Deprecated
public boolean isHasPermission(String permName,
org.ofbiz.core.entity.GenericValue entity)
AuthorizationSupport
isHasPermission in interface AuthorizationSupportpermName - permission typeentity - entity to check the permission for, e.g. project, issue
public boolean isSystemAdministrator()
public boolean isUserExists(String username)
public String getUserFullName(String username)
public Map getAssignableUsers(org.ofbiz.core.entity.GenericValue entity)
throws Exception
Exception
public Map getAssignableUsers(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue issue)
throws Exception
Exceptionpublic void addErrorCollection(ErrorCollection errors)
ErrorCollection
addErrorCollection in interface ErrorCollectionerrors - ErrorCollection whose errors/messages we obtain.public Field getField(String id)
public List<String> getSearchSortDescriptions(SearchRequest searchRequest)
public String getNameTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
public String getDescTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
public String getReturnUrl()
public String getReturnUrlForCancelLink()
public void setReturnUrl(String returnUrl)
public Collection<String> getFlushedErrorMessages()
ErrorCollection
getFlushedErrorMessages in interface ErrorCollection
public String getLanguage()
throws IOException
IOExceptionpublic Project getSelectedProjectObject()
public org.ofbiz.core.entity.GenericValue getSelectedProject()
GenericValue as a projectpublic void setSelectedProjectId(Long id)
public String getDateFormat()
public String getDateTimeFormat()
public String getTimeFormat()
@Deprecated public static ExternalLinkUtil getExternalLinkUtils()
ComponentManager.getComponentInstanceOfType(Class)
ExternalLinkUtilpublic String getWebworkStack(String selected)
selected - selected value in the webwork stack
public String getWebworkStack()
public String getServerId()
public JiraServiceContext getJiraServiceContext()
ErrorCollection.
public String htmlEncode(String encodeMe)
encodeMe - a String to be HTML encoded.
public boolean isInlineDialogMode()
public void setInline(boolean inline)
inline - true if the action should act as an inline dialogpublic String returnComplete()
public String returnComplete(String url)
protected final String returnCompleteWithInlineRedirect(String url)
url - URL to redirect to
protected String insertContextPath(String url)
url - a String containing a URL
protected final boolean hasErrorMessage(String errorMsg)
protected final boolean hasErrorMessageByKey(String errorMsgKey)
protected final void addErrorMessageIfAbsent(String errorMsg)
protected final void addErrorMessageByKeyIfAbsent(String errorMsgKey)
public final Hint getHint(String context)
public final Hint getRandomHint()
public String getConglomerateCookieValue(String cookieName,
String key)
cookieName - The name of the conglomerate cookiekey - The key of the value
public void setConglomerateCookieValue(String cookieName,
String key,
String value)
cookieName - The name of the conglomerate cookiekey - The key of the valuevalue - The value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||