|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.opensymphony.xwork.ActionSupport com.atlassian.bamboo.ww2.BambooActionSupport
public class BambooActionSupport
Nested Class Summary | |
---|---|
static class |
BambooActionSupport.JSONStatus
|
Field Summary | |
---|---|
protected AdministrationConfigurationManager |
administrationConfigurationManager
|
protected BambooPermissionManager |
bambooPermissionManager
|
protected BambooUserManager |
bambooUserManager
|
protected BuildDefinitionManager |
buildDefinitionManager
|
static java.lang.String |
CONFIRM
|
protected CookieCutter |
cookieCutter
|
protected DashboardCachingManager |
dashboardCachingManager
|
protected PlanExecutionManager |
planExecutionManager
|
protected PlanManager |
planManager
|
protected ProjectManager |
projectManager
|
Fields inherited from class com.opensymphony.xwork.ActionSupport |
---|
LOG |
Fields inherited from interface com.opensymphony.xwork.Action |
---|
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Constructor Summary | |
---|---|
BambooActionSupport()
|
Method Summary | ||
---|---|---|
void |
addError(java.lang.String field,
java.lang.String message)
Deprecated. since 1.0 Use ActionSupport.addFieldError(String, String) instead |
|
void |
addError(java.lang.String prefix,
java.lang.String field,
java.lang.String message)
Adds a new form validation error with a given prefix. |
|
void |
addErrorCollection(ErrorCollection errors)
Populate this ErrorCollection with general and field-specific errors. |
|
void |
addErrorMessage(java.lang.String message)
Deprecated. since 1.0 Use ActionSupport.addActionError(String) instead |
|
java.lang.String |
addErrorMessage(java.lang.String message,
java.lang.Exception e)
|
|
void |
addErrorMessages(java.util.Collection<java.lang.String> errorMessages)
Append new error messages to those already collected. |
|
void |
addErrors(java.util.Map<java.lang.String,?> errors)
Append new field-specific errors to those already collected. |
|
void |
addIllegalArgumentException(java.lang.String field,
java.lang.IllegalArgumentException e)
|
|
protected boolean |
areCheckBoxesEmpty(java.lang.String field)
|
|
protected com.opensymphony.webwork.dispatcher.json.JSONObject |
buildJsonObject()
Builds JSONObject and sets 'status', 'errors' and 'fieldErrors' properties accordingly. |
|
protected java.util.Map<java.lang.String,java.lang.Object> |
buildWebPanelContext(java.lang.String location)
Builds a context suitable for rendering WebPanel s via #getWebPanels(String)
In the future the results of this method may be cached |
|
protected void |
checkFieldXssSafety(java.lang.String fieldName,
java.lang.String fieldValue)
|
|
protected
|
createFieldValidator(java.lang.String fieldName,
java.lang.Class<T> validatorClass,
java.lang.String messageKey,
java.lang.String[] messageParameters)
Create WebWork's field validator |
|
java.lang.String |
doDefault()
Default action just sends to the input |
|
boolean |
doesHelpLinkHaveMatchingTitle(java.lang.String helpKey)
|
|
boolean |
doesLabelKeyHaveMatchingDescription(java.lang.String labelKey)
|
|
java.lang.String |
doExecute()
Places the current user on the page |
|
java.lang.String |
execute()
|
|
protected AdministrationConfiguration |
getAdministrationConfiguration()
Makes the current Admin configuration available to an action |
|
protected Bamboo |
getBamboo()
Allows access to the Bamboo container. |
|
BambooLicenseManager |
getBambooLicenseManager()
|
|
BambooPermissionManager |
getBambooPermissionManager()
|
|
BambooSession |
getBambooSession()
|
|
BambooUserManager |
getBambooUserManager()
|
|
java.lang.String |
getBaseUrl()
|
|
BootstrapManager |
getBootstrapManager()
|
|
java.util.Collection<BreadCrumb> |
getBreadCrumbs()
|
|
java.lang.String |
getChainEquiv()
|
|
boolean |
getConcurrentBuildsEnabled()
|
|
java.lang.String |
getConglomerateCookieValue(java.lang.String cookieKey,
java.lang.String conglomerateKey)
|
|
CookieCutter |
getCookieCutter()
|
|
java.lang.String |
getCookieValue(java.lang.String key)
|
|
java.lang.String |
getCurrentFormTheme()
|
|
java.lang.Long |
getCurrentSystemTime()
|
|
static java.lang.String |
getCurrentUrl()
|
|
protected Persister |
getDefaultPersister()
|
|
java.lang.String |
getDescriptionFromLabelKey(java.lang.String labelKey)
|
|
java.util.Collection<java.lang.String> |
getFlushedErrorMessages()
Get error messages, then get rid of them. |
|
java.util.Collection<java.lang.String> |
getFormattedActionErrors()
|
|
java.util.List<java.lang.String> |
getFormattedActionMessages()
|
|
java.util.Collection<java.lang.String> |
getFormattedErrorMessages()
Deprecated. since 3.0 use #getFormattedActionErrors |
|
java.lang.String |
getInstanceName()
|
|
java.lang.String |
getJobEquiv()
|
|
com.opensymphony.webwork.dispatcher.json.JSONObject |
getJsonObject()
This is default property read by webwork for webwork's result type "json". |
|
NavigationContext |
getNavigationContext()
|
|
java.lang.String |
getNavigationUrl()
The url of the current action. |
|
int |
getNumberOfCurrentlyBuildingPlans(java.lang.String planKey)
|
|
TopLevelPlan |
getPlan(java.lang.String planKey)
|
|
PlanManager |
getPlanManager()
|
|
com.atlassian.plugin.PluginAccessor |
getPluginAccessor()
|
|
java.lang.String |
getReturnUrl()
|
|
java.lang.Object |
getSecuredDomainObject()
|
|
BambooUser |
getSessionUser(java.lang.String auth)
|
|
java.lang.String |
getText(java.lang.String key)
|
|
java.lang.String |
getText(java.lang.String key,
java.util.List args)
|
|
java.lang.String |
getText(java.lang.String s,
java.lang.Object[] objects)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String[] args)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List args)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.util.List args,
com.opensymphony.xwork.util.OgnlValueStack stack)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String obj)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args)
|
|
java.lang.String |
getText(java.lang.String key,
java.lang.String defaultValue,
java.lang.String[] args,
com.opensymphony.xwork.util.OgnlValueStack stack)
|
|
java.util.ResourceBundle |
getTexts()
|
|
java.util.ResourceBundle |
getTexts(java.lang.String bundleName)
|
|
java.lang.String |
getTextWithArgs(java.lang.String key,
java.lang.String... args)
|
|
int |
getTotalErrors()
|
|
com.atlassian.user.User |
getUser()
|
|
protected com.opensymphony.xwork.validator.DelegatingValidatorContext |
getValidatorContext()
Can be used for WebWork's validation |
|
java.util.Map<java.lang.String,java.lang.Object> |
getWebFragmentsContextMap()
|
|
java.util.List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> |
getWebItemsForSection(java.lang.String sectionName)
|
|
java.util.Map<java.lang.String,java.lang.Object> |
getWebPanelContext(java.lang.String location)
Returns for the context for a WebPanel based on the location specified
In the future the results of this method may be cached |
|
java.util.List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> |
getWebSectionsForLocation(java.lang.String location)
|
|
boolean |
hasAdminPermission()
|
|
boolean |
hasAnyErrors()
Whether any errors (of any type - field-specific or otherwise) have been collected. |
|
boolean |
hasBuilds()
|
|
boolean |
hasGlobalAdminPermission()
|
|
boolean |
hasGlobalPermission(java.lang.String permission)
Does this user have the global permission right? |
|
boolean |
hasKey(java.lang.String key)
|
|
boolean |
hasPlanPermission(java.lang.String permission,
Plan plan)
|
|
boolean |
hasPlanPermission(java.lang.String permission,
java.lang.String buildKey)
|
|
boolean |
hasRestrictedAdminPermission()
|
|
boolean |
isCheckboxSetInAction(java.lang.String checkboxName)
|
|
boolean |
isEnableJavascript()
|
|
boolean |
isEnableSignup()
|
|
boolean |
isRestrictedAdminEnabled()
|
|
boolean |
isSelectFieldAndNull(java.lang.String buildKeysField)
|
|
java.lang.String |
renderFreemarkerTemplate(java.lang.String templateString)
|
|
void |
setAdministrationConfigurationManager(AdministrationConfigurationManager administrationConfigurationManager)
|
|
void |
setAuthenticationContext(BambooAuthenticationContext authenticationContext)
|
|
void |
setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
|
|
void |
setBambooPermissionManager(BambooPermissionManager bambooPermissionManager)
|
|
void |
setBambooUserManager(BambooUserManager bambooUserManager)
|
|
void |
setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
|
|
void |
setChainEquiv(java.lang.String chainEquiv)
|
|
void |
setCheckBoxFields(java.lang.String[] checkBoxFields)
|
|
void |
setCookieCutter(CookieCutter cookieCutter)
|
|
void |
setCurrentFormTheme(java.lang.String currentFormTheme)
|
|
void |
setDashboardCachingManager(DashboardCachingManager dashboardCachingManager)
|
|
void |
setEnableJavascript(boolean enableJavascript)
|
|
void |
setErrorMessages(java.util.Collection<java.lang.String> errorMessages)
Deprecated. since 1.0 Use ActionSupport.setActionErrors(Collection) instead |
|
void |
setI18nBeanFactory(I18nBeanFactory i18nBeanFactory)
|
|
void |
setJobEquiv(java.lang.String jobEquiv)
|
|
void |
setNavigationContext(NavigationContext navigationContext)
Set the current context for this action |
|
void |
setPlanExecutionManager(PlanExecutionManager planExecutionManager)
|
|
void |
setPlanManager(PlanManager planManager)
|
|
void |
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
|
|
void |
setProjectManager(ProjectManager projectManager)
|
|
void |
setReturnUrl(java.lang.String returnUrl)
|
|
void |
setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
|
Methods inherited from class com.opensymphony.xwork.ActionSupport |
---|
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, pause, setActionErrors, setActionMessages, setFieldErrors, validate |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection |
---|
getErrorMessages, getErrors, getFieldErrors |
Field Detail |
---|
public static final java.lang.String CONFIRM
protected CookieCutter cookieCutter
protected PlanManager planManager
protected BuildDefinitionManager buildDefinitionManager
protected ProjectManager projectManager
protected BambooPermissionManager bambooPermissionManager
protected AdministrationConfigurationManager administrationConfigurationManager
protected DashboardCachingManager dashboardCachingManager
protected BambooUserManager bambooUserManager
protected PlanExecutionManager planExecutionManager
Constructor Detail |
---|
public BambooActionSupport()
Method Detail |
---|
public java.lang.String doDefault() throws java.lang.Exception
doDefault
in class com.opensymphony.xwork.ActionSupport
java.lang.Exception
public BambooSession getBambooSession()
getBambooSession
in interface BambooSessionAware
protected Bamboo getBamboo()
Bamboo
.@Nullable public com.atlassian.user.User getUser()
public boolean doesLabelKeyHaveMatchingDescription(java.lang.String labelKey)
public boolean doesHelpLinkHaveMatchingTitle(java.lang.String helpKey)
public java.lang.String getDescriptionFromLabelKey(java.lang.String labelKey)
public boolean hasGlobalPermission(java.lang.String permission)
permission
- - The global permission being checked.
true
if the current user has this permission; false
otherwise.public boolean hasGlobalAdminPermission()
public boolean hasRestrictedAdminPermission()
public boolean hasAdminPermission()
public boolean hasPlanPermission(java.lang.String permission, java.lang.String buildKey)
public boolean hasPlanPermission(java.lang.String permission, Plan plan)
public boolean isRestrictedAdminEnabled()
public boolean isEnableSignup()
public boolean getConcurrentBuildsEnabled()
public boolean hasBuilds()
@Nullable public TopLevelPlan getPlan(java.lang.String planKey)
public java.util.Collection<BreadCrumb> getBreadCrumbs()
public void setAuthenticationContext(BambooAuthenticationContext authenticationContext)
public java.lang.String getReturnUrl()
getReturnUrl
in interface ReturnUrlAware
public void setReturnUrl(java.lang.String returnUrl)
setReturnUrl
in interface ReturnUrlAware
public static java.lang.String getCurrentUrl()
public java.lang.Long getCurrentSystemTime()
@NotNull public java.lang.String getCookieValue(java.lang.String key)
public BambooLicenseManager getBambooLicenseManager()
public void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
public BootstrapManager getBootstrapManager()
public java.util.List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getWebItemsForSection(java.lang.String sectionName)
public java.util.List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> getWebSectionsForLocation(java.lang.String location)
public java.lang.String renderFreemarkerTemplate(java.lang.String templateString)
public java.util.Map<java.lang.String,java.lang.Object> getWebFragmentsContextMap()
@NotNull public com.opensymphony.webwork.dispatcher.json.JSONObject getJsonObject() throws com.opensymphony.webwork.dispatcher.json.JSONException
com.opensymphony.webwork.dispatcher.json.JSONException
@NotNull protected com.opensymphony.webwork.dispatcher.json.JSONObject buildJsonObject() throws com.opensymphony.webwork.dispatcher.json.JSONException
com.opensymphony.webwork.dispatcher.json.JSONException
public void addError(java.lang.String prefix, java.lang.String field, java.lang.String message)
ErrorCollection
addError
in interface ErrorCollection
prefix
- The prefix of the field in . formfield
- The id of the form element in errormessage
- The error message to display to the userpublic java.util.Collection<java.lang.String> getFlushedErrorMessages()
ErrorCollection
getFlushedErrorMessages
in interface ErrorCollection
public void addErrorCollection(@NotNull ErrorCollection errors)
ErrorCollection
addErrorCollection
in interface ErrorCollection
errors
- ErrorCollection whose errors/messages we obtain.public void addErrorMessages(java.util.Collection<java.lang.String> errorMessages)
ErrorCollection
addErrorMessages
in interface ErrorCollection
errorMessages
- Collection of error strings.public void addErrors(java.util.Map<java.lang.String,?> errors)
ErrorCollection
addErrors
in interface ErrorCollection
errors
- A Map
from String
field names, to String
error messages, or Collection
s of
String
error messages.public boolean hasAnyErrors()
ErrorCollection
hasAnyErrors
in interface ErrorCollection
true
if there are errors; false
otherwise.public int getTotalErrors()
getTotalErrors
in interface ErrorCollection
@Deprecated public void addError(java.lang.String field, java.lang.String message)
ActionSupport.addFieldError(String, String)
instead
ErrorCollection
addError
in interface ErrorCollection
field
- Field name, eg. "assignee"message
- Error message.@Deprecated public void addErrorMessage(java.lang.String message)
ActionSupport.addActionError(String)
instead
ErrorCollection
addErrorMessage
in interface ErrorCollection
message
- Error message.@Deprecated public void setErrorMessages(java.util.Collection<java.lang.String> errorMessages)
ActionSupport.setActionErrors(Collection)
instead
ErrorCollection
setErrorMessages
in interface ErrorCollection
errorMessages
- List of error message String
s.public java.lang.String addErrorMessage(java.lang.String message, java.lang.Exception e)
addErrorMessage
in interface ErrorCollection
public void addIllegalArgumentException(java.lang.String field, java.lang.IllegalArgumentException e)
public void setCookieCutter(CookieCutter cookieCutter)
public CookieCutter getCookieCutter()
public void setBambooPermissionManager(BambooPermissionManager bambooPermissionManager)
public BambooPermissionManager getBambooPermissionManager()
public void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
public boolean isSelectFieldAndNull(java.lang.String buildKeysField)
public java.lang.String getConglomerateCookieValue(java.lang.String cookieKey, java.lang.String conglomerateKey)
protected Persister getDefaultPersister()
protected boolean areCheckBoxesEmpty(java.lang.String field)
@Nullable protected AdministrationConfiguration getAdministrationConfiguration()
@Nullable public java.lang.String getBaseUrl()
@Nullable public java.lang.String getInstanceName()
protected void checkFieldXssSafety(java.lang.String fieldName, java.lang.String fieldValue)
protected com.opensymphony.xwork.validator.DelegatingValidatorContext getValidatorContext()
@Nullable protected <T extends com.opensymphony.xwork.validator.FieldValidator> T createFieldValidator(@NotNull java.lang.String fieldName, @NotNull java.lang.Class<T> validatorClass, @NotNull java.lang.String messageKey, @Nullable java.lang.String[] messageParameters)
T
- class of the created FieldValidator objectfieldName
- field to be validated by validatorvalidatorClass
- validator classmessageKey
- key of the error message to displaymessageParameters
- parameters to use for formatting of the error message
public java.lang.String getText(java.lang.String s, java.lang.Object[] objects)
getText
in interface com.atlassian.core.i18n.I18nTextProvider
public boolean hasKey(java.lang.String key)
hasKey
in interface com.opensymphony.xwork.TextProvider
hasKey
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key)
getText
in interface com.atlassian.core.i18n.I18nTextProvider
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.lang.String obj)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.util.List args)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String[] args)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getTextWithArgs(java.lang.String key, java.lang.String... args)
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.util.List args)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.lang.String[] args)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.util.List args, com.opensymphony.xwork.util.OgnlValueStack stack)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.lang.String getText(java.lang.String key, java.lang.String defaultValue, java.lang.String[] args, com.opensymphony.xwork.util.OgnlValueStack stack)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public java.util.ResourceBundle getTexts(java.lang.String bundleName)
getTexts
in interface com.opensymphony.xwork.TextProvider
getTexts
in class com.opensymphony.xwork.ActionSupport
public java.util.ResourceBundle getTexts()
getTexts
in interface com.opensymphony.xwork.TextProvider
getTexts
in class com.opensymphony.xwork.ActionSupport
public java.lang.String doExecute() throws java.lang.Exception
java.lang.Exception
- something nasty went wrongpublic java.lang.String execute() throws java.lang.Exception
execute
in interface com.opensymphony.xwork.Action
execute
in class com.opensymphony.xwork.ActionSupport
java.lang.Exception
public void setCheckBoxFields(java.lang.String[] checkBoxFields)
public boolean isCheckboxSetInAction(@NotNull java.lang.String checkboxName)
public java.lang.String getNavigationUrl()
NavigationAware
getNavigationUrl
in interface NavigationAware
public java.lang.String getChainEquiv()
getChainEquiv
in interface NavigationAware
public void setChainEquiv(java.lang.String chainEquiv)
public java.lang.String getJobEquiv()
getJobEquiv
in interface NavigationAware
public void setJobEquiv(java.lang.String jobEquiv)
public void setNavigationContext(NavigationContext navigationContext)
NavigationAware
setNavigationContext
in interface NavigationAware
public NavigationContext getNavigationContext()
getNavigationContext
in interface NavigationAware
public int getNumberOfCurrentlyBuildingPlans(java.lang.String planKey)
public java.lang.Object getSecuredDomainObject()
getSecuredDomainObject
in interface DomainObjectSecurityAware
public void setDashboardCachingManager(DashboardCachingManager dashboardCachingManager)
public BambooUserManager getBambooUserManager()
public void setBambooUserManager(BambooUserManager bambooUserManager)
public BambooUser getSessionUser(java.lang.String auth) throws BambooRemoteException
BambooRemoteException
public boolean isEnableJavascript()
public void setEnableJavascript(boolean enableJavascript)
public java.lang.String getCurrentFormTheme()
public void setCurrentFormTheme(java.lang.String currentFormTheme)
public void setAdministrationConfigurationManager(AdministrationConfigurationManager administrationConfigurationManager)
public void setProjectManager(ProjectManager projectManager)
public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
public PlanManager getPlanManager()
public void setPlanManager(PlanManager planManager)
public void setPlanExecutionManager(PlanExecutionManager planExecutionManager)
public final void setI18nBeanFactory(I18nBeanFactory i18nBeanFactory)
public com.atlassian.plugin.PluginAccessor getPluginAccessor()
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
public java.util.Collection<java.lang.String> getFormattedActionErrors()
public java.util.List<java.lang.String> getFormattedActionMessages()
@Deprecated public java.util.Collection<java.lang.String> getFormattedErrorMessages()
@NotNull public final java.util.Map<java.lang.String,java.lang.Object> getWebPanelContext(@NotNull java.lang.String location)
WebPanel
based on the location specified
In the future the results of this method may be cached
location
-
@NotNull protected java.util.Map<java.lang.String,java.lang.Object> buildWebPanelContext(@NotNull java.lang.String location)
WebPanel
s via #getWebPanels(String)
In the future the results of this method may be cached
location
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |