com.atlassian.jira.web.action
Class JiraWebActionSupport
java.lang.Object
webwork.action.ActionSupport
com.atlassian.jira.action.JiraActionSupport
com.atlassian.jira.web.action.JiraWebActionSupport
- All Implemented Interfaces:
- webwork.action.Action, webwork.action.CommandDriven, ErrorCollection, I18nHelper, webwork.action.IllegalArgumentAware, Serializable
- Direct Known Subclasses:
- AbstractAddPortlet, AbstractConfigureFieldLayout, AbstractConstantAction, AbstractEditConfigurationItemAction, AbstractEditFieldLayoutItem, AbstractEditFieldLayoutSchemeAction, AbstractFieldLayoutAction, AbstractFieldScreenAction, AbstractFieldScreenSchemeAction, AbstractManageIssueTypeOptionsAction, AbstractSchemeAware, AbstractSchemeAwareAction, AbstractSetupAction, AbstractViewWorkflowMetaAttributes, AbstractWorkflowStep, AbstractWorkflowTransition, AbstractWorkflowTransitionAction, ActivateWorkflow, AddUser, Administrators, AssociateFieldToScreens, BugzillaImport, BulkEditUserGroups, Calendar, CantBrowseCreatedIssue, CleanData, CloneWorkflow, ConfigureCustomField, ConfigureFieldLayoutScheme, ConfigureFieldScreen, ConfigureIssueCache, ConfigureIssueTypeScreenScheme, ConfigurePortalPages, ConfirmInstallationWithLicense, ConfirmNewInstallationWithOldLicense, CVSConfiguration, DateRangePicker, DeleteCustomField, DeleteLinkType, DeleteWorkflowStep, DeleteWorkflowTransitions, DisableSubTasks, EditAnnouncementBanner, EditCustomField, EditFieldLayoutItemRendererConfirmation, EditIssueTypeScreenScheme, EditLinkType, EditListener, EditService, EditSubTaskIssueTypes, ForgotPassword, FuncTestWriter, IconPicker, ImportWorkflow, IntegrityChecker, IssuePicker, JellyRunner, JiraWizardActionSupport, LDAPConfigurer, ListWorkflows, Logout, MailQueueAdmin, MailServerActionSupport, ManageConfigurationScheme, ManageSubTasks, MantisImport, ProjectActionSupport, ProjectEmail, ReleaseNote, RepositoryActionSupport, RestoreDefaultDashboard, SchedulerAdmin, SelectFieldLayoutScheme, SelectIssueTypeScreenScheme, SelectProjectCategory, SelectProjectRepository, SelectScreenScheme, SendBulkMail, SendTestMail, SetupLicense, SetupPortal, ShowConstantsHelp, Signup, TimeTrackingAdmin, ViewCustomFields, ViewGroup, ViewIssueTypeScreenSchemes, ViewLicense, ViewLinkTypes, ViewListeners, ViewLogging, ViewPlugins, ViewProjects, ViewSchemes, ViewServices, ViewSystemInfo, ViewWorkflowStep, ViewWorkflowXml, WikiRendererHelpAction, WikiRendererPreviewAction
- public class JiraWebActionSupport
- extends JiraActionSupport
- implements ErrorCollection
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
Fields inherited from class webwork.action.ActionSupport |
command, errorMap, errorMessages |
Fields inherited from interface webwork.action.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Method Summary |
void |
addErrorCollection(ErrorCollection errors)
|
protected String |
forceRedirect(String redirect)
This method will force a server redirect. |
Map |
getAssignableUsers(org.ofbiz.core.entity.GenericValue entity)
|
Map |
getAssignableUsers(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue issue)
|
protected Collection |
getCachedGroups()
|
String |
getCalendarTranslationFilenameForLanguage()
|
ComponentManager |
getComponentManager()
|
ConstantsManager |
getConstantsManager()
|
String |
getDateFormat()
|
String |
getDateTimeFormat()
|
protected User |
getDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue component)
|
String |
getDescTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
|
static ExternalLinkUtil |
getExternalLinkUtils()
|
Field |
getField(String id)
|
Collection |
getFlushedErrorMessages()
|
String |
getLanguage()
|
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)
|
String |
getRedirect(String defaultUrl)
Get a definitive result with a redirect upon success. |
User |
getRemoteUser()
|
String |
getReturnUrl()
|
Collection |
getSavedFilters()
Return a list of saved filters for a particular person |
org.ofbiz.core.entity.GenericValue |
getSelectedProject()
Gets the "active" project. |
String |
getText(String key)
If called from a JSP page that is not associated with an action, look for
key in the default JiraWebActionSupport.properties file |
String |
getTimeFormat()
|
String |
getUserFullName(String username)
|
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 |
isHasCalendarTranslationForLanguage()
|
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. Please use either isHasIssuePermission or isHasProjectPermission |
boolean |
isHasProjectPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project)
|
boolean |
isHasProjectPermission(String permName,
org.ofbiz.core.entity.GenericValue project)
|
protected String |
processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue,
org.ofbiz.core.entity.GenericValue project,
String assignee)
|
protected String |
processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue,
String assignee)
|
protected String |
processDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
String[] components,
String assignee)
Takes a project and component ids for an issue and tries to return the default assignee. |
void |
setReturnUrl(String returnUrl)
|
void |
setSelectedProjectId(Long id)
|
Methods inherited from class com.atlassian.jira.action.JiraActionSupport |
addErrorMessages, addErrorMessages, addErrors, addIllegalArgumentException, execute, getActionName, getApplicationProperties, getDefaultResourceBundle, getDelegator, getJiraLocaleUtils, getLocale, getResult, getText, getText, getText, getText, getUnescapedText, getUserPreferences, getWatcherManager, hasAnyErrors, isIndexing, isProfessional |
Methods inherited from class webwork.action.ActionSupport |
addError, addErrorMessage, 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 webwork.action.CommandDriven |
setCommand |
PERMISSION_VIOLATION_RESULT
public static String PERMISSION_VIOLATION_RESULT
ISSUE_NOT_FOUND_RESULT
public static String ISSUE_NOT_FOUND_RESULT
request
protected javax.servlet.http.HttpServletRequest request
savedFilters
protected Collection savedFilters
selectedProject
protected org.ofbiz.core.entity.GenericValue selectedProject
JiraWebActionSupport
public JiraWebActionSupport()
getRemoteUser
public User getRemoteUser()
- Specified by:
getRemoteUser
in class JiraActionSupport
getRedirect
public String getRedirect(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
forceRedirect
protected String forceRedirect(String redirect)
- This method will force a server redirect. It doesn't clear the return URL and will always go to the redirect URL
- Parameters:
redirect
-
- Returns:
NONE
. It'll just redirect to where you've specified
getPropertySet
public com.opensymphony.module.propertyset.PropertySet getPropertySet(org.ofbiz.core.entity.GenericValue gv)
isHasPermission
public boolean isHasPermission(String permName)
isHasPermission
public boolean isHasPermission(int permissionsId)
isHasIssuePermission
public boolean isHasIssuePermission(String permName,
org.ofbiz.core.entity.GenericValue issue)
isHasIssuePermission
public boolean isHasIssuePermission(int permissionsId,
org.ofbiz.core.entity.GenericValue issue)
isHasProjectPermission
public boolean isHasProjectPermission(String permName,
org.ofbiz.core.entity.GenericValue project)
isHasProjectPermission
public boolean isHasProjectPermission(int permissionsId,
org.ofbiz.core.entity.GenericValue project)
isHasPermission
public boolean isHasPermission(String permName,
org.ofbiz.core.entity.GenericValue entity)
- Deprecated. Please use either isHasIssuePermission or isHasProjectPermission
getPermissionManager
protected PermissionManager getPermissionManager()
getCachedGroups
protected Collection getCachedGroups()
getConstantsManager
public ConstantsManager getConstantsManager()
getUserFullName
public String getUserFullName(String username)
getAssignableUsers
public Map getAssignableUsers(org.ofbiz.core.entity.GenericValue entity)
throws Exception
- Throws:
Exception
getAssignableUsers
public Map getAssignableUsers(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue issue)
throws Exception
- Throws:
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 User getDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
org.ofbiz.core.entity.GenericValue component)
getProjectManager
public ProjectManager getProjectManager()
getVersionManager
public VersionManager getVersionManager()
processDefaultAssignee
protected String processDefaultAssignee(org.ofbiz.core.entity.GenericValue project,
String[] components,
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 GenericValuecomponents
- List of Long ids of componentsassignee
- Assignee to process, if -1 we have something to do
- Returns:
- Default assignee username
- Throws:
org.ofbiz.core.entity.GenericEntityException
processDefaultAssignee
protected String processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue,
org.ofbiz.core.entity.GenericValue project,
String assignee)
processDefaultAssignee
protected String processDefaultAssignee(org.ofbiz.core.entity.GenericValue issue,
String assignee)
getText
public String getText(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
-
addErrorCollection
public void addErrorCollection(ErrorCollection errors)
- Specified by:
addErrorCollection
in interface ErrorCollection
getField
public Field getField(String id)
getComponentManager
public ComponentManager getComponentManager()
getOutlookDate
public OutlookDate getOutlookDate()
getNameTranslation
public String getNameTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
getDescTranslation
public String getDescTranslation(org.ofbiz.core.entity.GenericValue issueConstantGV)
getReturnUrl
public String getReturnUrl()
setReturnUrl
public void setReturnUrl(String returnUrl)
getSavedFilters
public Collection getSavedFilters()
throws org.ofbiz.core.entity.GenericEntityException
- Return a list of saved filters for a particular person
- Throws:
org.ofbiz.core.entity.GenericEntityException
getFlushedErrorMessages
public Collection getFlushedErrorMessages()
- Specified by:
getFlushedErrorMessages
in interface ErrorCollection
getLanguage
public String getLanguage()
throws IOException
- Throws:
IOException
isHasCalendarTranslationForLanguage
public boolean isHasCalendarTranslationForLanguage()
throws IOException
- Throws:
IOException
getCalendarTranslationFilenameForLanguage
public String getCalendarTranslationFilenameForLanguage()
throws IOException
- Throws:
IOException
getSelectedProject
public org.ofbiz.core.entity.GenericValue getSelectedProject()
throws PermissionException
- Gets the "active" project. Projects become active when your browse, search for a single project or create an issue
- Returns:
GenericValue
as a project
- Throws:
PermissionException
setSelectedProjectId
public void setSelectedProjectId(Long id)
getDateFormat
public String getDateFormat()
getDateTimeFormat
public String getDateTimeFormat()
getTimeFormat
public String getTimeFormat()
getExternalLinkUtils
public static ExternalLinkUtil getExternalLinkUtils()
Copyright © 2002-2006 Atlassian. All Rights Reserved.