com.atlassian.jira.web.action
Class JiraWebActionSupport

java.lang.Object
  extended by webwork.action.ActionSupport
      extended by com.atlassian.jira.action.JiraActionSupport
          extended by com.atlassian.jira.web.action.JiraWebActionSupport
All Implemented Interfaces:
ErrorCollection, I18nHelper, java.io.Serializable, webwork.action.Action, webwork.action.CommandDriven, webwork.action.IllegalArgumentAware
Direct Known Subclasses:
AbstractAddPortlet, AbstractConstantAction, AbstractEditFieldLayout, AbstractEditFieldLayoutItem, AbstractSchemeAware, AbstractSchemeAwareAction, AbstractSetupAction, AbstractViewIssueColumns, AbstractViewWorkflowMetaAttributes, AbstractWorkflowStep, AbstractWorkflowTransition, AbstractWorkflowTransitionAction, ActivateWorkflow, AddScheme, AddUser, BugzillaImport, Calendar, CleanData, CloneWorkflow, ConfigureIssueCache, ConfigurePortalPages, ConfirmNewInstallationWithOldLicense, CreateCustomField, CVSConfiguration, DeleteCustomField, DeleteLinkType, DeleteWorkflowStep, DeleteWorkflowTransitions, DisableSubTasks, DueDatePicker, EditCustomField, EditCustomFieldDefaults, EditCustomFieldOptions, EditLinkType, EditListener, EditService, EditSubTaskIssueTypes, FilterSubscription, ForgotPassword, ImportWorkflow, IntegrityChecker, IssuePicker, JellyRunner, JiraWizardActionSupport, LDAPConfigurer, ListWorkflows, Logout, MailQueueAdmin, MailServerActionSupport, ManageSubTasks, MantisImport, ProjectActionSupport, ProjectEmail, RefreshStatisticsAdmin, ReleaseNote, RepositoryActionSupport, RestoreDefaultDashboard, SchedulerAdmin, SelectProjectCategory, SelectProjectIssueFieldScheme, SelectProjectRepository, SendBulkMail, SendTestMail, SetupLicense, SetupPortal, ShowConstantsHelp, Signup, TimeTrackingAdmin, ViewCustomFields, ViewGroup, ViewLicense, ViewLinkTypes, ViewListeners, ViewLogging, ViewPlugins, ViewProjects, ViewSchemes, ViewServices, ViewSystemInfo, ViewWorkflowStep, ViewWorkflowXml

public class JiraWebActionSupport
extends JiraActionSupport
implements ErrorCollection, I18nHelper

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.

See Also:
Serialized Form

Field Summary
static java.lang.String ISSUE_NOT_FOUND_RESULT
           
static java.lang.String PERMISSION_VIOLATION_RESULT
           
protected  javax.servlet.http.HttpServletRequest request
           
 
Fields inherited from class com.atlassian.jira.action.JiraActionSupport
log
 
Fields inherited from class webwork.action.ActionSupport
command, errorMap, errorMessages
 
Fields inherited from interface com.atlassian.jira.util.I18nHelper
DEFAULT_RESOURCE_BUNDLE
 
Fields inherited from interface webwork.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
JiraWebActionSupport()
           
 
Method Summary
 void addErrorCollection(ErrorCollection errors)
           
 java.util.Map getAssignableUsers(org.ofbiz.core.entity.GenericValue entity)
           
 java.util.Map getAssignableUsers(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue issue)
           
protected  java.util.Collection getCachedGroups()
           
 java.lang.String getColumnViewHtml(CustomField field, org.ofbiz.core.entity.GenericValue issue)
           
 ComponentManager getComponentManager()
           
 ConstantsManager getConstantsManager()
           
 java.lang.String getCustomFieldHtml(CustomField field, org.ofbiz.core.entity.GenericValue issue)
           
 java.lang.String getCustomFieldXML(CustomField field, org.ofbiz.core.entity.GenericValue issue)
           
