|
||||||||||
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
public abstract class JiraActionSupport
This class sits just above the base Webwork ActionSupport
class and provides JIRA specific code to all our
actions.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface com.atlassian.jira.util.I18nHelper |
---|
I18nHelper.BeanFactory |
Field Summary | |
---|---|
protected org.apache.log4j.Logger |
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 |
JiraActionSupport()
|
Method Summary | ||
---|---|---|
void |
addErrorMessages(webwork.dispatcher.ActionResult aResult)
|
|
void |
addErrorMessages(Collection<String> errorMessages)
|
|
void |
addErrors(Map<String,String> errors)
|
|
void |
addIllegalArgumentException(String fieldName,
IllegalArgumentException e)
Override this method from ActionSupport. |
|
String |
execute()
|
|
String |
getActionName()
|
|
ApplicationProperties |
getApplicationProperties()
|
|
protected
|
getComponentInstanceOfType(Class<T> clazz)
This can be called to get a component from the ComponentManager . |
|
ResourceBundle |
getDefaultResourceBundle()
|
|
org.ofbiz.core.entity.GenericDelegator |
getDelegator()
|
|
protected I18nHelper |
getI18nHelper()
|
|
Set<String> |
getKeysForPrefix(String prefix)
Given a prefix for an i18n key, this method will return all keys that start with the prefix specified. |
|
Locale |
getLocale()
|
|
abstract com.atlassian.crowd.embedded.api.User |
getLoggedInUser()
|
|
abstract User |
getRemoteUser()
Deprecated. Use getLoggedInUser() instead. Since v4.3 |
|
String |
getResult()
Get a definitive result. |
|
String |
getText(String key)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
Object parameters)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found. |
|
String |
getText(String key,
Object value1,
Object value2,
Object value3)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
Object value1,
Object value2,
Object value3,
Object value4,
Object value5,
Object value6,
Object value7,
Object value8)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
String value1)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
String value1,
String value2)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
String value1,
String value2,
String value3)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
String value1,
String value2,
String value3,
String value4)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getText(String key,
String value1,
String value2,
String value3,
String value4,
String value5,
String value6,
String value7)
Called to return the formatted text of the specified i18n key |
|
String |
getText(String key,
String value1,
String value2,
String value3,
String value4,
String value5,
String value6,
String value7,
String value8,
String value9)
Called to return the formatted text of the specified i18n key or the key itself if no message can be found |
|
String |
getUnescapedText(String key)
Called to return the un-formatted text of the specified i18n key or the key itself if no message can be found |
|
com.atlassian.core.user.preferences.Preferences |
getUserPreferences()
|
|
WatcherManager |
getWatcherManager()
|
|
boolean |
hasAnyErrors()
|
|
boolean |
isIndexing()
|
|
protected void |
removeKeyOrAddError(Map params,
String key,
String messageKey)
Checks if descriptorParams contains key and removes it, otherwise adds the error message with the given message key. |
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 webwork.action.CommandDriven |
---|
getCommandName, setCommand |
Field Detail |
---|
protected final org.apache.log4j.Logger log
Constructor Detail |
---|
protected JiraActionSupport()
Method Detail |
---|
public abstract com.atlassian.crowd.embedded.api.User getLoggedInUser()
public abstract User getRemoteUser()
getLoggedInUser()
instead. Since v4.3
protected <T> T getComponentInstanceOfType(Class<T> clazz)
ComponentManager
. Override this if you
wish to change this behaviour say in unit tests.
clazz
- the component class in question
public String execute() throws Exception
execute
in interface webwork.action.Action
execute
in class webwork.action.ActionSupport
Exception
public org.ofbiz.core.entity.GenericDelegator getDelegator()
public ApplicationProperties getApplicationProperties()
public WatcherManager getWatcherManager()
public final String getActionName()
getActionName
in class webwork.action.ActionSupport
public String getResult()
Action.ERROR
if there are error messages, otherwise
Action.SUCCESS
.
Action.ERROR
or Action.SUCCESS
public void addErrorMessages(Collection<String> errorMessages)
public void addErrors(Map<String,String> errors)
public boolean hasAnyErrors()
public void addErrorMessages(webwork.dispatcher.ActionResult aResult)
public boolean isIndexing()
public void addIllegalArgumentException(String fieldName, IllegalArgumentException e)
addIllegalArgumentException
in interface webwork.action.IllegalArgumentAware
addIllegalArgumentException
in class webwork.action.ActionSupport
public com.atlassian.core.user.preferences.Preferences getUserPreferences()
protected void removeKeyOrAddError(Map params, String key, String messageKey)
params
- the map of parameterskey
- the param key to remove.messageKey
- the error.protected I18nHelper getI18nHelper()
I18nHelper
associated with this actionpublic Set<String> getKeysForPrefix(String prefix)
I18nHelper
getKeysForPrefix
in interface I18nHelper
prefix
- The prefix for i18n keys. May not be null
public ResourceBundle getDefaultResourceBundle()
getDefaultResourceBundle
in interface I18nHelper
ResourceBundle
within JIRApublic Locale getLocale()
getLocale
in interface I18nHelper
getLocale
in class webwork.action.ActionSupport
Locale
that is associated with this I18nHelperpublic String getUnescapedText(String key)
I18nHelper
getUnescapedText
in interface I18nHelper
key
- the key of the i18n message
public String getText(String key)
I18nHelper
getText
in interface I18nHelper
getText
in class webwork.action.ActionSupport
key
- the key of the i18n message
public String getText(String key, String value1)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the message
public String getText(String key, String value1, String value2)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the message
public String getText(String key, String value1, String value2, String value3)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the message
public String getText(String key, String value1, String value2, String value3, String value4)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the message
public String getText(String key, Object value1, Object value2, Object value3)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the message
public String getText(String key, Object value1, Object value2, Object value3, Object value4)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the message
public String getText(String key, Object value1, Object value2, Object value3, Object value4, Object value5)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the messagevalue5
- a value to be substituted into the message
public String getText(String key, Object value1, Object value2, Object value3, Object value4, Object value5, Object value6)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the messagevalue5
- a value to be substituted into the messagevalue6
- a value to be substituted into the message
public String getText(String key, Object value1, Object value2, Object value3, Object value4, Object value5, Object value6, Object value7)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the messagevalue5
- a value to be substituted into the messagevalue6
- a value to be substituted into the messagevalue7
- a value to be substituted into the message
public String getText(String key, String value1, String value2, String value3, String value4, String value5, String value6, String value7)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the messagevalue5
- a value to be substituted into the messagevalue6
- a value to be substituted into the messagevalue7
- a value to be substituted into the message
public String getText(String key, Object value1, Object value2, Object value3, Object value4, Object value5, Object value6, Object value7, Object value8)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the messagevalue5
- a value to be substituted into the messagevalue6
- a value to be substituted into the messagevalue7
- a value to be substituted into the messagevalue8
- a value to be substituted into the message
public String getText(String key, String value1, String value2, String value3, String value4, String value5, String value6, String value7, String value8, String value9)
I18nHelper
getText
in interface I18nHelper
key
- the key of the i18n messagevalue1
- a value to be substituted into the messagevalue2
- a value to be substituted into the messagevalue3
- a value to be substituted into the messagevalue4
- a value to be substituted into the messagevalue5
- a value to be substituted into the messagevalue6
- a value to be substituted into the messagevalue7
- a value to be substituted into the messagevalue8
- a value to be substituted into the messagevalue9
- a value to be substituted into the message
public String getText(String key, Object parameters)
I18nHelper
List
} or a single parameter object. It will be then
used as substitution parameters within the message.
getText
in interface I18nHelper
key
- the key of the i18n messageparameters
- This can be an Array, a List
and Array or a single object parameter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |