public class BaseAction
extends com.opensymphony.xwork2.ActionSupport
| Modifier and Type | Field and Description |
|---|---|
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 CrowdLicenseManager |
crowdLicenseManager |
protected CrowdUserDetailsService |
crowdUserDetailsService |
protected DirectoryManager |
directoryManager |
protected boolean |
initialLoad |
protected static org.slf4j.Logger |
logger |
protected PropertyManager |
propertyManager |
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 |
applyFieldErrors(Collection<FieldError> errors) |
boolean |
authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping,
Long directoryId,
String username) |
protected boolean |
authorisedToAccessCrowdConsole(Long directoryId,
String name) |
boolean |
containsActionMessages() |
boolean |
containsErrorMessages() |
Directory |
directory(long directoryID) |
String |
doDefault() |
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) |
com.atlassian.extras.api.crowd.CrowdLicense |
getLicense() |
String |
getLink(com.atlassian.plugin.web.model.WebLink link) |
protected String |
getPasswordComplexityMessage(long directoryId) |
UserWithAttributes |
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) |
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() |
protected boolean |
hasSysAdminRole(CrowdUserDetails userDetails) |
boolean |
isAtResourceLimit() |
boolean |
isAuthenticated() |
boolean |
isEvaluation() |
boolean |
isInitialLoad() |
boolean |
isLicenseExpired() |
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 |
setCrowdApplication(Application crowdApplication) |
void |
setCrowdLicenseManager(CrowdLicenseManager crowdLicenseManager) |
void |
setCrowdUserDetailsService(CrowdUserDetailsService crowdUserDetailsService) |
void |
setDirectoryManager(DirectoryManager directoryManager) |
void |
setPropertyManager(PropertyManager propertyManager) |
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, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getFormatted, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validateprotected 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 CrowdUserDetailsService crowdUserDetailsService
protected ApplicationService applicationService
protected TokenAuthenticationManager tokenAuthenticationManager
protected ClientProperties clientProperties
protected boolean hasSysAdminRole(CrowdUserDetails userDetails)
public boolean isAuthenticated()
public boolean isSysAdmin()
public String getUserName() throws InvalidUserException
null if the user is not authenticatedInvalidUserExceptionpublic UserWithAttributes 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 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 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 setCrowdUserDetailsService(CrowdUserDetailsService crowdUserDetailsService)
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.TextProvidergetText in class com.opensymphony.xwork2.ActionSupportpublic void setApplicationService(ApplicationService applicationService)
public void setTokenAuthenticationManager(TokenAuthenticationManager tokenAuthenticationManager)
public void setClientProperties(ClientProperties clientProperties)
public void setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator)
@Nullable protected String getPasswordComplexityMessage(long directoryId)
protected Application getCrowdApplication() throws ApplicationNotFoundException
ApplicationNotFoundExceptionpublic void setCrowdApplication(Application crowdApplication)
public void setActionHelper(ActionHelper actionHelper)
protected String resolveAvatarUri(URI uri)
public String getSmallAvatarUrl()
public void applyFieldErrors(Collection<FieldError> errors)
Copyright © 2017 Atlassian. All rights reserved.