public class ConfluenceActionSupport extends com.opensymphony.xwork.ActionSupport implements com.opensymphony.xwork.LocaleProvider, WebInterface, MessageHolderAware
Modifier and Type | Field and Description |
---|---|
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 com.atlassian.plugin.PluginAccessor |
pluginAccessor |
static String |
PREVIEW |
protected SettingsManager |
settingsManager |
protected SpacePermissionManager |
spacePermissionManager |
protected UserAccessor |
userAccessor |
protected com.atlassian.plugin.web.WebInterfaceManager |
webInterfaceManager |
Constructor and Description |
---|
ConfluenceActionSupport() |
Modifier and Type | Method and 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()
Default webwork action execution method.
|
String |
formatFriendlyDate(Date date) |
String |
getActionName()
Returns the internationalised name of the current action.
|
String |
getActionName(String fullClassName) |
ConfluenceUser |
getAuthenticatedUser()
Return the user from
AuthenticatedUserThreadLocal.get() . |
BootstrapManager |
getBootstrapManager() |
protected String |
getCancel()
get the value of the cancel parameter
|
String |
getCancelResult() |
Map<String,Object> |
getContext() |
String |
getDateFormatSetting() |
DateFormatter |
getDateFormatter() |
ResourceBundle |
getDefaultResourceBundle() |
TimeZone |
getDefaultTimeZone() |
String |
getDocLink(String page)
Creates a version specific documentation link for the provided page.
|
com.atlassian.event.EventManager |
getEventManager() |
FriendlyDateFormatter |
getFriendlyDateFormatter() |
Settings |
getGlobalSettings() |
ThemeHelper |
getHelper() |
I18NBean |
getI18n() |
List<Language> |
getInstalledLanguages() |
LabelManager |
getLabelManager() |
LanguageManager |
getLanguageManager() |
String |
getLanguageUserFriendly(String locale) |
Locale |
getLocale() |
LocaleManager |
getLocaleManager() |
String |
getLocaleString() |
MessageHolder |
getMessageHolder() |
String |
getNiceContentType(ContentEntityObject entityObject)
Deprecated.
since 4.2 - use ContentUiSupport directly
|
protected List<String> |
getPermissionTypes() |
protected List |
getPermittedEntitiesOf(Iterator entities,
int maxCount) |
protected List |
getPermittedEntitiesOf(Iterator entities,
int maxCount,
List criteria) |
protected List |
getPermittedEntitiesOf(List entities) |
Date |
getPreviousLoginDate() |
com.atlassian.user.User |
getRemoteUser()
Deprecated.
since 5.2. Use
getAuthenticatedUser() instead. |
Map |
getSession() |
SystemInformationService |
getSystemInformationService() |
String |
getText(String key) |
String |
getText(String key,
List list) |
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.
|
static String |
getTextStatic(String key) |
static String |
getTextStatic(String key,
Object[] list) |
String |
getTextStrict(String key) |
TimeZone |
getTimeZone() |
com.atlassian.user.User |
getUser(String username)
Deprecated.
since 5.2. Use
getUserByName(String) instead. |
UserAccessor |
getUserAccessor() |
ConfluenceUser |
getUserByName(String username)
Returns user by name.
|
String |
getUserFullName(String username) |
protected UserInterfaceState |
getUserInterfaceState() |
String |
getUserLocaleDefaultDatePattern() |
String |
getUserProfilePicUrl() |
WebInterfaceContext |
getWebInterfaceContext()
Returns a context which can be passed to web items when rendering them.
|
com.atlassian.plugin.web.WebInterfaceManager |
getWebInterfaceManager() |
protected boolean |
hasPermissionForSpace(List permissionTypes,
Space space) |
boolean |
isAnonymousUser() |
boolean |
isCanceled()
Has this action been cancelled? Used by
CancellingInterceptor 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 |
isPermissionCheck() |
boolean |
isPermitted() |
String |
isPermittedAsString() |
boolean |
isPrintableVersion() |
boolean |
isSharedMode()
Deprecated.
Since 5.1. "Shared mode" no longer supported, always returns false;
|
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 suprisingly 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 suprisingly difficult to
have a generic piece of logic that can be used in decorators.
|
void |
setApiDateFormatService(DateFormatService dateFormatService) |
void |
setBootstrapManager(BootstrapManager bootstrapManager) |
void |
setCancel(String cancel)
Set by the "cancel" button on forms.
|
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 |
setPermissionCheck(boolean permissionCheck) |
void |
setPermissionManager(PermissionManager permissionManager) |
void |
setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor) |
void |
setPreviousLoginDate(Date previousLoginDate) |
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) |
addActionError, addActionMessage, addFieldError, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, setActionErrors, setActionMessages, setFieldErrors, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
validate
public static final String CANCEL
public static final String PREVIEW
public static final String LICENSE_EXPIRED
public static final String LICENSE_USERS_EXCEEDED
public static final String DEVMODE
protected UserAccessor userAccessor
protected com.atlassian.event.EventManager eventManager
protected SpacePermissionManager spacePermissionManager
protected PermissionManager permissionManager
protected SettingsManager settingsManager
protected LabelManager labelManager
protected LanguageManager languageManager
protected I18NBeanFactory i18NBeanFactory
protected MessageHolder messageHolder
protected com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager
protected boolean permitted
protected com.atlassian.plugin.PluginAccessor pluginAccessor
public void setCancel(String cancel)
CancellingInterceptor
that an action should
not be executed, and should just return its getCancelResult()
result.cancel
- Any non-null, non-empty string value.public boolean isCanceled()
CancellingInterceptor
to determine if the action should be executed.setCancel(String)
protected String getCancel()
public String doDefault() throws Exception
doDefault
in class com.opensymphony.xwork.ActionSupport
Exception
- if something goes wrongpublic String getText(String key)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
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.
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public String getText(String key, List list)
getText
in interface com.opensymphony.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public String getActionName()
public boolean isPrintableVersion()
public String isPermittedAsString()
public boolean isPermitted()
public boolean isPermissionCheck()
public void setPermissionCheck(boolean permissionCheck)
@Deprecated public com.atlassian.user.User getRemoteUser()
getAuthenticatedUser()
instead.public ConfluenceUser getAuthenticatedUser()
AuthenticatedUserThreadLocal.get()
.
This user is usually set by UserThreadLocalFilter
for request threads.public ConfluenceUser getUserByName(String username)
username
- @Deprecated public com.atlassian.user.User getUser(String username)
getUserByName(String)
instead.public String getUserProfilePicUrl()
protected void addPermissionTypeTo(String permissionType, List<String> permissionTypes)
protected List getPermittedEntitiesOf(Iterator entities, int maxCount, List criteria)
public void setPreviousLoginDate(Date previousLoginDate)
public Date getPreviousLoginDate()
public boolean isExternalUserManagementEnabled()
protected void addToHistory(ContentEntityObject content)
public Map getSession()
protected UserInterfaceState getUserInterfaceState()
public boolean isAnonymousUser()
public boolean isDevMode()
public String getCancelResult()
@Deprecated public String getNiceContentType(ContentEntityObject entityObject)
public ResourceBundle getDefaultResourceBundle()
public Settings getGlobalSettings()
public boolean isEmailVisible()
public boolean isLabelable(Object object)
public void setSettingsManager(SettingsManager settingsManager)
public com.atlassian.event.EventManager getEventManager()
public void setEventManager(com.atlassian.event.EventManager eventManager)
public void setBootstrapManager(BootstrapManager bootstrapManager)
public BootstrapManager getBootstrapManager()
public void setSpacePermissionManager(SpacePermissionManager spacePermissionManager)
public void setPermissionManager(PermissionManager permissionManager)
public com.atlassian.plugin.web.WebInterfaceManager getWebInterfaceManager()
public void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
public void setLabelManager(LabelManager labelManager)
public LabelManager getLabelManager()
public void setLanguageManager(LanguageManager languageManager)
public LanguageManager getLanguageManager()
public ThemeHelper getHelper()
public UserAccessor getUserAccessor()
public void setUserAccessor(UserAccessor userAccessor)
public void setLoginManager(LoginManager loginManager)
public Locale getLocale()
getLocale
in interface com.opensymphony.xwork.LocaleProvider
getLocale
in class com.opensymphony.xwork.ActionSupport
public String getLocaleString()
public String getUserLocaleDefaultDatePattern()
public void setApiDateFormatService(DateFormatService dateFormatService)
public void addFieldError(String fieldName, String textKey, Object[] args)
fieldName
- field to apply error totextKey
- key to internationalised textargs
- args to be merged with text via standard MessageFormat rulespublic void addActionError(String textKey, Object... args)
textKey
- key to internationalised textargs
- args to be merged with text via standard MessageFormat rulespublic void addActionMessage(String textKey, Object... args)
textKey
- key to internationalised textargs
- args to be merged with text via standard MessageFormat rulespublic I18NBean getI18n()
public String getDocLink(String page)
page
- the page to link to (just the title)public SystemInformationService getSystemInformationService()
public void setSystemInformationService(SystemInformationService systemInformationService)
public void setLocaleManager(LocaleManager localeManager)
public LocaleManager getLocaleManager()
public void setI18NBeanFactory(I18NBeanFactory i18NBeanFactory)
public void setMessageHolder(MessageHolder messageHolder)
setMessageHolder
in interface MessageHolderAware
public MessageHolder getMessageHolder()
getMessageHolder
in interface MessageHolderAware
public TimeZone getTimeZone()
public TimeZone getDefaultTimeZone()
public DateFormatter getDateFormatter()
public FriendlyDateFormatter getFriendlyDateFormatter()
public String getDateFormatSetting()
public void setFormatSettingsManager(FormatSettingsManager formatSettingsManager)
public boolean isUsingHSQL()
public boolean isUsingH2()
public void setI18NBean(I18NBean i18NBean)
public WebInterfaceContext getWebInterfaceContext()
WebInterface
Typically, WebWork actions will implement this to provide extra details in the context such as content objects, and so on.
getWebInterfaceContext
in interface WebInterface
public boolean isSharedMode()
public boolean isUserStatusPluginEnabled()
public void setPluginAccessor(com.atlassian.plugin.PluginAccessor pluginAccessor)
public void setContentUiSupport(ContentUiSupport contentUiSupport)
public void setTimeZoneManager(com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager)
Copyright © 2003–2015 Atlassian. All rights reserved.
View cookie preferences