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, 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(Collection errorMessages)
           
 void addErrors(Map errors)
           
 void addIllegalArgumentException(String fieldName, IllegalArgumentException e)
          Override this method from ActionSupport.
 String execute()
           
 String getActionName()
           
 ApplicationProperties getApplicationProperties()
           
 ResourceBundle getDefaultResourceBundle()
           
 org.ofbiz.core.entity.GenericDelegator getDelegator()
           
 JiraLocaleUtils getJiraLocaleUtils()
           
 Locale getLocale()
          override default getLocale() to use the locale specified by the user
abstract  User getRemoteUser()
           
 String getResult()
          Get a definitive result.
 String getText(String string)
           
 String getText(String string, Object parameters)
          A parameterised i18n'zed message
 String getText(String string, Object value1, Object value2, Object value3, Object value4, Object value5, Object value6)
           
 String getText(String key, String value1)
          A parameterised i18n'zed message with one string parameters
 String getText(String string, String param1, String param2)
          A parameterised i18n'zed message with two string parameters
 String getText(String string, String param1, String param2, String param3)
          A parameterised i18n'zed message with two string parameters
 String getText(String key, String value1, String value2, String value3, String value4)
           
 String getText(String string, String value1, String value2, String value3, String value4, String value5, String value6, String value7, String value8, String value9)
           
protected  String getText0(String key)
          Special accessor for the ActionSupport.getText(String) method as we override that method here :-(
 String getUnescapedText(String key)
           
 com.atlassian.core.user.preferences.Preferences getUserPreferences()
           
 WatcherManager getWatcherManager()
           
 boolean hasAnyErrors()
           
 boolean isEnterprise()
           
 boolean isIndexing()
           
 boolean isProfessional()
           
 boolean isProfessionalOrEnterprise()
           
 boolean isStandard()
           
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, 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
setCommand
 

Field Detail

log

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

JiraActionSupport

protected JiraActionSupport()
Method Detail

getRemoteUser

public abstract User getRemoteUser()

execute

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

getDelegator

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

getApplicationProperties

public ApplicationProperties getApplicationProperties()

getWatcherManager

public WatcherManager getWatcherManager()

getActionName

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

getResult

public 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(Collection errorMessages)

addErrors

public void addErrors(Map errors)

hasAnyErrors

public boolean hasAnyErrors()

addErrorMessages

public void addErrorMessages(webwork.dispatcher.ActionResult aResult)

isIndexing

public boolean isIndexing()

getJiraLocaleUtils

public JiraLocaleUtils getJiraLocaleUtils()

getText

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

getText

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

getText

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

getText

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

getText

public String getText(String string,
                      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

getText

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

Specified by:
getText in interface I18nHelper

getText

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

Specified by:
getText in interface I18nHelper

getDefaultResourceBundle

public ResourceBundle getDefaultResourceBundle()
Specified by:
getDefaultResourceBundle in interface I18nHelper

getText

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

Specified by:
getText in interface I18nHelper

getLocale

public Locale getLocale()
override default getLocale() to use the locale specified by the user

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

getUserPreferences

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

getUnescapedText

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

getText0

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

Returns:
the default text

addIllegalArgumentException

public void addIllegalArgumentException(String fieldName,
                                        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()

isProfessionalOrEnterprise

public final boolean isProfessionalOrEnterprise()

isProfessional

public final boolean isProfessional()

isStandard

public final boolean isStandard()

removeKeyOrAddError

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.

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


Copyright © 2002-2009 Atlassian. All Rights Reserved.