Package com.atlassian.confluence.core
Class ConfluenceActionSupport
java.lang.Object
com.opensymphony.xwork2.ActionSupport
com.atlassian.confluence.core.AbstractI18nActionSupport
com.atlassian.confluence.core.ConfluenceActionSupport
- All Implemented Interfaces:
WebInterface
,MessageHolderAware
,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:
AboutPageAction
,AbstractCommandAction
,AbstractEntityPaginationAction
,AbstractFlushIndexQueueAction
,AbstractGroupAction
,AbstractLogoAction
,AbstractPageAwareAction
,AbstractPermissionsAction
,AbstractSetupAction
,AbstractSetupEmailAction
,AbstractSpaceAction
,AbstractTrustedApplicationAction
,AbstractUpdateLicenseAction
,AbstractUserProfileAction
,AbstractUserProfileAction
,AbstractUsersAction
,AbstractViewAction
,AbstractViewAttachmentsAction
,AbstractViewIndexQueueAction
,AddFavouriteAction
,AddLabelAction
,AddLabelAjaxAction
,AddSpaceToFavouriteAjaxAction
,AdministrationConsoleAction
,AdvancedSearchTipsAction
,AjaxLoginCompleteAction
,AllowAllAnnotationAction
,AttachedImagesAction
,AttachFileAction
,AttachmentNotFoundAction
,AuthenticateAction
,AutocompleteLabelsAction
,BreadcrumbAction
,BrowseCommentsAction
,BrowseMacrosAction
,BrowseShortcutsAction
,BrowseUnsyncedUsersAction
,ChangeCronJobScheduleAction
,ChangeSimpleJobScheduleAction
,ColorsStylesheetAction
,ConfigureCaptchaAction
,ConfigureLanguageAction
,ConfigureLoggingAction
,ConfigureMobileAppsAction
,ConfigureMonitoringAction
,ConfigureRssFeedAction
,ConfirmEmailAction
,ContentNameSearchAction
,ContentRemigrationAction
,CreateRssFeedAction
,CustomHtmlAction
,CustomStylesheetAction
,DashboardAction
,DecoratorAction
,DraftAttachmentSearchAction
,DropAuthenticationAction
,EditSiteLogoAction
,EditStylesheetAction
,EncodingTestAction
,FindRestrictableEntitiesAction
,FlushCacheAction
,FlushIndexQueueAction
,FollowUserAction
,ForceUpgradeAction
,ForgotUserPasswordAction
,FourOhFiveAction
,FourOhFourAction
,GeneralConfigurationAction
,GetFutureSchedulesAction
,GlobalRssFeedAction
,HeartbeatAction
,HelpLinkAction
,HistoryAction
,HomepageAction
,IndexAction
,LikeAction
,ListNewOrUpdatedPagesAction
,ListWatchersAction
,LogoutAction
,LongRunningTaskMonitorAction
,MacroDetailsAction
,MailServerTestConnectionAction
,MaintenanceConfigurationAction
,ManageAdminTaskAction
,MarkAllLogsAction
,NetworkFeedAction
,NoRequireAnnotationAction
,NotificationsAction
,OpenSearchDescriptorAction
,PageDestinationSearchAction
,PageNotFoundAction
,PageNotificationAction
,PageNotPermittedAction
,PeopleDirectoryAction
,PluginOsgiExportsAction
,ReadOnlyAccessAction
,RebuildAncestorTableAction
,RefreshLicensingAction
,ReindexTaskProgressAction
,RemoveFavouriteAction
,RemoveLabelAction
,RemoveLabelAjaxAction
,RemoveMailServerAction
,RemoveSpaceFromFavouriteAjaxAction
,RequireGetMethodAction
,RequirePostMethodAction
,ResetUserPasswordAction
,ResumeDraftAction
,SearchIndexesAction
,SearchSiteAction
,SecurityConfigurationAction
,SendTestEmailAction
,SiteDarkFeaturesAction
,SiteSupportAction
,SpacesConfigurationAction
,StaticRenderingAction
,ThemeColorsStylesheetAction
,TinyUrlAction
,UnFollowUserAction
,UserMacroAction
,UserPopupAction
,ValidateLabelAjaxAction
,VelocityResultAction
,ViewIndexQueueAction
,ViewMailQueueAction
,ViewMailServersAction
,ViewSourceAction
,ViewSpaceDirectoryAction
,ViewSystemClasspathAction
,ViewSystemInfoAction
,ViewUserHistoryAction
,WysiwygConverterAction
,XsrfTokenExpiredAction
public class ConfluenceActionSupport
extends AbstractI18nActionSupport
implements com.opensymphony.xwork2.LocaleProvider, WebInterface, MessageHolderAware
Base class for all Confluence Struts actions.
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected AccessModeService
static final String
protected ConfluenceAccessManager
protected ContentUiSupport
protected com.atlassian.event.api.EventPublisher
protected FormatSettingsManager
protected GlobalSettingsManager
protected I18NBeanFactory
protected LabelManager
protected LanguageManager
static final String
static final String
protected LocaleManager
protected LoginManager
protected MessageHolder
protected PermissionManager
protected com.atlassian.plugin.PluginAccessor
static final String
protected javax.servlet.http.HttpServletRequest
protected javax.servlet.http.HttpServletResponse
protected SpacePermissionManager
protected SystemInformationService
protected UserAccessor
protected com.atlassian.plugin.web.api.DynamicWebInterfaceManager
Fields inherited from class com.opensymphony.xwork2.ActionSupport
container
Fields inherited from interface com.opensymphony.xwork2.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addActionError
(String textKey, Object... args) Adds an error to the current action which will be displayed to the user.void
addActionMessage
(String textKey, Object... args) Adds a message to the current action which will be displayed to the user.void
addFieldError
(String fieldName, String textKey, Object[] args) Adds an error to the current action which will be displayed next to the specified field.protected void
addPermissionTypeTo
(String permissionType, List<String> permissionTypes) protected void
addToHistory
(ContentEntityObject content) Convenient Action execution method which defaults to returning INPUTReturns the internationalised name of the current action.protected ConfluenceUser
Return the user fromAuthenticatedUserThreadLocal.get()
.protected BootstrapStatusProvider
protected javax.servlet.http.HttpServletRequest
protected javax.servlet.http.HttpServletResponse
protected TimeZone
protected Settings
getI18n()
protected <TYPE> List<TYPE>
getPermittedEntitiesOf
(Iterator<TYPE> entities, int maxCount) protected <TYPE> List<TYPE>
getPermittedEntitiesOf
(Iterator<TYPE> entities, int maxCount, List<? extends PermissionManager.Criterion> criteria) protected <TYPE> List<TYPE>
getPermittedEntitiesOf
(List<TYPE> entities) getUserByName
(String username) Returns user by name.protected UserInterfaceState
Returns a context which can be passed to web items when rendering them.boolean
boolean
boolean
Consulted byPermissionCheckInterceptor
.void
setAccessModeService
(AccessModeService accessModeService) void
setBootstrapStatusProvider
(BootstrapStatusProvider bootstrapStatusProvider) void
Set by the "cancel" button on forms.void
setConfluenceAccessManager
(ConfluenceAccessManager confluenceAccessManager) void
setContentUiSupport
(ContentUiSupport contentUiSupport) void
setEventPublisher
(com.atlassian.event.api.EventPublisher eventPublisher) void
setFormatSettingsManager
(FormatSettingsManager formatSettingsManager) void
setI18NBean
(I18NBean i18NBean) void
setI18NBeanFactory
(I18NBeanFactory i18NBeanFactory) void
setLabelManager
(LabelManager labelManager) void
setLanguageManager
(LanguageManager languageManager) void
setLocaleManager
(LocaleManager localeManager) void
setLoginManager
(LoginManager loginManager) void
setMessageHolder
(MessageHolder messageHolder) void
setPermissionManager
(PermissionManager permissionManager) void
setPluginAccessor
(com.atlassian.plugin.PluginAccessor pluginAccessor) void
setPreviousLoginDate
(Date previousLoginDate) void
setSettingsManager
(GlobalSettingsManager settingsManager) final void
setSkipIsPermitted
(boolean shouldSkipIsPermitted) Deprecated, for removal: This API element is subject to removal in a future version.since 9.0.void
setSpacePermissionManager
(SpacePermissionManager spacePermissionManager) void
setSystemInformationService
(SystemInformationService systemInformationService) void
setTimeZoneManager
(com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager) void
setUserAccessor
(UserAccessor userAccessor) void
setWebInterfaceManager
(com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager) boolean
Deprecated, for removal: This API element is subject to removal in a future version.since 9.0.Methods inherited from class com.atlassian.confluence.core.AbstractI18nActionSupport
getText, getText, getText, getText, getText, getText, getText, getText, getTextStrict
Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getContainer, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, toLocale, validate
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString, toLocale
Methods inherited from interface com.atlassian.confluence.validation.MessageHolderAware
validate
-
Field Details
-
CANCEL
- See Also:
-
PREVIEW
- See Also:
-
LICENSE_EXPIRED
- See Also:
-
LICENSE_USERS_EXCEEDED
- See Also:
-
messageHolder
-
request
protected javax.servlet.http.HttpServletRequest request -
response
protected javax.servlet.http.HttpServletResponse response -
userAccessor
-
eventPublisher
protected com.atlassian.event.api.EventPublisher eventPublisher -
spacePermissionManager
-
permissionManager
-
confluenceAccessManager
-
globalSettingsManager
-
labelManager
-
languageManager
-
contentUiSupport
-
localeManager
-
i18NBeanFactory
-
webInterfaceManager
protected com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager -
formatSettingsManager
-
systemInformationService
-
loginManager
-
accessModeService
-
pluginAccessor
protected com.atlassian.plugin.PluginAccessor pluginAccessor
-
-
Constructor Details
-
ConfluenceActionSupport
public ConfluenceActionSupport()
-
-
Method Details
-
setCancel
Set by the "cancel" button on forms. This tells theCancellingInterceptor
that an action should not be executed, and should just return itsgetCancelResult()
result.- Parameters:
cancel
- Any non-null, non-empty string value.
-
doDefault
Convenient Action execution method which defaults to returning INPUT- Throws:
Exception
-
getActionName
Returns the internationalised name of the current action.- Since:
- 3.1
-
isPermitted
public boolean isPermitted()Consulted byPermissionCheckInterceptor
. -
getPermissionTypes
- See Also:
-
setSkipIsPermitted
@Deprecated(since="9.0", forRemoval=true) public final void setSkipIsPermitted(boolean shouldSkipIsPermitted) Deprecated, for removal: This API element is subject to removal in a future version.since 9.0. Use Atlassian annotations instead. See: Preparing for secure endpoints for details.Invoked byConfluenceAccessInterceptor
to indicate that access checking has already been performed toPermissionCheckInterceptor
. -
shouldSkipIsPermitted
Deprecated, for removal: This API element is subject to removal in a future version.since 9.0. Use Atlassian annotations instead. See: Preparing for secure endpoints for details. -
getAuthenticatedUser
Return the user fromAuthenticatedUserThreadLocal.get()
. This user is usually set byUserThreadLocalFilter
for request threads.- Returns:
- the remote user
- Since:
- 5.2
-
getUserByName
Returns user by name. Lookups are cached.- Returns:
- user by name
- Since:
- 5.2
-
addPermissionTypeTo
-
getPermittedEntitiesOf
-
getPermittedEntitiesOf
protected <TYPE> List<TYPE> getPermittedEntitiesOf(Iterator<TYPE> entities, int maxCount, List<? extends PermissionManager.Criterion> criteria) -
getPermittedEntitiesOf
-
setPreviousLoginDate
-
getPreviousLoginDate
-
getCurrentRequest
protected javax.servlet.http.HttpServletRequest getCurrentRequest() -
getCurrentResponse
protected javax.servlet.http.HttpServletResponse getCurrentResponse() -
addToHistory
-
getUserInterfaceState
-
isAnonymousUser
public boolean isAnonymousUser() -
getCancelResult
-
getGlobalSettings
-
isEmailVisible
public boolean isEmailVisible() -
setSettingsManager
-
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher) - Since:
- 8.9
-
setBootstrapStatusProvider
- Since:
- 8.7
-
getBootstrapStatusProvider
-
setSpacePermissionManager
-
setPermissionManager
-
setWebInterfaceManager
public void setWebInterfaceManager(com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager) -
setLabelManager
-
setLanguageManager
-
getHelper
-
setUserAccessor
-
setLoginManager
-
getLocale
- Specified by:
getLocale
in interfacecom.opensymphony.xwork2.LocaleProvider
- Overrides:
getLocale
in classcom.opensymphony.xwork2.ActionSupport
-
addFieldError
Adds an error to the current action which will be displayed next to the specified field. HTML-escapes any String arguments to avoid cross-site scripting problems with user input.- Parameters:
fieldName
- field to apply error totextKey
- key to internationalised textargs
- args to be merged with text via standard MessageFormat rules
-
addActionError
Adds an error to the current action which will be displayed to the user. HTML-escapes any String arguments to avoid cross-site scripting problems with user input.- Parameters:
textKey
- key to internationalised textargs
- args to be merged with text via standard MessageFormat rules
-
addActionMessage
Adds a message to the current action which will be displayed to the user. HTML-escapes any String arguments to avoid cross-site scripting problems with user input.- Parameters:
textKey
- key to internationalised textargs
- args to be merged with text via standard MessageFormat rules
-
getI18n
-
setSystemInformationService
-
setLocaleManager
-
setI18NBeanFactory
-
setMessageHolder
- Specified by:
setMessageHolder
in interfaceMessageHolderAware
-
getMessageHolder
- Specified by:
getMessageHolder
in interfaceMessageHolderAware
-
getActionErrors
- Specified by:
getActionErrors
in interfacecom.opensymphony.xwork2.interceptor.ValidationAware
- Overrides:
getActionErrors
in classcom.opensymphony.xwork2.ActionSupport
-
getActionMessages
- Specified by:
getActionMessages
in interfacecom.opensymphony.xwork2.interceptor.ValidationAware
- Overrides:
getActionMessages
in classcom.opensymphony.xwork2.ActionSupport
-
getFieldErrors
- Specified by:
getFieldErrors
in interfacecom.opensymphony.xwork2.interceptor.ValidationAware
- Overrides:
getFieldErrors
in classcom.opensymphony.xwork2.ActionSupport
-
getTimeZone
-
getDefaultTimeZone
-
getDateFormatter
-
setFormatSettingsManager
-
setI18NBean
-
getWebInterfaceContext
Description copied from interface:WebInterface
Returns a context which can be passed to web items when rendering them.Typically, Struts actions will implement this to provide extra details in the context such as content objects, and so on.
- Specified by:
getWebInterfaceContext
in interfaceWebInterface
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) -
setContentUiSupport
-
setTimeZoneManager
public void setTimeZoneManager(com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager) -
setConfluenceAccessManager
-
setAccessModeService
- Since:
- 6.8.0
-