|
||||||||||
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 BuildDefinitionManager |
buildDefinitionManager
|
protected BuildManager |
buildManager
|
protected CommentManager |
commentManager
|
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. 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. 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 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()
|
|
BuildManager |
getBuildManager()
|
|
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.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.Collection<java.lang.String> |
getFormattedErrorMessages()
Deprecated. |
|
java.lang.String |
getInstanceName()
|
|
com.opensymphony.webwork.dispatcher.json.JSONObject |
getJsonObject()
This is default property read by webwork for webwork's result type "json". |
|
int |
getNumberOfCurrentlyBuildingPlans(java.lang.String planKey)
|
|
TopLevelPlan |
getPlan(java.lang.String planKey)
|
|
PlanManager |
getPlanManager()
|
|
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)
|
|
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.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 |
setBuildManager(BuildManager buildManager)
|
|
void |
setCheckBoxFields(java.lang.String[] checkBoxFields)
|
|
void |
setCommentManager(CommentManager commentManager)
|
|
void |
setCookieCutter(CookieCutter cookieCutter)
|
|
void |
setDashboardCachingManager(DashboardCachingManager dashboardCachingManager)
|
|
void |
setEnableJavascript(boolean enableJavascript)
|
|
void |
setErrorMessages(java.util.Collection<java.lang.String> errorMessages)
Deprecated. Use ActionSupport.setActionErrors(Collection) instead |
|
void |
setI18nBeanFactory(I18nBeanFactory i18nBeanFactory)
|
|
void |
setPlanExecutionManager(PlanExecutionManager planExecutionManager)
|
|
void |
setPlanManager(PlanManager planManager)
|
|
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 BuildManager buildManager
protected BuildDefinitionManager buildDefinitionManager
protected ProjectManager projectManager
protected BambooPermissionManager bambooPermissionManager
protected AdministrationConfigurationManager administrationConfigurationManager
protected DashboardCachingManager dashboardCachingManager
protected PlanExecutionManager planExecutionManager
protected CommentManager commentManager
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()
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
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.public void addErrorMessage(java.lang.String message)
ActionSupport.addActionError(String)
instead
ErrorCollection
addErrorMessage
in interface ErrorCollection
message
- Error message.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 setBuildManager(BuildManager buildManager)
public BuildManager getBuildManager()
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 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 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 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 void setCommentManager(CommentManager commentManager)
public java.util.Collection<java.lang.String> getFormattedActionErrors()
@Deprecated public java.util.Collection<java.lang.String> getFormattedErrorMessages()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |