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
,AbstractBackupRestoreAction
,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
,ColourPickerAction
,ConfigureCaptchaAction
,ConfigureLanguageAction
,ConfigureLoggingAction
,ConfigureMobileAppsAction
,ConfigureMonitoringAction
,ConfigureRssFeedAction
,ConfirmEmailAction
,ContentNameSearchAction
,ContentRemigrationAction
,CreateRssFeedAction
,CustomHtmlAction
,CustomStylesheetAction
,DailyBackupAdminAction
,DashboardAction
,DraftAttachmentSearchAction
,DropAuthenticationAction
,EditSiteLogoAction
,EditStylesheetAction
,EncodingTestAction
,FindRestrictableEntitiesAction
,FlushCacheAction
,FlushIndexQueueAction
,FollowUserAction
,ForceUpgradeAction
,ForgotUserPasswordAction
,FourOhFiveAction
,FourOhFourAction
,GeneralConfigurationAction
,GetFutureSchedulesAction
,GlobalRssFeedAction
,HeartbeatAction
,HelpLinkAction
,HistoryAction
,HomepageAction
,IndexAction
,JobAction
,LikeAction
,ListNewOrUpdatedPagesAction
,ListWatchersAction
,LoadConsoleAction
,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
,WarmInstanceAction
,WysiwygConverterAction
,XsrfTokenExpiredAction
public class ConfluenceActionSupport extends AbstractI18nActionSupport implements com.opensymphony.xwork2.LocaleProvider, WebInterface, MessageHolderAware
Base class for all Confluence Struts actions. Mainly takes care of managing permissions, and a few other tasks that are common across all actions in the app.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected AccessModeService
accessModeService
static String
CANCEL
protected ContentUiSupport
contentUiSupport
static String
DEVMODE
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, useConfluenceSystemProperties.CONFLUENCE_DEV_MODE
instead.protected com.atlassian.event.EventManager
eventManager
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9 use #eventPublisherprotected com.atlassian.event.api.EventPublisher
eventPublisher
protected I18NBeanFactory
i18NBeanFactory
protected LabelManager
labelManager
protected LanguageManager
languageManager
static String
LICENSE_EXPIRED
static String
LICENSE_USERS_EXCEEDED
protected MessageHolder
messageHolder
protected PermissionManager
permissionManager
protected boolean
permitted
protected PersonService
personService
protected com.atlassian.plugin.PluginAccessor
pluginAccessor
static String
PREVIEW
protected SettingsManager
settingsManager
protected SpacePermissionManager
spacePermissionManager
protected SystemInformationService
systemInformationService
protected UserAccessor
userAccessor
protected com.atlassian.plugin.web.api.DynamicWebInterfaceManager
webInterfaceManager
-
Constructor Summary
Constructors Constructor Description ConfluenceActionSupport()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
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)
String
doDefault()
Convenient Action execution method which defaults to returning INPUTString
formatFriendlyDate(Date date)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, implement directly in necessary actions.String
getAccessMode()
Used by velocity to add to page meta data, indicating the current access modeString
getActionName()
Returns the internationalised name of the current action.String
getActionName(String fullClassName)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, usegetActionName()
orAbstractI18nActionSupport.getText(String)
instead.ConfluenceUser
getAuthenticatedUser()
Return the user fromAuthenticatedUserThreadLocal.get()
.protected BootstrapManager
getBootstrapManager()
Deprecated.since 7.20.0.BootstrapStatusProvider
getBootstrapStatusProvider()
protected String
getCancel()
get the value of the cancel parameterString
getCancelResult()
ConfluenceAccessManager
getConfluenceAccessManager()
ContentUiSupport
getContentUiSupport()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, already available on global Velocity context.Map<String,Object>
getContext()
protected javax.servlet.http.HttpServletRequest
getCurrentRequest()
protected javax.servlet.http.HttpSession
getCurrentSession()
String
getDateFormatSetting()
DateFormatter
getDateFormatter()
ResourceBundle
getDefaultResourceBundle()
TimeZone
getDefaultTimeZone()
DocumentationBean
getDocBean()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, already available on global Velocity context.String
getDocLink(String page)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, use$docBean.getLink(String)
in Velocity or implement directly in necessary actions.com.atlassian.event.EventManager
getEventManager()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9FriendlyDateFormatter
getFriendlyDateFormatter()
String
getFrontendServiceURL()
Returns the URL of the Confluence Frontend microservice.Settings
getGlobalSettings()
ThemeHelper
getHelper()
I18NBean
getI18n()
List<Language>
getInstalledLanguages()
We MUST use the accessor here, otherwise languageManager may be nullLabelManager
getLabelManager()
String
getLanguageJs()
LanguageManager
getLanguageManager()
String
getLanguageUserFriendly(String locale)
Locale
getLocale()
LocaleManager
getLocaleManager()
String
getLocaleString()
MessageHolder
getMessageHolder()
String
getNiceContentType(ContentEntityObject entityObject)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.2 - use ContentUiSupport directlyprotected PermissionManager
getPermissionManager()
protected List<String>
getPermissionTypes()
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)
protected PersonService
getPersonService()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.8.0, implement directly in necessary actions.Date
getPreviousLoginDate()
com.atlassian.user.User
getRemoteUser()
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.Map
getSession()
Deprecated, for removal: This API element is subject to removal in a future version.since 5.9.protected SystemInformationService
getSystemInformationService()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.5.5, use thesystemInformationService
protected field directly when extending this class.static String
getTextStatic(String key)
Deprecated.since 8.0 no replacementstatic String
getTextStatic(String key, Object[] list)
Deprecated.since 8.0 no replacementTimeZone
getTimeZone()
protected UserAccessor
getUserAccessor()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.8.0, use theuserAccessor
protected field directly when extending this class.ConfluenceUser
getUserByName(String username)
Returns user by name.String
getUserFullName(String username)
boolean
getUserHasBrowseUsersPermission()
Used by velocity to add to page meta data, indicating if the current user has browse users permission.boolean
getUserHasLicensedAccess()
Used by velocity to add to page meta data, indicating if the current user has licensed access to Confluence.protected UserInterfaceState
getUserInterfaceState()
String
getUserLocaleDefaultDatePattern()
String
getUserProfilePicUrl()
Deprecated, for removal: This API element is subject to removal in a future version.since 5.10.WebInterfaceContext
getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.com.atlassian.plugin.web.api.DynamicWebInterfaceManager
getWebInterfaceManager()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.5.5, use thewebInterfaceManager
protected field directly when extending this class.protected boolean
hasPermissionForSpace(List permissionTypes, Space space)
boolean
isAnonymousUser()
boolean
isCanceled()
Has this action been cancelled? Used byCancellingInterceptor
to determine if the action should be executed.boolean
isDevMode()
Returns true if the system property confluence.devmode is set and has the value "true".boolean
isEmailVisible()
boolean
isExternalUserManagementEnabled()
boolean
isLabelable(Object object)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, no replacement.boolean
isPermitted()
boolean
isPrintableVersion()
boolean
isSkipAccessCheck()
boolean
isUserStatusPluginEnabled()
Temporary method until we have plugin points to require i18n keys.boolean
isUsingH2()
Placing this method in ConfluenceActionSupport is a bit of a hack, but it is surprisingly difficult to have a generic piece of logic that can be used in decorators.boolean
isUsingHSQL()
Placing this method in ConfluenceActionSupport is a bit of a hack, but it is surprisingly difficult to have a generic piece of logic that can be used in decorators.void
setAccessModeService(AccessModeService accessModeService)
void
setApiDateFormatService(DateFormatService dateFormatService)
void
setApiPersonService(PersonService personService)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, implement directly in necessary actions.void
setBootstrapManager(BootstrapManager bootstrapManager)
Deprecated.since 8.5.3.void
setBootstrapStatusProvider(BootstrapStatusProvider bootstrapStatusProvider)
void
setCancel(String cancel)
Set by the "cancel" button on forms.void
setConfluenceAccessManager(ConfluenceAccessManager confluenceAccessManager)
void
setContentUiSupport(ContentUiSupport contentUiSupport)
void
setEventManager(com.atlassian.event.EventManager eventManager)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9 usesetEventPublisher(EventPublisher)
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
setServletRequestSupplier(com.google.common.base.Supplier<javax.servlet.http.HttpServletRequest> servletRequestSupplier)
Deprecated, for removal: This API element is subject to removal in a future version.since 7.0.1.void
setSettingsManager(SettingsManager settingsManager)
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)
void
useSkipAccessCheck(boolean skipAccessCheck)
For use byConfluenceAccessInterceptor
to indicate that access checking has already been performed.void
withServletRequestSupplier(Supplier<javax.servlet.http.HttpServletRequest> servletRequestSupplier)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.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, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocaleProvider, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, 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.opensymphony.xwork2.LocaleProvider
isValidLocale, isValidLocaleString
-
Methods inherited from interface com.atlassian.confluence.validation.MessageHolderAware
validate
-
-
-
-
Field Detail
-
CANCEL
public static final String CANCEL
- See Also:
- Constant Field Values
-
PREVIEW
public static final String PREVIEW
- See Also:
- Constant Field Values
-
LICENSE_EXPIRED
public static final String LICENSE_EXPIRED
- See Also:
- Constant Field Values
-
LICENSE_USERS_EXCEEDED
public static final String LICENSE_USERS_EXCEEDED
- See Also:
- Constant Field Values
-
DEVMODE
@Deprecated(forRemoval=true) public static final String DEVMODE
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, useConfluenceSystemProperties.CONFLUENCE_DEV_MODE
instead.- See Also:
- Constant Field Values
-
userAccessor
protected UserAccessor userAccessor
-
eventPublisher
protected com.atlassian.event.api.EventPublisher eventPublisher
-
eventManager
@Deprecated(forRemoval=true) protected com.atlassian.event.EventManager eventManager
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9 use #eventPublisher
-
spacePermissionManager
protected SpacePermissionManager spacePermissionManager
-
permissionManager
protected PermissionManager permissionManager
-
settingsManager
protected SettingsManager settingsManager
-
labelManager
protected LabelManager labelManager
-
languageManager
protected LanguageManager languageManager
-
contentUiSupport
protected ContentUiSupport contentUiSupport
-
i18NBeanFactory
protected I18NBeanFactory i18NBeanFactory
-
messageHolder
protected MessageHolder messageHolder
-
webInterfaceManager
protected com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager
-
systemInformationService
protected SystemInformationService systemInformationService
-
permitted
protected boolean permitted
-
accessModeService
protected AccessModeService accessModeService
-
personService
protected PersonService personService
-
pluginAccessor
protected com.atlassian.plugin.PluginAccessor pluginAccessor
-
-
Method Detail
-
setCancel
public void setCancel(String cancel)
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.
-
isCanceled
public boolean isCanceled()
Has this action been cancelled? Used byCancellingInterceptor
to determine if the action should be executed.- See Also:
setCancel(String)
-
getCancel
protected String getCancel()
get the value of the cancel parameter- Returns:
- the value of the cancel parameter if the action has been cancelled
-
doDefault
public String doDefault() throws Exception
Convenient Action execution method which defaults to returning INPUT- Throws:
Exception
-
getActionName
@Deprecated(forRemoval=true) public String getActionName(String fullClassName)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, usegetActionName()
orAbstractI18nActionSupport.getText(String)
instead.
-
getActionName
public String getActionName()
Returns the internationalised name of the current action.- Since:
- 3.1
-
isPrintableVersion
public boolean isPrintableVersion()
-
isPermitted
public boolean isPermitted()
-
useSkipAccessCheck
public final void useSkipAccessCheck(boolean skipAccessCheck)
For use byConfluenceAccessInterceptor
to indicate that access checking has already been performed.Do NOT under any circumstance use setter notation for this public method as doing so will make it parameter injectable.
-
isSkipAccessCheck
public boolean isSkipAccessCheck()
-
getRemoteUser
@Deprecated(forRemoval=true) public com.atlassian.user.User getRemoteUser()
Deprecated, for removal: This API element is subject to removal in a future version.since 5.2. UsegetAuthenticatedUser()
instead.
-
getAuthenticatedUser
public ConfluenceUser getAuthenticatedUser()
Return the user fromAuthenticatedUserThreadLocal.get()
. This user is usually set byUserThreadLocalFilter
for request threads.- Returns:
- the remote user
- Since:
- 5.2
-
getUserByName
public ConfluenceUser getUserByName(String username)
Returns user by name. Lookups are cached.- Returns:
- user by name
- Since:
- 5.2
-
getUserProfilePicUrl
@Deprecated(since="5.10", forRemoval=true) public String getUserProfilePicUrl()
Deprecated, for removal: This API element is subject to removal in a future version.since 5.10. Use $userAvatarUriReference, which is provided in the velocity context bySitemeshContextItemProvider
- Returns:
- the download path to the profile picture of the current user
-
addPermissionTypeTo
protected void addPermissionTypeTo(String permissionType, List<String> permissionTypes)
-
getPermittedEntitiesOf
protected <TYPE> List<TYPE> getPermittedEntitiesOf(Iterator<TYPE> entities, int maxCount, List<? extends PermissionManager.Criterion> criteria)
-
getPermittedEntitiesOf
protected <TYPE> List<TYPE> getPermittedEntitiesOf(Iterator<TYPE> entities, int maxCount)
-
setPreviousLoginDate
public void setPreviousLoginDate(Date previousLoginDate)
-
getPreviousLoginDate
public Date getPreviousLoginDate()
-
isExternalUserManagementEnabled
public boolean isExternalUserManagementEnabled()
-
setServletRequestSupplier
@Deprecated(forRemoval=true) public void setServletRequestSupplier(com.google.common.base.Supplier<javax.servlet.http.HttpServletRequest> servletRequestSupplier)
Deprecated, for removal: This API element is subject to removal in a future version.since 7.0.1. UsewithServletRequestSupplier(Supplier)
-
withServletRequestSupplier
@Deprecated(forRemoval=true) public void withServletRequestSupplier(Supplier<javax.servlet.http.HttpServletRequest> servletRequestSupplier)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0. UseActionContext.bind()
for testing.- Since:
- 7.0.1
-
getCurrentRequest
protected javax.servlet.http.HttpServletRequest getCurrentRequest()
-
getCurrentSession
protected javax.servlet.http.HttpSession getCurrentSession()
-
addToHistory
protected void addToHistory(ContentEntityObject content)
-
getSession
@Deprecated(forRemoval=true) public Map getSession()
Deprecated, for removal: This API element is subject to removal in a future version.since 5.9. This method is too tightly couple to the XWork API. No replacement
-
getUserInterfaceState
protected UserInterfaceState getUserInterfaceState()
-
isAnonymousUser
public boolean isAnonymousUser()
-
isDevMode
public boolean isDevMode()
Returns true if the system property confluence.devmode is set and has the value "true".- Returns:
- boolean
-
getFrontendServiceURL
public String getFrontendServiceURL()
Returns the URL of the Confluence Frontend microservice.- Returns:
- String
- Since:
- 5.10
-
getCancelResult
public String getCancelResult()
-
getNiceContentType
@Deprecated(forRemoval=true) public String getNiceContentType(ContentEntityObject entityObject)
Deprecated, for removal: This API element is subject to removal in a future version.since 4.2 - use ContentUiSupport directly
-
getDefaultResourceBundle
public ResourceBundle getDefaultResourceBundle()
-
getGlobalSettings
public Settings getGlobalSettings()
-
isEmailVisible
public boolean isEmailVisible()
-
isLabelable
@Deprecated(forRemoval=true) public boolean isLabelable(Object object)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, no replacement.
-
getUserHasLicensedAccess
public final boolean getUserHasLicensedAccess()
Used by velocity to add to page meta data, indicating if the current user has licensed access to Confluence.
-
getUserHasBrowseUsersPermission
public final boolean getUserHasBrowseUsersPermission()
Used by velocity to add to page meta data, indicating if the current user has browse users permission.- Since:
- 6.13.0
-
getAccessMode
public final String getAccessMode()
Used by velocity to add to page meta data, indicating the current access mode
-
setSettingsManager
public void setSettingsManager(SettingsManager settingsManager)
-
getEventManager
@Deprecated(forRemoval=true) public com.atlassian.event.EventManager getEventManager()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9
-
setEventManager
@Deprecated(forRemoval=true) public void setEventManager(com.atlassian.event.EventManager eventManager)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9 usesetEventPublisher(EventPublisher)
-
setEventPublisher
public void setEventPublisher(com.atlassian.event.api.EventPublisher eventPublisher)
- Since:
- 8.9
-
setBootstrapManager
@Deprecated public void setBootstrapManager(BootstrapManager bootstrapManager)
Deprecated.since 8.5.3. UsesetBootstrapStatusProvider(com.atlassian.confluence.setup.BootstrapStatusProvider)
instead.
-
setBootstrapStatusProvider
public void setBootstrapStatusProvider(BootstrapStatusProvider bootstrapStatusProvider)
- Since:
- 8.7
-
getBootstrapManager
@Deprecated protected BootstrapManager getBootstrapManager()
Deprecated.since 7.20.0. UsegetBootstrapStatusProvider()
instead.
-
getBootstrapStatusProvider
public BootstrapStatusProvider getBootstrapStatusProvider()
-
setSpacePermissionManager
public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
-
getPermissionManager
protected PermissionManager getPermissionManager()
-
setPermissionManager
public void setPermissionManager(PermissionManager permissionManager)
-
getWebInterfaceManager
@Deprecated(forRemoval=true) public com.atlassian.plugin.web.api.DynamicWebInterfaceManager getWebInterfaceManager()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.5.5, use thewebInterfaceManager
protected field directly when extending this class.Do not provide public getters for beans that allow mutation. Such beans can be accessed from Velocity templates.
-
setWebInterfaceManager
public void setWebInterfaceManager(com.atlassian.plugin.web.api.DynamicWebInterfaceManager webInterfaceManager)
-
setLabelManager
public void setLabelManager(LabelManager labelManager)
-
getLabelManager
public LabelManager getLabelManager()
-
setLanguageManager
public void setLanguageManager(LanguageManager languageManager)
-
getLanguageManager
public LanguageManager getLanguageManager()
-
getHelper
public ThemeHelper getHelper()
-
getUserAccessor
@Deprecated(forRemoval=true) protected UserAccessor getUserAccessor()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.8.0, use theuserAccessor
protected field directly when extending this class.Do not provide public getters for beans that allow mutation. Such beans can be accessed from Velocity templates.
-
setUserAccessor
public void setUserAccessor(UserAccessor userAccessor)
-
setLoginManager
public void setLoginManager(LoginManager loginManager)
-
getTextStatic
@Deprecated(since="8.0") public static String getTextStatic(String key)
Deprecated.since 8.0 no replacement
-
getTextStatic
@Deprecated(since="8.0") public static String getTextStatic(String key, Object[] list)
Deprecated.since 8.0 no replacement
-
getLocale
public Locale getLocale()
- Specified by:
getLocale
in interfacecom.opensymphony.xwork2.LocaleProvider
- Overrides:
getLocale
in classcom.opensymphony.xwork2.ActionSupport
-
getLocaleString
public String getLocaleString()
-
getLanguageJs
public String getLanguageJs()
-
getUserLocaleDefaultDatePattern
public String getUserLocaleDefaultDatePattern()
-
setApiDateFormatService
public void setApiDateFormatService(DateFormatService dateFormatService)
-
getInstalledLanguages
public List<Language> getInstalledLanguages()
We MUST use the accessor here, otherwise languageManager may be null- See Also:
AbstractSetupAction
-
addFieldError
public void addFieldError(String fieldName, String textKey, Object[] args)
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
public void addActionError(String textKey, Object... args)
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
public void addActionMessage(String textKey, Object... args)
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
public I18NBean getI18n()
-
getDocLink
@Deprecated(forRemoval=true) public String getDocLink(String page)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, use$docBean.getLink(String)
in Velocity or implement directly in necessary actions.Creates a version specific documentation link for the provided page. This method exists because some error messages include links. Otherwise use $docBean which is available on the velocity context.- Parameters:
page
- the page to link to (just the title)- Returns:
- version specific documentation link.
-
getSystemInformationService
@Deprecated(forRemoval=true) protected SystemInformationService getSystemInformationService()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.5.5, use thesystemInformationService
protected field directly when extending this class.Do not provide public getters for beans that allow mutation. Such beans can be accessed from Velocity templates.
-
setSystemInformationService
public void setSystemInformationService(SystemInformationService systemInformationService)
-
setLocaleManager
public void setLocaleManager(LocaleManager localeManager)
-
getLocaleManager
public LocaleManager getLocaleManager()
-
setI18NBeanFactory
public void setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
-
setMessageHolder
public void setMessageHolder(MessageHolder messageHolder)
- Specified by:
setMessageHolder
in interfaceMessageHolderAware
-
getMessageHolder
public MessageHolder getMessageHolder()
- Specified by:
getMessageHolder
in interfaceMessageHolderAware
-
getTimeZone
public TimeZone getTimeZone()
-
getDefaultTimeZone
public TimeZone getDefaultTimeZone()
-
getDateFormatter
public DateFormatter getDateFormatter()
-
getFriendlyDateFormatter
public FriendlyDateFormatter getFriendlyDateFormatter()
-
getDateFormatSetting
public String getDateFormatSetting()
-
formatFriendlyDate
@Deprecated(forRemoval=true) public String formatFriendlyDate(Date date)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, implement directly in necessary actions.
-
setFormatSettingsManager
public void setFormatSettingsManager(FormatSettingsManager formatSettingsManager)
-
isUsingHSQL
public boolean isUsingHSQL()
Placing this method in ConfluenceActionSupport is a bit of a hack, but it is surprisingly difficult to have a generic piece of logic that can be used in decorators.- Returns:
- true if Confluence is currently using a Hypersonic database
-
isUsingH2
public boolean isUsingH2()
Placing this method in ConfluenceActionSupport is a bit of a hack, but it is surprisingly difficult to have a generic piece of logic that can be used in decorators.- Returns:
- true if Confluence is currently using an H2 database
-
setI18NBean
public void setI18NBean(I18NBean i18NBean)
-
getWebInterfaceContext
public WebInterfaceContext 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
-
isUserStatusPluginEnabled
public boolean isUserStatusPluginEnabled()
Temporary method until we have plugin points to require i18n keys. CONF-15428- Returns:
- true if "user status" is enabled.
-
setPluginAccessor
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
-
setContentUiSupport
public void setContentUiSupport(ContentUiSupport contentUiSupport)
-
setTimeZoneManager
public void setTimeZoneManager(com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager)
-
setConfluenceAccessManager
public void setConfluenceAccessManager(ConfluenceAccessManager confluenceAccessManager)
-
getConfluenceAccessManager
public ConfluenceAccessManager getConfluenceAccessManager()
-
setAccessModeService
public void setAccessModeService(AccessModeService accessModeService)
-
getPersonService
@Deprecated(forRemoval=true) protected PersonService getPersonService()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.8.0, implement directly in necessary actions.Do not provide public getters for beans that allow mutation. Such beans can be accessed from Velocity templates.
-
setApiPersonService
@Deprecated(forRemoval=true) public void setApiPersonService(PersonService personService)
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, implement directly in necessary actions.
-
getContentUiSupport
@Deprecated(forRemoval=true) public ContentUiSupport getContentUiSupport()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, already available on global Velocity context.
-
getDocBean
@Deprecated(forRemoval=true) public DocumentationBean getDocBean()
Deprecated, for removal: This API element is subject to removal in a future version.since 8.9.0, already available on global Velocity context.
-
-