protected  com.opensymphony.user.User getDefaultAssignee(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue component)
           
 java.util.ResourceBundle getDefaultResourceBundle()
           
 Field getField(java.lang.String id)
           
 java.util.Locale getLocale()
          override default getLocale() to use the locale specified by the user
 OutlookDate getOutlookDate()
           
protected  PermissionManager getPermissionManager()
           
 ProjectManager getProjectManager()
           
 com.opensymphony.module.propertyset.PropertySet getPropertySet(org.ofbiz.core.entity.GenericValue gv)
           
 java.lang.String getRedirect(java.lang.String defaultUrl)
          Get a definitive result with a redirect upon success.
 com.opensymphony.user.User getRemoteUser()
           
 java.lang.String getReturnUrl()
           
 java.lang.String getText(java.lang.String key)
          If called from a JSP page that is not associated with an action, look for key in the default JiraWebActionSupport.properties file
 java.lang.String getText(java.lang.String string, java.lang.Object parameters)
          A parameterised i18n'zed message
 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 getUserFullName(java.lang.String username)
           
 com.atlassian.core.user.preferences.Preferences getUserPreferences()
           
 VersionManager getVersionManager()
           
 boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project)
           
protected  boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project, org.ofbiz.core.entity.GenericValue component)
           
 boolean isHasIssuePermission(int permissionsId, org.ofbiz.core.entity.GenericValue issue)
           
 boolean isHasIssuePermission(java.lang.String permName, org.ofbiz.core.entity.GenericValue issue)
           
 boolean isHasPermission(int permissionsId)
           
 boolean isHasPermission(java.lang.String permName)
           
 boolean isHasPermission(java.lang.String permName, org.ofbiz.core.entity.GenericValue entity)
          Deprecated. Please use either isHasIssuePermission or isHasProjectPermission
 boolean isHasProjectPermission(int permissionsId, org.ofbiz.core.entity.GenericValue project)
           
 boolean isHasProjectPermission(java.lang.String permName, org.ofbiz.core.entity.GenericValue project)
           
protected  java.lang.String processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue, org.ofbiz.core.entity.GenericValue project, java.lang.String assignee)
           
protected  java.lang.String processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue, java.lang.String assignee)
           
protected  java.lang.String processDefaultAssignee(org.ofbiz.core.entity.GenericValue project, java.lang.String[] components, java.lang.String assignee)
          Takes a project and component ids for an issue and tries to return the default assignee.
 void setReturnUrl(java.lang.String returnUrl)
           
 
Methods inherited from class com.atlassian.jira.action.JiraActionSupport
addErrorMessages, addErrorMessages, addErrors, execute, getActionName, getApplicationProperties, getDelegator, getLocaleUtils, getResult, getUnescapedText, getWatcherManager, hasAnyErrors, isIndexing
 
Methods inherited from class webwork.action.ActionSupport
addError, addErrorMessage, addIllegalArgumentException, doDefault, doExecute, doValidation, getErrorMessages, getErrors, getHasErrorMessages, getHasErrors, getPropertyEditorMessage, getTexts, getTexts, 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
 
Methods inherited from interface webwork.action.CommandDriven
setCommand
 

Field Detail

PERMISSION_VIOLATION_RESULT

public static java.lang.String PERMISSION_VIOLATION_RESULT

ISSUE_NOT_FOUND_RESULT

public static java.lang.String ISSUE_NOT_FOUND_RESULT

request

protected javax.servlet.http.HttpServletRequest request
Constructor Detail

JiraWebActionSupport

public JiraWebActionSupport()
Method Detail

getRemoteUser

public com.opensymphony.user.User getRemoteUser()
Specified by:
getRemoteUser in class JiraActionSupport

getUserPreferences

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

getRedirect

public java.lang.String getRedirect(java.lang.String defaultUrl)
Get a definitive result with a redirect upon success.

Returns 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


getPropertySet

public com.opensymphony.module.propertyset.PropertySet getPropertySet(org.ofbiz.core.entity.GenericValue gv)

isHasPermission

