Class EditQuickFilterRuleAction
java.lang.Object
org.apache.struts2.ActionSupport
com.atlassian.bamboo.ww2.BambooActionSupport
com.atlassian.bamboo.configuration.GlobalAdminAction
com.atlassian.bamboo.ww2.actions.admin.EditQuickFilterRuleAction
- All Implemented Interfaces:
JsonStreamingAction,ErrorCollection,BambooSessionAware,NavigationAware,DomainObjectSecurityAware,GlobalAdminSecurityAware,GlobalReadSecurityAware,ReturnUrlAware,UserAware,com.atlassian.core.i18n.I18nTextProvider,Serializable,org.apache.struts2.action.Action,org.apache.struts2.interceptor.ValidationAware,org.apache.struts2.locale.LocaleProvider,org.apache.struts2.Preparable,org.apache.struts2.text.TextProvider,org.apache.struts2.Validateable
public class EditQuickFilterRuleAction
extends GlobalAdminAction
implements org.apache.struts2.Preparable
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
BambooActionSupport.JSONStatus -
Field Summary
Fields inherited from class com.atlassian.bamboo.configuration.GlobalAdminAction
RESTRICTED_ADMIN_ACCESS_DENIED_ERRORFields inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
ACCESS_DENIED, administrationConfigurationAccessor, administrationConfigurationManager, administrationConfigurationPersister, AGGREGATE_URL_PATTERN, authenticationContext, bambooPermissionManager, bambooUserManager, BUILD_KEY_CONTEXT, buildDefinitionManager, cachedPlanManager, CONFIRM, cookieCutter, deploymentProjectService, featureManager, PAGE_NOT_FOUND, PLAN_KEY_CONTEXT, planExecutionManager, planManager, pluginAccessor, projectManager, webInterfaceManagerFields inherited from class org.apache.struts2.ActionSupport
containerFields inherited from interface org.apache.struts2.action.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionconfirm()Confirm deletion of a quick filter rule.delete()Delete quick filter rule.execute()Save rule (either add or update).protected static <T> TgetCached(@NotNull AtomicReference<T> valueHolder, @NotNull Supplier<T> valueSupplier) Obtain a value from the given supplier, caching it in the passed holder variable.@NotNull org.json.JSONObjectThis is default property read by webwork for webwork's result type "json".longgetRule()longinput()Input form (for either new or existing rule).voidprepare()voidsetQuickFilterId(long quickFilterId) voidsetRuleId(long ruleId) voidsetRuleName(String ruleName) voidsetRuleTypeKey(String ruleTypeKey) Methods inherited from class com.atlassian.bamboo.configuration.GlobalAdminAction
getSecuredDomainObjectMethods inherited from class com.atlassian.bamboo.ww2.BambooActionSupport
addActionError, addActionError, addActionWarning, addError, addError, addErrorCollection, addErrorMessage, addErrorMessage, addErrorMessages, addFieldErrors, addHelpPanel, addIllegalArgumentException, areCheckBoxesEmpty, buildJsonObject, buildWebPanelContext, canRunBuild, checkFieldXssSafety, createFieldValidator, doDefault, doesHelpLinkHaveMatchingTitle, doesLabelKeyHaveMatchingDescription, doExecute, doInput, forceRelativeReturnUrl, getActionErrors, getActionWarnings, getAdministrationConfiguration, getAvailableCategoryJson, getBambooContainer, getBambooLicenseManager, getBambooPermissionManager, getBambooSession, getBambooUrl, getBambooUserManager, getBaseUrl, getBestBaseUrl, getBootstrapManager, getBreadCrumbs, getChainEquiv, getCheckBoxFields, getConcurrentBuildExecutionStrategyOptions, getConcurrentBuildsEnabled, getConglomerateCookieValue, getCookieCutter, getCookieValue, getCurrentFormTheme, getCurrentSystemTime, getCurrentUrl, getDecorator, getDefaultPersister, getDescriptionFromLabelKey, getElasticConfig, getErrorMessages, getErrors, getFeatureManager, getFieldErrorAccessTracker, getFieldErrors, getFormattedActionErrors, getFormattedActionMessages, getFormattedActionWarnings, getHelpPanels, getInstanceName, getJobEquiv, getNavigationContext, getNavigationUrl, getNodeLifecycleState, getNumberOfCurrentlyBuildingPlans, getPlan, getPlanManager, getPluginAccessor, getRandomString, getReturnUrl, getSessionUser, getText, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, getTextWithArgs, getTotalErrors, getUser, getValidatorContext, getWebFragmentsContextMap, getWebItemsForSection, getWebPanelContext, getWebSectionsForLocation, hasActionWarnings, hasAdminPermission, hasAnyErrors, hasBuilds, hasEntityPermission, hasGlobalAdminPermission, hasGlobalPermission, hasGlobalPermission, hasKey, hasPlanPermission, hasPlanPermission, hasProjectPermission, hasProjectPermission, hasRestrictedAdminPermission, hasResultKeyReadPermission, isCheckboxSetInAction, isEnableJavascript, isEnableSignup, isInlineDialog, isRestrictedAdminEnabled, isSelectFieldAndNull, isViewContactDetailsEnabled, renderFreemarkerTemplate, setAdministrationConfigurationAccessor, setAdministrationConfigurationManager, setAdministrationConfigurationPersister, setAuthenticationContext, setBambooLicenseManager, setBambooPermissionManager, setBambooUserManager, setBuildDefinitionManager, setCachedEnvironmentService, setCachedPlanManager, setChainEquiv, setCheckBoxFields, setCookieCutter, setCurrentFormTheme, setDecorator, setDeploymentProjectService, setDocumentationLinkProvider, setEnableJavascript, setErrorMessages, setFeatureManager, setI18nBeanFactory, setJobEquiv, setJsonator, setLocalizedTextProvider, setNavigationContext, setNodeLifecycleProvider, setPlanExecutionManager, setPlanManager, setPluginAccessor, setProfile, setProjectManager, setReturnUrl, setWebInterfaceManager, streamJson, toJson, toJsonMethods inherited from class org.apache.struts2.ActionSupport
addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionMessages, getContainer, getFormatted, getLocale, getLocaleProvider, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validateMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.bamboo.utils.error.ErrorCollection
getAllErrorMessagesMethods inherited from interface org.apache.struts2.interceptor.ValidationAware
addActionMessage, addFieldError, getActionMessages, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors
-
Constructor Details
-
EditQuickFilterRuleAction
public EditQuickFilterRuleAction()
-
-
Method Details
-
prepare
- Specified by:
preparein interfaceorg.apache.struts2.Preparable- Throws:
Exception
-
input
Input form (for either new or existing rule).- Overrides:
inputin classorg.apache.struts2.ActionSupport
-
execute
Save rule (either add or update).- Specified by:
executein interfaceorg.apache.struts2.action.Action- Overrides:
executein classorg.apache.struts2.ActionSupport
-
confirm
Confirm deletion of a quick filter rule. -
delete
Delete quick filter rule. -
getJsonObject
@NotNull public @NotNull org.json.JSONObject getJsonObject() throws org.json.JSONExceptionDescription copied from class:BambooActionSupportThis is default property read by webwork for webwork's result type "json".- Overrides:
getJsonObjectin classBambooActionSupport- Returns:
- Throws:
org.json.JSONException- See Also:
-
getRuleTypes
-
getRule
-
getRuleConfiguration
-
getQuickFilterId
public long getQuickFilterId() -
setQuickFilterId
public void setQuickFilterId(long quickFilterId) -
getRuleId
public long getRuleId() -
setRuleId
public void setRuleId(long ruleId) -
setRuleTypeKey
-
setRuleName
-
getCached
protected static <T> T getCached(@NotNull @NotNull AtomicReference<T> valueHolder, @NotNull @NotNull Supplier<T> valueSupplier) Obtain a value from the given supplier, caching it in the passed holder variable. The supplier will be only executed once, and the calculated result will be cached in the holder variable for future calls to avoid unnecessary calculations.
This method uses synchronization by intrinsic locking on the value holder param.
Example usage:
class MyClass { private final AtomicReference<User> currentUser = new AtomicReference<>(); ... public User getCurrentUser() { return getCached(currentUser, () -> userManager.getUser(authenticationContext.getCurrentUserName())); } }- Type Parameters:
T- type of returned value- Parameters:
valueHolder- a variable to cache the result of calling the suppliervalueSupplier- supplier of the value to be called once only- Returns:
- value returned by supplier or obtained from cache if it was already defined; if the value is stored in the cache, supplier will not be called.
- Throws:
NullPointerException- if the supplier returns a null value
-