com.atlassian.jira.action
Class JiraActionSupport

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
All Implemented Interfaces:
I18nHelper, java.io.Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
JiraNonWebActionSupport, JiraWebActionSupport

public abstract class JiraActionSupport
extends webwork.action.ActionSupport
implements webwork.action.CommandDriven, I18nHelper

See Also:
Serialized Form

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(java.util.Collection<java.lang.String> errorMessages)
           
 void addErrors(java.util.Map<java.lang.String,java.lang.String> errors)
           
 void addIllegalArgumentException(java.lang.String fieldName, java.lang.IllegalArgumentException e)
          Override this method from ActionSupport.
 java.lang.String execute()
           
 java.lang.String getActionName()
           
 ApplicationProperties getApplicationProperties()
           
 java.util.ResourceBundle getDefaultResourceBundle()
           
 org.ofbiz.core.entity.GenericDelegator getDelegator()
           
 java.util.Set<java.lang.String> getKeysForPrefix(java.lang.String prefix)
          Given a prefix for an i18n key, this method will return all keys that start with the prefix specified.
 java.util.Locale getLocale()
          Gets the user's locale, according to Preferences}.
abstract  com.opensymphony.user.User getRemoteUser()
           
 java.lang.String getResult()
          Get a definitive result.
 java.lang.String getText(java.lang.String string)
           
 java.lang.String getText(java.lang.String string, java.lang.Object parameters)
          A parameterised i18n'zed message
 java.lang.String getText(java.lang.String string, java.lang.Object value1, java.lang.Object value2, java.lang.Object value3, java.lang.Object value4, java.lang.Object value5, java.lang.Object value6)
           
 java.lang.String getText(java.lang.String key, java.lang.String value1)
          A parameterised i18n'zed message with one string parameters
 java.lang.String getText(java.lang.String string, java.lang.String param1, java.lang.String param2)
          A parameterised i18n'zed message with two string parameters
 java.lang.String getText(java.lang.String string, java.lang.String param1, java.lang.String param2, java.lang.String param3)
          A parameterised i18n'zed message with two string parameters
 java.lang.String getText(java.lang.String key, java.lang.String value1, java.lang.String value2, java.lang.String value3, java.lang.String value4)
           
 java.lang.String getText(java.lang.String string, java.lang.String value1, java.lang.String value2, java.lang.String value3, java.lang.String value4, java.lang.String value5, java.lang.String value6, java.lang.String value7)
           
 java.lang.String getText(java.lang.String string, java.lang.String value1, java.lang.String value2, java.lang.String value3, java.lang.String value4, java.lang.String value5, java.lang.String value6, java.lang.String value7, java.lang.String value8, java.lang.String value9)
           
