Class BaseAction
java.lang.Object
com.opensymphony.xwork2.ActionSupport
com.atlassian.crowd.console.action.BaseAction
- All Implemented Interfaces:
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:
AbstractBrowser
,AbstractViewDirectory
,AddGroup
,ApplicationBaseAction
,BaseProgressStepAction
,BaseSetupAction
,BaseUserAction
,BrowseAuditLog
,BrowseDirectories
,BrowseWithDirectoryId
,ChangeExpiredPassword
,Console
,CreateDirectory
,DefaultStartPage
,EnableClustering
,EndpointTestAction
,ErrorAction
,GroupAction
,GroupLevelAdminGroupsAction
,License
,Panel
,RemoveDirectory
,RemoveGroup
,RemovePrincipal
,Restore
,SAMLAuthAction
,SystemInfo
,TestkitStrutsInfoAction
,UpdateConnectionPool
,UpdateConnectorConfiguration
,UpdateCustomAttributes
,UpdateGeneral
,UpdateInternalConfiguration
,UpdateLicensing
,UpdateLoggingProfiling
,UpdateMailServer
,UpdateMailTemplate
,UpdateOptions
,UpdatePermissions
,UpdateRemoteCrowdConnection
,UpdateSAMLConfiguration
,UpdateSessionConfig
,UpdateSpringLdapPoolConfiguration
,UpdateTrustedProxies
,ViewPicker
,ViewPrincipal
,ViewTrustedProxies
public class BaseAction
extends com.opensymphony.xwork2.ActionSupport
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionprotected ActionHelper
protected String
Webwork action messages color settings.static final String
static final String
static final String
static final String
protected ApplicationManager
protected ApplicationService
protected ClientProperties
protected ClusterService
protected CrowdLicenseManager
protected DirectoryManager
protected boolean
protected static final org.slf4j.Logger
protected PropertyManager
protected CrowdRememberMeService
protected static final int
protected Integer
protected TokenAuthenticationManager
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 TypeMethodDescriptionprotected void
void
addActionMessage
(String color, String message) Sets a UI message and the color type for the user.void
applyFieldError
(ValidationError error) void
applyFieldErrors
(Collection<FieldError> errors) void
boolean
authorisedToAccessCrowdAdminConsole
(DirectoryMapping directoryMapping, Long directoryId, String username) protected boolean
authorisedToAccessCrowdConsole
(Long directoryId, String name) protected void
boolean
boolean
directory
(long directoryID) execute()
findAvatarUrl
(User user, int sizeHint) Gets the action message color dressing to use with the decorator.protected CrowdBootstrapManager
protected Application
getDisplayableLink
(com.atlassian.plugin.web.model.WebLink link) protected javax.servlet.http.HttpServletRequest
getImageLocation
(boolean active, ApplicationType applicationType) getImageTitle
(boolean active, ApplicationType applicationType) getLabel
(com.atlassian.plugin.web.model.WebLabel label) com.atlassian.extras.api.crowd.CrowdLicense
getLink
(com.atlassian.plugin.web.model.WebLink link) protected com.opensymphony.xwork2.LocaleProvider
protected String
getPasswordComplexityMessage
(long directoryId) protected javax.servlet.http.HttpSession
getTab()
protected com.opensymphony.xwork2.TextProvider
com.atlassian.plugin.web.WebInterfaceManager
List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor>
getWebItemsForSection
(String sectionName) com.atlassian.webresource.api.WebResourceManager
List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor>
getWebSectionsForLocation
(String location) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
renderFreemarkerTemplate
(String templateString) protected String
resolveAvatarUri
(URI uri) Resolve a URI against a base of Crowd's context path to get a suitable URI for placing into a page.void
setActionHelper
(ActionHelper actionHelper) void
setApplicationManager
(ApplicationManager applicationManager) void
setApplicationService
(ApplicationService applicationService) void
setClientProperties
(ClientProperties clientProperties) void
setClusterService
(ClusterService clusterService) void
setCrowdApplication
(Application crowdApplication) void
setCrowdLicenseManager
(CrowdLicenseManager crowdLicenseManager) void
setDirectoryManager
(DirectoryManager directoryManager) void
setPropertyManager
(PropertyManager propertyManager) void
setRememberMeService
(CrowdRememberMeService rememberMeService) void
void
setTokenAuthenticationManager
(TokenAuthenticationManager tokenAuthenticationManager) void
setWebInterfaceManager
(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager) void
setWebResourceManager
(com.atlassian.webresource.api.WebResourceManager webResourceManager) void
setXsrfTokenGenerator
(XsrfTokenGenerator xsrfTokenGenerator) Methods inherited from class com.opensymphony.xwork2.ActionSupport
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
-
Field Details
-
logger
protected static final org.slf4j.Logger logger -
tab
-
initialLoad
protected boolean initialLoad -
actionMessageAlertColor
Webwork action messages color settings. Displays the type of message dressing to use. -
ALERT_GREEN
- See Also:
-
ALERT_YELLOW
- See Also:
-
ALERT_RED
- See Also:
-
ALERT_BLUE
- See Also:
-
SMALL_AVATAR_SIZE
protected static final int SMALL_AVATAR_SIZE- See Also:
-
propertyManager
-
directoryManager
-
applicationManager
-
crowdLicenseManager
-
applicationService
-
tokenAuthenticationManager
-
rememberMeService
-
clientProperties
-
actionHelper
-
clusterService
-
smallAvatarUrl
-
-
Constructor Details
-
BaseAction
public BaseAction()
-
-
Method Details
-
execute
- Specified by:
execute
in interfacecom.opensymphony.xwork2.Action
- Overrides:
execute
in classcom.opensymphony.xwork2.ActionSupport
- Throws:
Exception
-
applyFieldError
-
applyValidationErrors
-
isAuthenticated
public boolean isAuthenticated() -
isSysAdmin
public boolean isSysAdmin() -
isGroupAdmin
public boolean isGroupAdmin() -
getSitemeshPageProperties
-
getUserName
- Returns:
- username of the current logged in user, or
null
if the user is not authenticated - Throws:
InvalidUserException
-
getRemoteUser
-
getSession
protected javax.servlet.http.HttpSession getSession() -
getHttpRequest
protected javax.servlet.http.HttpServletRequest getHttpRequest() -
getTab
-
setTab
-
isInitialLoad
public boolean isInitialLoad() -
getLicense
public com.atlassian.extras.api.crowd.CrowdLicense getLicense() -
isEvaluation
public boolean isEvaluation() -
isLicenseForged
public boolean isLicenseForged() -
isRestartRequiredToEnableClustering
public boolean isRestartRequiredToEnableClustering() -
isSubscription
public boolean isSubscription()- Returns:
true
if the license is a subscription license,false
otherwise.
-
isWithinGracePeriod
public boolean isWithinGracePeriod()- Returns:
true
if the license
-
isLicenseExpired
public boolean isLicenseExpired() -
getActionMessageAlertColor
Gets the action message color dressing to use with the decorator.- Returns:
- The window dressing color to use.
-
addActionMessage
Sets a UI message and the color type for the user.- Parameters:
color
- The color to use.message
- The message to display.
-
getWebItemsForSection
-
getWebSectionsForLocation
-
renderFreemarkerTemplate
-
getWebFragmentsContextMap
-
getDisplayableLink
-
getLink
-
getLabel
-
directory
-
addActionError
-
containsErrorMessages
public boolean containsErrorMessages() -
containsActionMessages
public boolean containsActionMessages() -
setPropertyManager
-
setDirectoryManager
-
setCrowdLicenseManager
-
setApplicationManager
-
setWebInterfaceManager
public void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager) -
getWebInterfaceManager
public com.atlassian.plugin.web.WebInterfaceManager getWebInterfaceManager() -
getWebResourceManager
public com.atlassian.webresource.api.WebResourceManager getWebResourceManager() -
setWebResourceManager
public void setWebResourceManager(com.atlassian.webresource.api.WebResourceManager webResourceManager) -
getBootstrapManager
-
isAtResourceLimit
public boolean isAtResourceLimit() -
getCurrentLicenseResourceTotal
-
getImageTitle
-
getImageLocation
-
authorisedToAccessCrowdConsole
protected boolean authorisedToAccessCrowdConsole(Long directoryId, String name) throws DirectoryNotFoundException, UserNotFoundException -
authorisedToAccessCrowdAdminConsole
public boolean authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping, Long directoryId, String username) throws DirectoryNotFoundException, UserNotFoundException -
getText
-
getXsrfTokenName
-
getXsrfToken
-
getText
- Specified by:
getText
in interfacecom.opensymphony.xwork2.TextProvider
- Overrides:
getText
in classcom.opensymphony.xwork2.ActionSupport
-
setApplicationService
-
setTokenAuthenticationManager
-
setRememberMeService
-
setClientProperties
-
setXsrfTokenGenerator
-
getPasswordComplexityMessage
- Returns:
- the password complexity message for the specified directory, or null if there is none
-
getCrowdApplication
- Throws:
ApplicationNotFoundException
-
setCrowdApplication
-
setActionHelper
-
resolveAvatarUri
Resolve a URI against a base of Crowd's context path to get a suitable URI for placing into a page. For example, "path/avatar" would become "/crowd/path/avatar", and any absolute URL would be returned as-is. -
findAvatarUrl
-
getSmallAvatarUrl
-
applyFieldErrors
-
setClusterService
-
getTextProvider
protected com.opensymphony.xwork2.TextProvider getTextProvider()- Overrides:
getTextProvider
in classcom.opensymphony.xwork2.ActionSupport
-
getLocaleProvider
protected com.opensymphony.xwork2.LocaleProvider getLocaleProvider()- Overrides:
getLocaleProvider
in classcom.opensymphony.xwork2.ActionSupport
-
isDataCenterLicense
public boolean isDataCenterLicense() -
bindInformationAboutLicense
protected void bindInformationAboutLicense()
-