public class BaseAction
extends com.opensymphony.xwork2.ActionSupport
Modifier and Type | Field and Description |
---|---|
protected ActionHelper |
actionHelper |
protected String |
actionMessageAlertColor
Webwork action messages color settings.
|
static String |
ALERT_BLUE |
static String |
ALERT_GREEN |
static String |
ALERT_RED |
static String |
ALERT_YELLOW |
protected ApplicationManager |
applicationManager |
protected ApplicationService |
applicationService |
protected ClientProperties |
clientProperties |
protected ClusterService |
clusterService |
protected CrowdLicenseManager |
crowdLicenseManager |
protected DirectoryManager |
directoryManager |
protected boolean |
initialLoad |
protected static org.slf4j.Logger |
logger |
protected PropertyManager |
propertyManager |
protected CrowdRememberMeService |
rememberMeService |
protected static int |
SMALL_AVATAR_SIZE |
protected Optional<String> |
smallAvatarUrl |
protected Integer |
tab |
protected TokenAuthenticationManager |
tokenAuthenticationManager |
Constructor and Description |
---|
BaseAction() |
Modifier and Type | Method and Description |
---|---|
protected void |
addActionError(Throwable t) |
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) |
boolean |
authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping,
Long directoryId,
String username) |
protected boolean |
authorisedToAccessCrowdConsole(Long directoryId,
String name) |
protected void |
bindInformationAboutLicense() |
boolean |
containsActionMessages() |
boolean |
containsErrorMessages() |
Directory |
directory(long directoryID) |
String |
execute() |
protected Optional<String> |
findAvatarUrl(User user,
int sizeHint) |
String |
getActionMessageAlertColor()
Gets the action message color dressing to use with the decorator.
|
protected CrowdBootstrapManager |
getBootstrapManager() |
protected Application |
getCrowdApplication() |
Integer |
getCurrentLicenseResourceTotal() |
String |
getDisplayableLink(com.atlassian.plugin.web.model.WebLink link) |
protected javax.servlet.http.HttpServletRequest |
getHttpRequest() |
String |
getImageLocation(boolean active,
ApplicationType applicationType) |
String |
getImageTitle(boolean active,
ApplicationType applicationType) |
String |
getLabel(com.atlassian.plugin.web.model.WebLabel label) |
com.atlassian.extras.api.crowd.CrowdLicense |
getLicense() |
String |
getLink(com.atlassian.plugin.web.model.WebLink link) |
protected com.opensymphony.xwork2.LocaleProvider |
getLocaleProvider() |
protected String |
getPasswordComplexityMessage(long directoryId) |
User |
getRemoteUser() |
protected javax.servlet.http.HttpSession |
getSession() |
Map<String,String> |
getSitemeshPageProperties() |
String |
getSmallAvatarUrl() |
Integer |
getTab() |
String |
getText(String i18nKey,
List args) |
String |
getText(String i18nKey,
List args,
boolean encode) |
protected com.opensymphony.xwork2.TextProvider |
getTextProvider() |
String |
getUserName() |
Map<String,Object> |
getWebFragmentsContextMap() |
com.atlassian.plugin.web.WebInterfaceManager |
getWebInterfaceManager() |
List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> |
getWebItemsForSection(String sectionName) |
com.atlassian.plugin.webresource.WebResourceManager |
getWebResourceManager() |
List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> |
getWebSectionsForLocation(String location) |
String |
getXsrfToken() |
String |
getXsrfTokenName() |
boolean |
isAtResourceLimit() |
boolean |
isAuthenticated() |
boolean |
isEvaluation() |
boolean |
isGroupAdmin() |
boolean |
isInitialLoad() |
boolean |
isLicenseExpired() |
boolean |
isLicenseForged() |
boolean |
isRestartRequiredToEnableClustering() |
boolean |
isSubscription() |
boolean |
isSysAdmin() |
boolean |
isWithinGracePeriod() |
String |
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 |
setTab(Integer tab) |
void |
setTokenAuthenticationManager(TokenAuthenticationManager tokenAuthenticationManager) |
void |
setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager) |
void |
setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager) |
void |
setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator) |
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
protected static final org.slf4j.Logger logger
protected Integer tab
protected boolean initialLoad
protected String actionMessageAlertColor
public static final String ALERT_GREEN
actionMessageAlertColor
,
Constant Field Valuespublic static final String ALERT_YELLOW
actionMessageAlertColor
,
Constant Field Valuespublic static final String ALERT_RED
actionMessageAlertColor
,
Constant Field Valuespublic static final String ALERT_BLUE
actionMessageAlertColor
,
Constant Field Valuesprotected static final int SMALL_AVATAR_SIZE
protected PropertyManager propertyManager
protected DirectoryManager directoryManager
protected ApplicationManager applicationManager
protected CrowdLicenseManager crowdLicenseManager
protected ApplicationService applicationService
protected TokenAuthenticationManager tokenAuthenticationManager
protected CrowdRememberMeService rememberMeService
protected ClientProperties clientProperties
protected ActionHelper actionHelper
protected ClusterService clusterService
public String execute() throws Exception
execute
in interface com.opensymphony.xwork2.Action
execute
in class com.opensymphony.xwork2.ActionSupport
Exception
public void applyFieldError(ValidationError error)
public boolean isAuthenticated()
public boolean isSysAdmin()
public boolean isGroupAdmin()
public String getUserName() throws InvalidUserException
null
if the user is not authenticatedInvalidUserException
public User getRemoteUser()
protected javax.servlet.http.HttpSession getSession()
protected javax.servlet.http.HttpServletRequest getHttpRequest()
public Integer getTab()
public void setTab(Integer tab)
public boolean isInitialLoad()
public com.atlassian.extras.api.crowd.CrowdLicense getLicense()
public boolean isEvaluation()
public boolean isLicenseForged()
public boolean isRestartRequiredToEnableClustering()
public boolean isSubscription()
true
if the license is a subscription license, false
otherwise.public boolean isWithinGracePeriod()
true
if the licensepublic boolean isLicenseExpired()
public String getActionMessageAlertColor()
public void addActionMessage(String color, String message)
color
- The color to use.message
- The message to display.public List<com.atlassian.plugin.web.descriptors.WebItemModuleDescriptor> getWebItemsForSection(String sectionName)
public List<com.atlassian.plugin.web.descriptors.WebSectionModuleDescriptor> getWebSectionsForLocation(String location)
public String getDisplayableLink(com.atlassian.plugin.web.model.WebLink link)
public String getLink(com.atlassian.plugin.web.model.WebLink link)
public String getLabel(com.atlassian.plugin.web.model.WebLabel label)
public Directory directory(long directoryID)
protected void addActionError(Throwable t)
public boolean containsErrorMessages()
public boolean containsActionMessages()
public void setPropertyManager(PropertyManager propertyManager)
public void setDirectoryManager(DirectoryManager directoryManager)
public void setCrowdLicenseManager(CrowdLicenseManager crowdLicenseManager)
public void setApplicationManager(ApplicationManager applicationManager)
public void setWebInterfaceManager(com.atlassian.plugin.web.WebInterfaceManager webInterfaceManager)
public com.atlassian.plugin.web.WebInterfaceManager getWebInterfaceManager()
public com.atlassian.plugin.webresource.WebResourceManager getWebResourceManager()
public void setWebResourceManager(com.atlassian.plugin.webresource.WebResourceManager webResourceManager)
protected CrowdBootstrapManager getBootstrapManager()
public boolean isAtResourceLimit()
public Integer getCurrentLicenseResourceTotal()
public String getImageTitle(boolean active, ApplicationType applicationType)
public String getImageLocation(boolean active, ApplicationType applicationType)
protected boolean authorisedToAccessCrowdConsole(Long directoryId, String name) throws DirectoryNotFoundException, UserNotFoundException
public boolean authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping, Long directoryId, String username) throws DirectoryNotFoundException, UserNotFoundException
public String getXsrfTokenName()
public String getXsrfToken()
public String getText(String i18nKey, List args)
getText
in interface com.opensymphony.xwork2.TextProvider
getText
in class com.opensymphony.xwork2.ActionSupport
public void setApplicationService(ApplicationService applicationService)
public void setTokenAuthenticationManager(TokenAuthenticationManager tokenAuthenticationManager)
public void setRememberMeService(CrowdRememberMeService rememberMeService)
public void setClientProperties(ClientProperties clientProperties)
public void setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator)
@Nullable protected String getPasswordComplexityMessage(long directoryId)
protected Application getCrowdApplication() throws ApplicationNotFoundException
ApplicationNotFoundException
public void setCrowdApplication(Application crowdApplication)
public void setActionHelper(ActionHelper actionHelper)
protected String resolveAvatarUri(URI uri)
public String getSmallAvatarUrl()
public void applyFieldErrors(Collection<FieldError> errors)
public void setClusterService(ClusterService clusterService)
protected com.opensymphony.xwork2.TextProvider getTextProvider()
getTextProvider
in class com.opensymphony.xwork2.ActionSupport
protected com.opensymphony.xwork2.LocaleProvider getLocaleProvider()
getLocaleProvider
in class com.opensymphony.xwork2.ActionSupport
protected void bindInformationAboutLicense()
Copyright © 2021 Atlassian. All rights reserved.