Package com.atlassian.confluence.core
Class ConfluenceActionSupport
- java.lang.Object
-
- com.opensymphony.xwork2.ActionSupport
-
- 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
,UploadAction
,UserMacroAction
,UserPopupAction
,ValidateLabelAjaxAction
,VelocityResultAction
,ViewIndexQueueAction
,ViewMailQueueAction
,ViewMailServersAction
,ViewSourceAction
,ViewSpaceDirectoryAction
,ViewSystemClasspathAction
,ViewSystemInfoAction
,ViewUserHistoryAction
,WarmInstanceAction
,WysiwygConverterAction
,XsrfTokenExpiredAction
public class ConfluenceActionSupport extends com.opensymphony.xwork2.ActionSupport 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
static String
DEVMODE
protected com.atlassian.event.EventManager
eventManager
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.WebInterfaceManager
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)
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)
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()
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()
String
getDocLink(String page)
Creates a version specific documentation link for the provided page.com.atlassian.event.EventManager
getEventManager()
FriendlyDateFormatter
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.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, use thepersonService
protected field directly when extending this class.Date
getPreviousLoginDate()
com.atlassian.user.User
getRemoteUser()
Deprecated.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.String
getText(String key)
String
getText(String key, Object[] args)
String
getText(String key, String defaultValue)
This can be used for internationalisation where a non-internationalised default string exists.String
getText(String key, String[] args)
String
getText(String key, String defaultValue, String obj)
String
getText(String key, String defaultValue, String[] args)
String
getText(String key, String defaultValue, List list)
String
getText(String key, List list)
static String
getTextStatic(String key)
Deprecated.since 8.0 no replacementstatic String
getTextStatic(String key, Object[] list)
Deprecated.since 8.0 no replacementString
getTextStrict(String key)
TimeZone
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.WebInterfaceManager
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)
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)
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)
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.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.WebInterfaceManager 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)
-
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
public static final String DEVMODE
- See Also:
- Constant Field Values
-
userAccessor
protected UserAccessor userAccessor
-
eventManager
protected com.atlassian.event.EventManager eventManager
-
spacePermissionManager
protected SpacePermissionManager spacePermissionManager
-
permissionManager
protected PermissionManager permissionManager
-
settingsManager
protected SettingsManager settingsManager
-
labelManager
protected LabelManager labelManager
-
languageManager
protected LanguageManager languageManager
-
i18NBeanFactory
protected I18NBeanFactory i18NBeanFactory
-
messageHolder
protected MessageHolder messageHolder
-
webInterfaceManager
protected com.atlassian.plugin.web.WebInterfaceManager 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
-
getText
public String getText(String key)
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue)
This can be used for internationalisation where a non-internationalised default string exists. If the key is null or returns a null value, then the default will be used instead.
Note the HtmlSafe annotation on this method. Ensure that you handle the defaultValue appropriately for display.
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, String obj)
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, List list)
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, List list)
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String[] args)
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
getText
public String getText(String key, String defaultValue, String[] args)
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
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 public com.atlassian.user.User getRemoteUser()
Deprecated.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 public void setServletRequestSupplier(com.google.common.base.Supplier<javax.servlet.http.HttpServletRequest> servletRequestSupplier)
Deprecated.since 7.0.1. UsewithServletRequestSupplier(java.util.function.Supplier)
-
withServletRequestSupplier
public void withServletRequestSupplier(Supplier<javax.servlet.http.HttpServletRequest> servletRequestSupplier)
- 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 public String getNiceContentType(ContentEntityObject entityObject)
Deprecated.since 4.2 - use ContentUiSupport directly
-
getDefaultResourceBundle
public ResourceBundle getDefaultResourceBundle()
-
getGlobalSettings
public Settings getGlobalSettings()
-
isEmailVisible
public boolean isEmailVisible()
-
isLabelable
public boolean isLabelable(Object object)
-
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
public com.atlassian.event.EventManager getEventManager()
-
setEventManager
public void setEventManager(com.atlassian.event.EventManager eventManager)
-
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.WebInterfaceManager 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.WebInterfaceManager 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
public String getDocLink(String page)
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()
-
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, use thepersonService
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.
-
setApiPersonService
public void setApiPersonService(PersonService personService)
-
getContentUiSupport
public ContentUiSupport getContentUiSupport()
-
getDocBean
public DocumentationBean getDocBean()
-
-