protected  java.lang.String getText0(java.lang.String key)
          Special accessor for the ActionSupport.getText(String) method as we override that method here :-(
 java.lang.String getUnescapedText(java.lang.String key)
           
 com.atlassian.core.user.preferences.Preferences getUserPreferences()
           
 WatcherManager getWatcherManager()
           
 boolean hasAnyErrors()
           
 boolean isEnterprise()
          Deprecated. as we know longer have different editions.
 boolean isIndexing()
           
 boolean isProfessional()
          Deprecated. as we know longer have different editions.
 boolean isProfessionalOrEnterprise()
          Deprecated. as we know longer have different editions.
 boolean isStandard()
          Deprecated. as we know longer have different editions.
protected  void removeKeyOrAddError(java.util.Map params, java.lang.String key, java.lang.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

log

protected final org.apache.log4j.Logger log
Constructor Detail

JiraActionSupport

protected JiraActionSupport()
Method Detail

getRemoteUser

public abstract com.opensymphony.user.User getRemoteUser()

execute

public java.lang.String execute()
                         throws java.lang.Exception
Specified by:
execute in interface webwork.action.Action
Overrides:
execute in class webwork.action.ActionSupport
Throws:
java.lang.Exception

getDelegator

public org.ofbiz.core.entity.GenericDelegator getDelegator()

getApplicationProperties

public ApplicationProperties getApplicationProperties()

getWatcherManager

public WatcherManager getWatcherManager()

getActionName

public final java.lang.String getActionName()
Overrides:
getActionName in class webwork.action.ActionSupport
Returns:
The name of this action - the unqualified class name.

getResult

public java.lang.String getResult()
Get a definitive result. Returns Action.ERROR if there are error messages, otherwise Action.SUCCESS.

Returns:
Action.ERROR or Action.SUCCESS

addErrorMessages

public void addErrorMessages(java.util.Collection<java.lang.String> errorMessages)

addErrors

public void addErrors(java.util.Map<java.lang.String,java.lang.String> errors)

hasAnyErrors

public boolean hasAnyErrors()

addErrorMessages

public void addErrorMessages(webwork.dispatcher.ActionResult aResult)

isIndexing

public boolean isIndexing()

getText

public java.lang.String getText(java.lang.String string)
Specified by:
getText in interface I18nHelper
Overrides:
getText in class webwork.action.ActionSupport

getText

public java.lang.String getText(java.lang.String key,
                                java.lang.String value1,
                                java.lang.String value2,
                                java.lang.String value3,
                                java.lang.String value4)
Specified by:
getText in interface I18nHelper

getText

public java.lang.String getText(java.lang.String string,
                                java.lang.Object value1,
                                java.lang.Object value2,
                                java.lang.Object value3,
                                java.lang.Object value4,
                                java.lang.Object value5,
                                java.lang.Object value6)
Specified by:
getText in interface I18nHelper

getText

public java.lang.String getText(java.lang.String string,
                                java.lang.String value1,
                                java.lang.String value2,
                                java.lang.String value3,
                                java.lang.String value4,
                                java.lang.String value5,
                                java.lang.String value6,
                                java.lang.String value7)
Specified by:
getText in interface I18nHelper

getText

public java.lang.String getText(java.lang.String string,
                                java.lang.String value1,
                                java.lang.String value2,
                                java.lang.String value3,
                                java.lang.String value4,
                                java.lang.String value5,
                                java.lang.String value6,
                                java.lang.String value7,
                                java.lang.String value8,
                                java.lang.String value9)
Specified by:
getText in interface I18nHelper

getText

public java.lang.String getText(java.lang.String string,
                                java.lang.Object parameters)
A parameterised i18n'zed message

Specified by:
getText in interface I18nHelper
Parameters:
parameters - A single object, or array of objects, or list of objects

getKeysForPrefix

public java.util.Set<java.lang.String> getKeysForPrefix(java.lang.String prefix)
Description copied from interface: I18nHelper
Given a prefix for an i18n key, this method will return all keys that start with the prefix specified.

Specified by:
getKeysForPrefix in interface I18nHelper
Parameters:
prefix - The prefix for i18n keys. May not be null
Returns:
An immutable set of translation keys that start with the prefix specified.

getText

public java.lang.String getText(java.lang.String key,
                                java.lang.String value1)
A parameterised i18n'zed message with one string parameters

Specified by:
getText in interface I18nHelper

getText

public java.lang.String getText(java.lang.String string,
                                java.lang.String param1,
                                java.lang.String param2)
A parameterised i18n'zed message with two string parameters

Specified by:
getText in interface I18nHelper

getDefaultResourceBundle

public java.util.ResourceBundle getDefaultResourceBundle()
Specified by:
getDefaultResourceBundle in interface I18nHelper

getText

public java.lang.String getText(java.lang.String string,
                                java.lang.String param1,
                                java.lang.String param2,
                                java.lang.String param3)
A parameterised i18n'zed message with two string parameters

Specified by:
getText in interface I18nHelper

getLocale

public java.util.Locale getLocale()

Gets the user's locale, according to Preferences}.

If there's no locale associated with this user's preferences, it returns the "default" locale defined in the ApplicationProperties}

Specified by:
getLocale in interface I18nHelper
Overrides:
getLocale in class webwork.action.ActionSupport

getUserPreferences

public com.atlassian.core.user.preferences.Preferences getUserPreferences()

getUnescapedText

public java.lang.String getUnescapedText(java.lang.String key)
Specified by:
getUnescapedText in interface I18nHelper

getText0

protected java.lang.String getText0(java.lang.String key)
Special accessor for the ActionSupport.getText(String) method as we override that method here :-(

Parameters:
key - for the translation
Returns:
the default text

addIllegalArgumentException

public void addIllegalArgumentException(java.lang.String fieldName,
                                        java.lang.IllegalArgumentException e)
Override this method from ActionSupport. Body is copied from there, with the exception of a clause that prevents JRA-7245

Specified by:
addIllegalArgumentException in interface webwork.action.IllegalArgumentAware
Overrides:
addIllegalArgumentException in class webwork.action.ActionSupport

isEnterprise

public final boolean isEnterprise()
Deprecated. as we know longer have different editions.

Returns:
true always

isProfessionalOrEnterprise

public final boolean isProfessionalOrEnterprise()
Deprecated. as we know longer have different editions.

Returns:
true always

isProfessional

public final boolean isProfessional()
Deprecated. as we know longer have different editions.

Returns:
false always

isStandard

public final boolean isStandard()
Deprecated. as we know longer have different editions.

Returns:
false always

removeKeyOrAddError

protected void removeKeyOrAddError(java.util.Map params,
                                   java.lang.String key,
                                   java.lang.String messageKey)
Checks if descriptorParams contains key and removes it, otherwise adds the error message with the given message key.

Parameters:
params - the map of parameters
key - the param key to remove.
messageKey - the error.


Copyright © 2002-2010 Atlassian. All Rights Reserved.