public class BaseAction
extends com.opensymphony.xwork.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 org.slf4j.Logger |
logger |
protected PropertyManager |
propertyManager |
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.
|
boolean |
authorisedToAccessCrowdAdminConsole(DirectoryMapping directoryMapping,
Long directoryId,
String username) |
protected boolean |
authorisedToAccessCrowdConsole(Long directoryId,
String name) |
boolean |
containsActionMessages() |
boolean |
containsErrorMessages() |
Directory |
directory(long directoryID) |
protected Directory |
directoryForRemoteUser()
Get the directory for the current logged in user.
|
String |
doDefault() |
String |
getActionMessageAlertColor()
Gets the action message color dressing to use with the decorator.
|
SOAPAttribute |
getAttribute(String name) |
protected CrowdBootstrapManager |
getBootstrapManager() |
Integer |
getCurrentLicenseResourceTotal() |
String |
getDisplayableLink(com.atlassian.plugin.web.model.WebLink link) |
String |
getFirstAttribute(String name) |
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) |
SOAPPrincipal |
getRemoteUser() |
protected javax.servlet.http.HttpSession |
getSession() |
Map<String,Object> |
getSitemeshPageProperties() |
String |
getSitemeshPageProperty(String propertyName) |
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 |
getWebItemsForSection(String sectionName) |
com.atlassian.plugin.webresource.WebResourceManager |
getWebResourceManager() |
List |
getWebSectionsForLocation(String location) |
String |
getXsrfToken() |
String |
getXsrfTokenName() |
protected boolean |
hasAdminRole(CrowdUserDetails userDetails) |
boolean |
isAdmin() |
boolean |
isAtResourceLimit() |
boolean |
isAuthenticated() |
boolean |
isEvaluation() |
boolean |
isInitialLoad() |
boolean |
isLicenseExpired() |
boolean |
isSubscription() |
boolean |
isWithinGracePeriod() |
String |
renderFreemarkerTemplate(String templateString) |
void |
setApplicationManager(ApplicationManager applicationManager) |
void |
setApplicationService(ApplicationService applicationService) |
void |
setBootstrapManager(CrowdBootstrapManager bootstrapManager) |
void |
setClientProperties(ClientProperties clientProperties) |
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(com.atlassian.xwork.XsrfTokenGenerator xsrfTokenGenerator) |
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doInput, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate
protected final org.slf4j.Logger logger
protected Integer tab
protected boolean initialLoad
protected String actionMessageAlertColor
public static final String ALERT_GREEN
BaseAction#actionMessageAlertColor;
,
Constant Field Valuespublic static final String ALERT_YELLOW
BaseAction#actionMessageAlertColor;
,
Constant Field Valuespublic static final String ALERT_RED
BaseAction#actionMessageAlertColor;
,
Constant Field Valuespublic static final String ALERT_BLUE
BaseAction#actionMessageAlertColor;
,
Constant Field Valuesprotected PropertyManager propertyManager
protected DirectoryManager directoryManager
protected ApplicationManager applicationManager
protected CrowdLicenseManager crowdLicenseManager
protected CrowdUserDetailsService crowdUserDetailsService
protected ApplicationService applicationService
protected TokenAuthenticationManager tokenAuthenticationManager
protected ClientProperties clientProperties
public String doDefault() throws Exception
doDefault
in class com.opensymphony.xwork.ActionSupport
Exception
protected boolean hasAdminRole(CrowdUserDetails userDetails)
public boolean isAuthenticated()
public boolean isAdmin()
public String getUserName() throws InvalidUserException
null
InvalidUserException
public SOAPPrincipal getRemoteUser()
public SOAPAttribute getAttribute(String name) throws InvalidUserException
InvalidUserException
public String getFirstAttribute(String name) throws InvalidUserException
InvalidUserException
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 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)
protected Directory directoryForRemoteUser()
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.xwork.TextProvider
getText
in class com.opensymphony.xwork.ActionSupport
public void setApplicationService(ApplicationService applicationService)
public void setTokenAuthenticationManager(TokenAuthenticationManager tokenAuthenticationManager)
public void setClientProperties(ClientProperties clientProperties)
public void setXsrfTokenGenerator(com.atlassian.xwork.XsrfTokenGenerator xsrfTokenGenerator)
public void setBootstrapManager(CrowdBootstrapManager bootstrapManager)
Copyright © 2013 Atlassian. All Rights Reserved.