Package com.atlassian.bamboo.ww2
Class BambooActionSupport
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- com.atlassian.bamboo.ww2.BambooActionSupport
-
- All Implemented Interfaces:
JsonStreamingAction,ErrorCollection,BambooSessionAware,NavigationAware,DomainObjectSecurityAware,GlobalReadSecurityAware,ReturnUrlAware,com.atlassian.core.i18n.I18nTextProvider,com.atlassian.struts.TextProvider,com.atlassian.struts.ValidationAware,com.opensymphony.xwork.ValidationAware,com.opensymphony.xwork2.Action,com.opensymphony.xwork2.interceptor.ValidationAware,com.opensymphony.xwork2.LocaleProvider,com.opensymphony.xwork2.TextProvider,com.opensymphony.xwork2.Validateable,Serializable
- Direct Known Subclasses:
AboutAction,AbstractAdminRestAction,AbstractCreateDeploymentVersion,AbstractDeploymentProjectConfigurationAction,AbstractDeploymentProjectDetailsAction,AbstractEntityPagerSupport,AbstractJiraIssueAction,AbstractJiraRelatedAction,AbstractNotificationBulkAction,AbstractPermissionAction,AbstractPluginConfigurationAction,AbstractRepositoryAction,AbstractRepositoryBulkAction,AbstractSetupAction,AccessDeniedAction,AdminErrorAction,AdministerAction,AdministerAuthors,AgentConsoleAction,AllBuildsRssFeedAction,AllowLicenseUpdateOrShowExpirationInfo,ArtifactUrlRedirectAction,BambooAgentInstallerAction,BambooCancellableAction,BuildExpiryAction,BuildJsonProviderAction,BulkPlanAction,ChainResultProviderAction,ChangeEmail,ChangeForgottenPassword,ChangePassword,CloneEnvironment,ConfigureAlias,ConfigureCloverPlugin,ConfigureDeploymentProjectSpecsRepositories,ConfigureEnvironment,ConfigureGlobalBuildHangingDetection,ConfigureGroup,ConfigurePage,ConfigureProfile,ConfigureUser,ConfigureUserAccessTokens,CreateAccessTokensAction,CreateChain,CreateDeploymentVersion,CreateEnvironment,CreateGroupAction,CreateProject,CreateSpecs,CronExpressionGeneratorAction,DeleteBuilds,DeploymentProjectAuditLog,DescribeAgentAvailability,ErrorAction,ErrorEventsAction,FilterCookieWriterAction,FiveOhOh,ForgotPassword,GetFingerprintAction,GlobalAdminAction,GotoAuthors,ImportMavenPlanAction,JiraRedirectAction,ListProjects,ListRunningInstances,Login,Login,Logout,Logout,LogToServer,ManualEncryptionAction,MoveEnvironment,PerformanceStatsAction,PerformanceStatsJmxAction,PlanActionSupport,PlanStatusHistoryAction,Profile,ProjectActionSupport,RemoveBuildError,ReorderBuild,RepositorySettingsAction,RssFeedAction,SelectAgentsAction,SetAgentBuildFilter,SignupUser,StarterAction,StopDeployment,SystemErrorList,SystemInfoAction,TestOgnlEscaping,ViewAdministrators,ViewAgent,ViewAgentDetailsAction,ViewAgentRecentBuildsSummary,ViewAgentRecentBuildsSummary,ViewAgents,ViewAggregatedAuthors,ViewAllDeploymentProjects,ViewAllRepositories,ViewAuthor,ViewAuthorChart,ViewAuthors,ViewAuthors,ViewBuildResultsForLabelAction,ViewBuildResultsTable,ViewBuildTaskTypes,ViewDeploymentProjects,ViewDeploymentProjectSpecs,ViewDeploymentResult,ViewDeploymentWebhookResponses,ViewEnvironment,ViewEnvironmentTaskTypes,ViewGlobalAuditLogAction,ViewProjectPlans,ViewProjectRepositories,ViewRejectedRequirements,ViewRemoteAgentAuthentications,ViewReport,ViewReportChart,ViewUserDetailsAdminAction,ViewUserSummary,ViewWebhookResponseDetails,YamlValidationAction
public class BambooActionSupport extends com.opensymphony.xwork2.ActionSupport implements ErrorCollection, ReturnUrlAware, BambooSessionAware, GlobalReadSecurityAware, com.atlassian.core.i18n.I18nTextProvider, NavigationAware, com.opensymphony.xwork.ValidationAware, com.atlassian.struts.ValidationAware, com.atlassian.struts.TextProvider, JsonStreamingAction
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBambooActionSupport.JSONStatus
-
Field Summary
-
Constructor Summary
Constructors Constructor Description BambooActionSupport()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidaddActionError(@NotNull Exception exception)voidaddActionError(@Nullable String errorMessage)voidaddActionWarning(@Nullable String errorMessage)voidaddError(String field, String message)Deprecated.since 1.0 UseActionSupport.addFieldError(String, String)insteadvoidaddError(String prefix, String field, String message)Adds a new form validation error with a given prefix.voidaddErrorCollection(@NotNull ErrorCollection errors)Populate this ErrorCollection with general and field-specific errors.StringaddErrorMessage(String message)Deprecated.since 1.0 UseaddActionError(String)insteadStringaddErrorMessage(String message, Exception e)voidaddErrorMessages(Collection<String> errorMessages)Append new error messages to those already collected.voidaddErrors(Map<String,?> errors)Deprecated.since 5.1voidaddFieldErrors(@NotNull Map<String,List<String>> errors)Append new field-specific errors to those already collected.voidaddHelpPanel(String helpPanel)voidaddIllegalArgumentException(String field, IllegalArgumentException e)protected booleanareCheckBoxesEmpty(String field)protected @NotNull com.opensymphony.webwork.dispatcher.json.JSONObjectbuildJsonObject()Builds JSONObject and sets 'status', 'errors' and 'fieldErrors' properties accordingly.protected @NotNull Map<String,Object>buildWebPanelContext(@NotNull String location)Builds a context suitable for renderingWebPanels viaFreemarkerContext.getWebPanels(String)In the future the results of this method may be cachedprotected voidcheckFieldXssSafety(String fieldName, String fieldValue)protected <T extends com.opensymphony.xwork2.validator.FieldValidator>
TcreateFieldValidator(@NotNull String fieldName, @NotNull Class<T> validatorClass, @NotNull String messageKey, @Nullable String[] messageParameters)Create WebWork's field validatorStringdoDefault()Deprecated.since 5.4 use a different method name, for example "execute"booleandoesHelpLinkHaveMatchingTitle(String helpKey)booleandoesLabelKeyHaveMatchingDescription(String labelKey)StringdoExecute()Deprecated.since 5.10 useActionSupport.execute()insteadStringdoInput()Deprecated.since 5.1 use ${#input()} instead.protected voidforceRelativeReturnUrl()converts current return URL to a path rooted under context.@NotNull List<String>getActionWarnings()protected @NotNull AdministrationConfigurationgetAdministrationConfiguration()Makes the current Admin configuration available to an actionStringgetAvailableCategoryJson()protected BamboogetBamboo()Allows access to the Bamboo container.protected BambooLicenseManagergetBambooLicenseManager()protected BambooPermissionManagergetBambooPermissionManager()BambooSessiongetBambooSession()BambooUrlgetBambooUrl()BambooUserManagergetBambooUserManager()@Nullable StringgetBaseUrl()@Nullable StringgetBestBaseUrl()BootstrapManagergetBootstrapManager()Collection<BreadCrumb>getBreadCrumbs()StringgetChainEquiv()booleangetConcurrentBuildsEnabled()StringgetConglomerateCookieValue(String cookieKey, String conglomerateKey)CookieCuttergetCookieCutter()@NotNull StringgetCookieValue(String key)StringgetCurrentFormTheme()LonggetCurrentSystemTime()@Nullable StringgetCurrentUrl()protected PersistergetDefaultPersister()Deprecated.since 5.10StringgetDescriptionFromLabelKey(String labelKey)@Nullable ElasticConfigurationgetElasticConfig()Collection<String>getErrorMessages()Deprecated.since 5.1 useActionSupport.getActionErrors()insteadMap<String,List<String>>getErrors()Deprecated.since 5.1 usegetFieldErrors()insteadFeatureManagergetFeatureManager()Set<String>getFieldErrorAccessTracker()Map<String,List<String>>getFieldErrors()Collection<String>getFlushedErrorMessages()Get error messages, then get rid of them.Collection<String>getFormattedActionErrors()List<String>getFormattedActionMessages()List<String>getFormattedActionWarnings()List<Map<String,Object>>getHelpPanels()@Nullable StringgetInstanceName()StringgetJobEquiv()@NotNull com.opensymphony.webwork.dispatcher.json.JSONObjectgetJsonObject()This is default property read by webwork for webwork's result type "json".NavigationContextgetNavigationContext()StringgetNavigationUrl()The url of the current action.intgetNumberOfCurrentlyBuildingPlans(String planKey)@Nullable ImmutableChaingetPlan(String planKey)PlanManagergetPlanManager()com.atlassian.plugin.PluginAccessorgetPluginAccessor()StringgetReturnUrl()ObjectgetSecuredDomainObject()@NotNull ServerLifecycleStategetServerLifecycleState()BambooUsergetSessionUser(String auth)StringgetText(String key)StringgetText(String s, Object[] objects)StringgetText(String key, String defaultValue)StringgetText(String key, String[] args)StringgetText(String key, String defaultValue, String obj)StringgetText(String key, String defaultValue, String[] args)StringgetText(String key, String defaultValue, String[] args, com.opensymphony.xwork2.ognl.OgnlValueStack stack)Deprecated.since 5.1StringgetText(String key, String defaultValue, String[] args, com.opensymphony.xwork2.util.ValueStack stack)StringgetText(String key, String defaultValue, List args)StringgetText(String key, String defaultValue, List args, com.opensymphony.xwork2.ognl.OgnlValueStack stack)Deprecated.since 5.1StringgetText(String key, String defaultValue, List args, com.opensymphony.xwork2.util.ValueStack stack)StringgetText(String key, List args)protected com.opensymphony.xwork2.TextProvidergetTextProvider()ResourceBundlegetTexts()ResourceBundlegetTexts(String bundleName)StringgetTextWithArgs(String key, String... args)intgetTotalErrors()@Nullable com.atlassian.user.UsergetUser()protected com.opensymphony.xwork2.validator.DelegatingValidatorContextgetValidatorContext()Can be used for WebWork's validationMap<String,Object>getWebFragmentsContextMap()List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor>getWebItemsForSection(String sectionName)@NotNull Map<String,Object>getWebPanelContext(@NotNull String location)Returns for the context for aWebPanelbased on the location specified In the future the results of this method may be cachedList<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor>getWebSectionsForLocation(String location)booleanhasActionWarnings()booleanhasAdminPermission()booleanhasAnyErrors()Whether any errors (of any type - field-specific or otherwise) have been collected.booleanhasBuilds()booleanhasEntityPermission(String permission, Object object)booleanhasGlobalAdminPermission()booleanhasGlobalPermission(String permission)Does this user have the global permission right?booleanhasGlobalPermission(org.acegisecurity.acls.Permission permission)booleanhasKey(String key)booleanhasPlanPermission(String permission, PlanIdentifier plan)booleanhasPlanPermission(String permission, String planKey)You should always prefer usinghasPlanPermission(String, PlanIdentifier)if you have or you are about to have Plan reference.booleanhasProjectPermission(String permission, String projectKey)booleanhasProjectPermission(org.acegisecurity.acls.Permission permission, String projectKey)Does this user have the project permission right?booleanhasRestrictedAdminPermission()booleanhasResultKeyReadPermission(ResultKey resultKey)booleanisCheckboxSetInAction(@NotNull String checkboxName)booleanisEnableJavascript()booleanisEnableSignup()booleanisInlineDialog()booleanisRestrictedAdminEnabled()booleanisSelectFieldAndNull(String buildKeysField)booleanisViewContactDetailsEnabled()StringrenderFreemarkerTemplate(String templateString)voidsetAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)voidsetAdministrationConfigurationManager(AdministrationConfigurationManager administrationConfigurationManager)voidsetAdministrationConfigurationPersister(AdministrationConfigurationPersister administrationConfigurationPersister)voidsetAuthenticationContext(BambooAuthenticationContext authenticationContext)voidsetBambooLicenseManager(BambooLicenseManager bambooLicenseManager)voidsetBambooPermissionManager(BambooPermissionManager bambooPermissionManager)voidsetBambooUserManager(BambooUserManager bambooUserManager)voidsetBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)voidsetCachedPlanManager(CachedPlanManager cachedPlanManager)voidsetChainEquiv(String chainEquiv)voidsetCheckBoxFields(String[] checkBoxFields)voidsetCookieCutter(CookieCutter cookieCutter)voidsetCurrentFormTheme(String currentFormTheme)voidsetDecorator(String decorator)voidsetDeploymentProjectService(DeploymentProjectService deploymentProjectService)voidsetDocumentationLinkProvider(DocumentationLinkProvider documentationLinkProvider)voidsetEnableJavascript(boolean enableJavascript)voidsetEnvironmentService(EnvironmentService environmentService)voidsetErrorMessages(Collection<String> errorMessages)Deprecated.since 1.0 UseActionSupport.setActionErrors(Collection)insteadvoidsetFeatureManager(FeatureManager featureManager)voidsetI18nBeanFactory(I18nBeanFactory i18nBeanFactory)voidsetJobEquiv(String jobEquiv)voidsetJsonator(Jsonator jsonator)voidsetLocalizedTextProvider(com.opensymphony.xwork2.LocalizedTextProvider localizedTextProvider)voidsetNavigationContext(NavigationContext navigationContext)Set the current context for this actionvoidsetPlanExecutionManager(PlanExecutionManager planExecutionManager)voidsetPlanManager(PlanManager planManager)voidsetPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)voidsetProfile(String value)voidsetProjectManager(ProjectManager projectManager)voidsetReturnUrl(String returnUrl)voidsetServerLifecycleProvider(ServerLifecycleProvider serverLifecycleProvider)voidsetWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)voidstreamJson(JsonStream stream)StringtoJson(Object object)StringtoJson(Object object, Jsonator.EnumConversionMode enumConversionMode)-
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFormatted, getLocale, getLocaleProvider, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, 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
getAllErrorMessages
-
-
-
-
Field Detail
-
CONFIRM
public static final String CONFIRM
- See Also:
- Constant Field Values
-
ACCESS_DENIED
public static final String ACCESS_DENIED
- See Also:
- Constant Field Values
-
PAGE_NOT_FOUND
public static final String PAGE_NOT_FOUND
- See Also:
- Constant Field Values
-
PLAN_KEY_CONTEXT
public static final String PLAN_KEY_CONTEXT
- See Also:
- Constant Field Values
-
BUILD_KEY_CONTEXT
public static final String BUILD_KEY_CONTEXT
- See Also:
- Constant Field Values
-
AGGREGATE_URL_PATTERN
public static final String AGGREGATE_URL_PATTERN
- See Also:
- Constant Field Values
-
administrationConfigurationAccessor
protected AdministrationConfigurationAccessor administrationConfigurationAccessor
-
administrationConfigurationManager
@Deprecated protected AdministrationConfigurationManager administrationConfigurationManager
Deprecated.since 5.0
-
administrationConfigurationPersister
protected AdministrationConfigurationPersister administrationConfigurationPersister
-
authenticationContext
protected BambooAuthenticationContext authenticationContext
-
bambooPermissionManager
protected BambooPermissionManager bambooPermissionManager
-
bambooUserManager
protected BambooUserManager bambooUserManager
-
buildDefinitionManager
protected BuildDefinitionManager buildDefinitionManager
-
cachedPlanManager
protected CachedPlanManager cachedPlanManager
-
cookieCutter
protected CookieCutter cookieCutter
-
featureManager
protected FeatureManager featureManager
-
planExecutionManager
protected PlanExecutionManager planExecutionManager
-
planManager
protected PlanManager planManager
-
pluginAccessor
protected com.atlassian.plugin.PluginAccessor pluginAccessor
-
projectManager
protected ProjectManager projectManager
-
deploymentProjectService
protected DeploymentProjectService deploymentProjectService
-
webInterfaceManager
protected com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager
-
-
Method Detail
-
setProfile
public void setProfile(String value)
-
doDefault
@Deprecated public String doDefault() throws Exception
Deprecated.since 5.4 use a different method name, for example "execute"Default action just sends to the input- Throws:
Exception
-
getBambooSession
public BambooSession getBambooSession()
- Specified by:
getBambooSessionin interfaceBambooSessionAware
-
getBamboo
protected Bamboo getBamboo()
Allows access to the Bamboo container. Currently not injected using Spring- Returns:
- The singleton instance of
Bamboo.
-
getUser
@Nullable public @Nullable com.atlassian.user.User getUser()
-
getServerLifecycleState
@NotNull public @NotNull ServerLifecycleState getServerLifecycleState()
-
setServerLifecycleProvider
public void setServerLifecycleProvider(ServerLifecycleProvider serverLifecycleProvider)
-
doesLabelKeyHaveMatchingDescription
public boolean doesLabelKeyHaveMatchingDescription(String labelKey)
-
doesHelpLinkHaveMatchingTitle
public boolean doesHelpLinkHaveMatchingTitle(String helpKey)
-
hasGlobalPermission
public boolean hasGlobalPermission(String permission)
Does this user have the global permission right?- Parameters:
permission- - The global permission being checked.- Returns:
trueif the current user has this permission;falseotherwise.
-
hasGlobalPermission
public boolean hasGlobalPermission(org.acegisecurity.acls.Permission permission)
-
hasGlobalAdminPermission
public boolean hasGlobalAdminPermission()
-
hasRestrictedAdminPermission
public boolean hasRestrictedAdminPermission()
-
hasAdminPermission
public boolean hasAdminPermission()
-
hasProjectPermission
public boolean hasProjectPermission(org.acegisecurity.acls.Permission permission, String projectKey)Does this user have the project permission right?- Parameters:
permission- - The project permission being checked.projectKey- - The key of the project- Returns:
trueif the current user has this permission;falseotherwise.
-
hasPlanPermission
public boolean hasPlanPermission(String permission, String planKey)
You should always prefer usinghasPlanPermission(String, PlanIdentifier)if you have or you are about to have Plan reference.
-
hasPlanPermission
public boolean hasPlanPermission(String permission, PlanIdentifier plan)
-
hasResultKeyReadPermission
public boolean hasResultKeyReadPermission(ResultKey resultKey)
-
isRestrictedAdminEnabled
public boolean isRestrictedAdminEnabled()
-
isEnableSignup
public boolean isEnableSignup()
-
getConcurrentBuildsEnabled
public boolean getConcurrentBuildsEnabled()
-
isViewContactDetailsEnabled
public boolean isViewContactDetailsEnabled()
-
hasBuilds
public boolean hasBuilds()
-
getPlan
@Nullable public @Nullable ImmutableChain getPlan(String planKey)
-
getBreadCrumbs
public Collection<BreadCrumb> getBreadCrumbs()
-
setAuthenticationContext
public void setAuthenticationContext(BambooAuthenticationContext authenticationContext)
-
forceRelativeReturnUrl
protected void forceRelativeReturnUrl()
converts current return URL to a path rooted under context.
-
getReturnUrl
public String getReturnUrl()
- Specified by:
getReturnUrlin interfaceReturnUrlAware
-
setReturnUrl
public void setReturnUrl(String returnUrl)
- Specified by:
setReturnUrlin interfaceReturnUrlAware
-
getCurrentUrl
@Nullable public @Nullable String getCurrentUrl()
-
getCurrentSystemTime
public Long getCurrentSystemTime()
-
getBambooLicenseManager
protected BambooLicenseManager getBambooLicenseManager()
-
setBambooLicenseManager
public void setBambooLicenseManager(BambooLicenseManager bambooLicenseManager)
-
getBootstrapManager
public BootstrapManager getBootstrapManager()
-
getWebItemsForSection
public List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getWebItemsForSection(String sectionName)
-
getWebSectionsForLocation
public List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> getWebSectionsForLocation(String location)
-
getJsonObject
@NotNull public @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject getJsonObject() throws com.opensymphony.webwork.dispatcher.json.JSONExceptionThis is default property read by webwork for webwork's result type "json".- Returns:
- Throws:
com.opensymphony.webwork.dispatcher.json.JSONException- See Also:
- JSON Result
If descending classes need to add anything to JSON response these should override #buildJsonObject() method.
-
buildJsonObject
@NotNull protected @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject buildJsonObject() throws com.opensymphony.webwork.dispatcher.json.JSONExceptionBuilds JSONObject and sets 'status', 'errors' and 'fieldErrors' properties accordingly. If descending classes need to add anything to JSON response these should override this method.- Returns:
- Initialized JSONObject
- Throws:
com.opensymphony.webwork.dispatcher.json.JSONException
-
streamJson
public void streamJson(JsonStream stream) throws IOException, com.opensymphony.webwork.dispatcher.json.JSONException
- Specified by:
streamJsonin interfaceJsonStreamingAction- Throws:
IOExceptioncom.opensymphony.webwork.dispatcher.json.JSONException
-
addActionError
protected void addActionError(@NotNull @NotNull Exception exception)
-
addActionError
public void addActionError(@Nullable @Nullable String errorMessage)- Specified by:
addActionErrorin interfacecom.opensymphony.xwork2.interceptor.ValidationAware- Overrides:
addActionErrorin classcom.opensymphony.xwork2.ActionSupport
-
hasActionWarnings
public boolean hasActionWarnings()
-
addActionWarning
public void addActionWarning(@Nullable @Nullable String errorMessage)
-
addError
public void addError(String prefix, String field, String message)
Description copied from interface:ErrorCollectionAdds a new form validation error with a given prefix. ie. prefix of "builder.ant" and field "target" will result in a key of "builder.ant.target"- Specified by:
addErrorin interfaceErrorCollection- Parameters:
prefix- The prefix of the field in . formfield- The id of the form element in errormessage- The error message to display to the user
-
getFlushedErrorMessages
public Collection<String> getFlushedErrorMessages()
Description copied from interface:ErrorCollectionGet error messages, then get rid of them.- Specified by:
getFlushedErrorMessagesin interfaceErrorCollection- Returns:
- The (now cleared) error messages.
-
addErrorCollection
public void addErrorCollection(@NotNull @NotNull ErrorCollection errors)Description copied from interface:ErrorCollectionPopulate this ErrorCollection with general and field-specific errors.- Specified by:
addErrorCollectionin interfaceErrorCollection- Parameters:
errors- ErrorCollection whose errors/messages we obtain.
-
addErrorMessages
public void addErrorMessages(Collection<String> errorMessages)
Description copied from interface:ErrorCollectionAppend new error messages to those already collected.- Specified by:
addErrorMessagesin interfaceErrorCollection- Parameters:
errorMessages- Collection of error strings.
-
getErrors
@Deprecated public Map<String,List<String>> getErrors()
Deprecated.since 5.1 usegetFieldErrors()insteadDescription copied from interface:ErrorCollectionGet all field-specific errors.- Specified by:
getErrorsin interfaceErrorCollection- Returns:
- Map of String: String pairs, eg. {"assignee": "Assignee is required"}
-
getErrorMessages
@Deprecated public Collection<String> getErrorMessages()
Deprecated.since 5.1 useActionSupport.getActionErrors()insteadDescription copied from interface:ErrorCollectionGet all non field-specific error messages.- Specified by:
getErrorMessagesin interfaceErrorCollection- Returns:
- Collection of error Strings.
-
addErrors
@Deprecated public void addErrors(Map<String,?> errors)
Deprecated.since 5.1Description copied from interface:ErrorCollectionAppend new field-specific errors to those already collected.- Specified by:
addErrorsin interfaceErrorCollection- Parameters:
errors- AMapfromStringfield names, toStringerror messages, orCollections ofStringerror messages.
-
addFieldErrors
public void addFieldErrors(@NotNull @NotNull Map<String,List<String>> errors)Description copied from interface:ErrorCollectionAppend new field-specific errors to those already collected.- Specified by:
addFieldErrorsin interfaceErrorCollection- Parameters:
errors- AMapfromStringfield names, toStringerror messages, orCollections ofStringerror messages.
-
hasAnyErrors
public boolean hasAnyErrors()
Description copied from interface:ErrorCollectionWhether any errors (of any type - field-specific or otherwise) have been collected.- Specified by:
hasAnyErrorsin interfaceErrorCollection- Returns:
trueif there are errors;falseotherwise.
-
getTotalErrors
public int getTotalErrors()
- Specified by:
getTotalErrorsin interfaceErrorCollection
-
getFieldErrors
public Map<String,List<String>> getFieldErrors()
- Specified by:
getFieldErrorsin interfaceErrorCollection- Specified by:
getFieldErrorsin interfacecom.opensymphony.xwork2.interceptor.ValidationAware- Overrides:
getFieldErrorsin classcom.opensymphony.xwork2.ActionSupport
-
addError
@Deprecated public void addError(String field, String message)
Deprecated.since 1.0 UseActionSupport.addFieldError(String, String)insteadDescription copied from interface:ErrorCollectionAdd a field-specific error message.- Specified by:
addErrorin interfaceErrorCollection- Parameters:
field- Field name, eg. "assignee"message- Error message.
-
addErrorMessage
@Deprecated public String addErrorMessage(String message)
Deprecated.since 1.0 UseaddActionError(String)insteadDescription copied from interface:ErrorCollectionAdd error message relating to system state (not field-specific).- Specified by:
addErrorMessagein interfaceErrorCollection- Parameters:
message- Error message.
-
setErrorMessages
@Deprecated public void setErrorMessages(Collection<String> errorMessages)
Deprecated.since 1.0 UseActionSupport.setActionErrors(Collection)insteadDescription copied from interface:ErrorCollectionPopulate this ErrorCollection with a new set of messages (existing errors are lost).- Specified by:
setErrorMessagesin interfaceErrorCollection- Parameters:
errorMessages- List of error messageStrings.
-
addErrorMessage
public String addErrorMessage(String message, Exception e)
- Specified by:
addErrorMessagein interfaceErrorCollection
-
addIllegalArgumentException
public void addIllegalArgumentException(String field, IllegalArgumentException e)
-
setCookieCutter
public void setCookieCutter(CookieCutter cookieCutter)
-
getCookieCutter
public CookieCutter getCookieCutter()
-
setBambooPermissionManager
public void setBambooPermissionManager(BambooPermissionManager bambooPermissionManager)
-
getBambooPermissionManager
protected BambooPermissionManager getBambooPermissionManager()
-
setWebInterfaceManager
public void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
-
isSelectFieldAndNull
public boolean isSelectFieldAndNull(String buildKeysField)
-
getConglomerateCookieValue
public String getConglomerateCookieValue(String cookieKey, String conglomerateKey)
-
getDefaultPersister
@Deprecated protected Persister getDefaultPersister()
Deprecated.since 5.10
-
areCheckBoxesEmpty
protected boolean areCheckBoxesEmpty(String field)
-
getAdministrationConfiguration
@NotNull protected @NotNull AdministrationConfiguration getAdministrationConfiguration()
Makes the current Admin configuration available to an action- Returns:
- The admin settings
-
getBaseUrl
@Nullable public @Nullable String getBaseUrl()
-
getBambooUrl
public BambooUrl getBambooUrl()
-
getBestBaseUrl
@Nullable public @Nullable String getBestBaseUrl()
- Returns:
- returns base URL from the current request, if for some reason it's not available, falls back to the BaseURL. The URL ends with the request context and does not end with a slash. If root context is used, the last element of the URL will be the port
-
getInstanceName
@Nullable public @Nullable String getInstanceName()
-
getValidatorContext
protected com.opensymphony.xwork2.validator.DelegatingValidatorContext getValidatorContext()
Can be used for WebWork's validation- Returns:
-
createFieldValidator
@Nullable protected <T extends com.opensymphony.xwork2.validator.FieldValidator> T createFieldValidator(@NotNull @NotNull String fieldName, @NotNull @NotNull Class<T> validatorClass, @NotNull @NotNull String messageKey, @Nullable @Nullable String[] messageParameters)Create WebWork's field validator- Type Parameters:
T- class of the created FieldValidator object- Parameters:
fieldName- field to be validated by validatorvalidatorClass- validator classmessageKey- key of the error message to displaymessageParameters- parameters to use for formatting of the error message- Returns:
- FieldValidator object or null if creation failed
-
getText
public String getText(String s, Object[] objects)
- Specified by:
getTextin interfacecom.atlassian.core.i18n.I18nTextProvider
-
getTextProvider
protected com.opensymphony.xwork2.TextProvider getTextProvider()
- Overrides:
getTextProviderin classcom.opensymphony.xwork2.ActionSupport
-
hasKey
public boolean hasKey(String key)
- Specified by:
hasKeyin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
hasKeyin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key)
- Specified by:
getTextin interfacecom.atlassian.core.i18n.I18nTextProvider- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, String obj)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, List args)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String[] args)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, List args)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, String[] args)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
@Deprecated public String getText(String key, String defaultValue, List args, com.opensymphony.xwork2.ognl.OgnlValueStack stack)
Deprecated.since 5.1
-
getText
@Deprecated public String getText(String key, String defaultValue, String[] args, com.opensymphony.xwork2.ognl.OgnlValueStack stack)
Deprecated.since 5.1
-
getText
public String getText(String key, String defaultValue, String[] args, com.opensymphony.xwork2.util.ValueStack stack)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, List args, com.opensymphony.xwork2.util.ValueStack stack)
- Specified by:
getTextin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextin classcom.opensymphony.xwork2.ActionSupport
-
getTexts
public ResourceBundle getTexts(String bundleName)
- Specified by:
getTextsin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextsin classcom.opensymphony.xwork2.ActionSupport
-
getTexts
public ResourceBundle getTexts()
- Specified by:
getTextsin interfacecom.opensymphony.xwork2.TextProvider- Overrides:
getTextsin classcom.opensymphony.xwork2.ActionSupport
-
setCheckBoxFields
public void setCheckBoxFields(String[] checkBoxFields)
-
isCheckboxSetInAction
public boolean isCheckboxSetInAction(@NotNull @NotNull String checkboxName)
-
getNavigationUrl
public String getNavigationUrl()
Description copied from interface:NavigationAwareThe url of the current action.- Specified by:
getNavigationUrlin interfaceNavigationAware- Returns:
-
getChainEquiv
public String getChainEquiv()
- Specified by:
getChainEquivin interfaceNavigationAware- Returns:
- the chain equivilant url to this action (if you wish to explicitly define one)
-
setChainEquiv
public void setChainEquiv(String chainEquiv)
-
getJobEquiv
public String getJobEquiv()
- Specified by:
getJobEquivin interfaceNavigationAware- Returns:
- the job equivilant url to this action (if you wish to explicitly define one)
-
setJobEquiv
public void setJobEquiv(String jobEquiv)
-
setNavigationContext
public void setNavigationContext(NavigationContext navigationContext)
Description copied from interface:NavigationAwareSet the current context for this action- Specified by:
setNavigationContextin interfaceNavigationAware
-
getNavigationContext
public NavigationContext getNavigationContext()
- Specified by:
getNavigationContextin interfaceNavigationAware- Returns:
- the context for this action
-
getNumberOfCurrentlyBuildingPlans
public int getNumberOfCurrentlyBuildingPlans(String planKey)
- Returns:
- number of builds that are currently in the build pipeline (both queued and executing)
-
getSecuredDomainObject
public Object getSecuredDomainObject()
- Specified by:
getSecuredDomainObjectin interfaceDomainObjectSecurityAware
-
getBambooUserManager
public BambooUserManager getBambooUserManager()
-
setBambooUserManager
public void setBambooUserManager(BambooUserManager bambooUserManager)
-
getSessionUser
public BambooUser getSessionUser(String auth) throws BambooRemoteException
- Throws:
BambooRemoteException
-
isEnableJavascript
public boolean isEnableJavascript()
-
setEnableJavascript
public void setEnableJavascript(boolean enableJavascript)
-
getCurrentFormTheme
public String getCurrentFormTheme()
-
setCurrentFormTheme
public void setCurrentFormTheme(String currentFormTheme)
-
setAdministrationConfigurationAccessor
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
-
setAdministrationConfigurationManager
public void setAdministrationConfigurationManager(AdministrationConfigurationManager administrationConfigurationManager)
-
setAdministrationConfigurationPersister
public void setAdministrationConfigurationPersister(AdministrationConfigurationPersister administrationConfigurationPersister)
-
setProjectManager
public void setProjectManager(ProjectManager projectManager)
-
setEnvironmentService
public void setEnvironmentService(EnvironmentService environmentService)
-
setDeploymentProjectService
public void setDeploymentProjectService(DeploymentProjectService deploymentProjectService)
-
setBuildDefinitionManager
public void setBuildDefinitionManager(BuildDefinitionManager buildDefinitionManager)
-
getPlanManager
public PlanManager getPlanManager()
-
setPlanManager
public void setPlanManager(PlanManager planManager)
-
setCachedPlanManager
public void setCachedPlanManager(CachedPlanManager cachedPlanManager)
-
setPlanExecutionManager
public void setPlanExecutionManager(PlanExecutionManager planExecutionManager)
-
setI18nBeanFactory
public void setI18nBeanFactory(I18nBeanFactory i18nBeanFactory)
-
getPluginAccessor
public com.atlassian.plugin.PluginAccessor getPluginAccessor()
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
getFeatureManager
public FeatureManager getFeatureManager()
-
setFeatureManager
public void setFeatureManager(FeatureManager featureManager)
-
setJsonator
public void setJsonator(Jsonator jsonator)
-
getFormattedActionErrors
public Collection<String> getFormattedActionErrors()
-
getWebPanelContext
@NotNull public final @NotNull Map<String,Object> getWebPanelContext(@NotNull @NotNull String location)
Returns for the context for aWebPanelbased on the location specified In the future the results of this method may be cached- Parameters:
location-- Returns:
- context
-
getElasticConfig
@Nullable public @Nullable ElasticConfiguration getElasticConfig()
-
buildWebPanelContext
@NotNull protected @NotNull Map<String,Object> buildWebPanelContext(@NotNull @NotNull String location)
Builds a context suitable for renderingWebPanels viaFreemarkerContext.getWebPanels(String)In the future the results of this method may be cached- Parameters:
location-- Returns:
- context
-
setDecorator
public void setDecorator(String decorator)
-
isInlineDialog
public boolean isInlineDialog()
-
toJson
public String toJson(Object object, Jsonator.EnumConversionMode enumConversionMode)
-
getAvailableCategoryJson
public String getAvailableCategoryJson() throws com.opensymphony.webwork.dispatcher.json.JSONException
- Throws:
com.opensymphony.webwork.dispatcher.json.JSONException
-
addHelpPanel
public void addHelpPanel(String helpPanel)
-
doExecute
@Deprecated public String doExecute() throws Exception
Deprecated.since 5.10 useActionSupport.execute()instead- Throws:
Exception
-
doInput
@Deprecated public String doInput() throws Exception
Deprecated.since 5.1 use ${#input()} instead.- Throws:
Exception
-
setDocumentationLinkProvider
public void setDocumentationLinkProvider(DocumentationLinkProvider documentationLinkProvider)
-
setLocalizedTextProvider
public void setLocalizedTextProvider(com.opensymphony.xwork2.LocalizedTextProvider localizedTextProvider)
-
-