public boolean isHasPermission(java.lang.String permName)

isHasPermission

public boolean isHasPermission(int permissionsId)

isHasIssuePermission

public boolean isHasIssuePermission(java.lang.String permName,
                                    org.ofbiz.core.entity.GenericValue issue)

isHasIssuePermission

public boolean isHasIssuePermission(int permissionsId,
                                    org.ofbiz.core.entity.GenericValue issue)

isHasProjectPermission

public boolean isHasProjectPermission(java.lang.String permName,
                                      org.ofbiz.core.entity.GenericValue project)

isHasProjectPermission

public boolean isHasProjectPermission(int permissionsId,
                                      org.ofbiz.core.entity.GenericValue project)

isHasPermission

public boolean isHasPermission(java.lang.String permName,
                               org.ofbiz.core.entity.GenericValue entity)
Deprecated. Please use either isHasIssuePermission or isHasProjectPermission


getPermissionManager

protected PermissionManager getPermissionManager()

getCachedGroups

protected java.util.Collection getCachedGroups()

getConstantsManager

public ConstantsManager getConstantsManager()

getUserFullName

public java.lang.String getUserFullName(java.lang.String username)

getAssignableUsers

public java.util.Map getAssignableUsers(org.ofbiz.core.entity.GenericValue entity)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

getAssignableUsers

public java.util.Map getAssignableUsers(org.ofbiz.core.entity.GenericValue project,
                                        org.ofbiz.core.entity.GenericValue issue)
                                 throws java.lang.Exception
Throws:
java.lang.Exception

isDefaultAssignee

public boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project)

isDefaultAssignee

protected boolean isDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
                                    org.ofbiz.core.entity.GenericValue component)

getDefaultAssignee

protected com.opensymphony.user.User getDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
                                                        org.ofbiz.core.entity.GenericValue component)

getProjectManager

public ProjectManager getProjectManager()

getVersionManager

public VersionManager getVersionManager()

processDefaultAssignee

protected java.lang.String processDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
                                                  java.lang.String[] components,
                                                  java.lang.String assignee)
                                           throws org.ofbiz.core.entity.GenericEntityException
Takes a project and component ids for an issue and tries to return the default assignee.

Parameters:
project - Project GenericValue
components - List of Long ids of components
assignee - Assignee to process, if -1 we have something to do
Returns:
Default assignee username
Throws:
org.ofbiz.core.entity.GenericEntityException

processDefaultAssignee

protected java.lang.String processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue,
                                                  org.ofbiz.core.entity.GenericValue project,
                                                  java.lang.String assignee)

processDefaultAssignee

protected java.lang.String processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue,
                                                  java.lang.String assignee)

getText

public java.lang.String getText(java.lang.String key)
If called from a JSP page that is not associated with an action, look for key in the default JiraWebActionSupport.properties file

Specified by:
getText in interface I18nHelper
Overrides:
getText in class JiraActionSupport
Parameters:
key -
Returns:

getText

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

Parameters:
parameters - A single object, or array of objects, or list of objects

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


getLocale

public java.util.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
Returns:

addErrorCollection

public void addErrorCollection(ErrorCollection errors)
Specified by:
addErrorCollection in interface ErrorCollection

getField

public Field getField(java.lang.String id)

getComponentManager

public ComponentManager getComponentManager()

getOutlookDate

public OutlookDate getOutlookDate()

getCustomFieldHtml

public java.lang.String getCustomFieldHtml(CustomField field,
                                           org.ofbiz.core.entity.GenericValue issue)

getCustomFieldXML

public java.lang.String getCustomFieldXML(CustomField field,
                                          org.ofbiz.core.entity.GenericValue issue)

getColumnViewHtml

public java.lang.String getColumnViewHtml(CustomField field,
                                          org.ofbiz.core.entity.GenericValue issue)

getReturnUrl

public java.lang.String getReturnUrl()

setReturnUrl

public void setReturnUrl(java.lang.String returnUrl)


Copyright © 2002-2006 Atlassian. All Rights Reserved.