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_RED |
static String |
ALERT_YELLOW |
protected OpenIDAuthenticationManager |
openIDAuthenticationManager |
protected OpenIDPropertyManager |
openIDPropertyManager |
protected ProfileManager |
profileManager |
protected SiteManager |
siteManager |
protected UserManager |
userManager |
Constructor and Description |
---|
BaseAction() |
Modifier and Type | Method and Description |
---|---|
void |
addActionMessage(String color,
String message)
Sets a UI message and the color type for the user.
|
static String |
baseUrl(javax.servlet.http.HttpServletRequest request) |
boolean |
containsActionMessages() |
String |
getActionMessageAlertColor()
Gets the action messageo color dressing to use with the decorator.
|
String |
getBaseURL() |
CrowdClient |
getCrowdClient() |
CrowdHttpAuthenticator |
getCrowdHttpAuthenticator() |
String |
getIdentifier() |
String |
getPrincipalName()
Gets the user's fullname for display.
|
User |
getRemotePrincipal()
Gets the remote principal for the request.
|
protected javax.servlet.http.HttpServletRequest |
getRequest()
Gets the underlying HTTP request from the Action.
|
protected javax.servlet.http.HttpSession |
getSession()
Gets the HTTP session for the current user.
|
String |
getXsrfToken() |
String |
getXsrfTokenName() |
boolean |
isAdministrator() |
boolean |
isAuthenticated()
Checks if a principal is currently authenticated verses the Crowd security server.
|
void |
setCrowdClient(CrowdClient crowdClient) |
void |
setCrowdHttpAuthenticator(CrowdHttpAuthenticator crowdHttpAuthenticator) |
void |
setOpenIDAuthenticationManager(OpenIDAuthenticationManager openIDAuthenticationManager) |
void |
setProfileManager(ProfileManager profileManager) |
void |
setPropertyManager(OpenIDPropertyManager openIDPropertyManager) |
void |
setSiteManager(SiteManager siteManager) |
void |
setUserManager(UserManager userManager) |
void |
setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator) |
addActionError, addActionMessage, addFieldError, clearActionErrors, clearErrors, clearErrorsAndMessages, clearFieldErrors, clearMessages, clone, execute, getActionErrors, getActionMessages, getContainer, getFieldErrors, getFormatted, getLocale, getLocaleProvider, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTextProvider, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, input, isValidLocale, isValidLocaleString, pause, setActionErrors, setActionMessages, setContainer, setFieldErrors, validate
protected String actionMessageAlertColor
public static final String ALERT_BLUE
actionMessageAlertColor
,
Constant Field Valuespublic static final String ALERT_YELLOW
actionMessageAlertColor
,
Constant Field Valuespublic static final String ALERT_RED
actionMessageAlertColor
,
Constant Field Valuesprotected OpenIDPropertyManager openIDPropertyManager
protected UserManager userManager
protected SiteManager siteManager
protected ProfileManager profileManager
protected OpenIDAuthenticationManager openIDAuthenticationManager
public String getXsrfTokenName()
public String getXsrfToken()
public boolean isAuthenticated()
true
if and only if the principal is currently authenticated, otherwise false
.protected javax.servlet.http.HttpSession getSession()
protected javax.servlet.http.HttpServletRequest getRequest()
@Nullable public User getRemotePrincipal() throws InvalidAuthenticationException
InvalidAuthenticationException
- if the principal for the request cannot be retrieved.public String getPrincipalName() throws InvalidAuthenticationException
InvalidAuthenticationException
public String getBaseURL()
public static String baseUrl(javax.servlet.http.HttpServletRequest request)
public boolean isAdministrator()
public String getActionMessageAlertColor()
public boolean containsActionMessages()
public void setPropertyManager(OpenIDPropertyManager openIDPropertyManager)
public void setUserManager(UserManager userManager)
public void setSiteManager(SiteManager siteManager)
public void setProfileManager(ProfileManager profileManager)
public void setOpenIDAuthenticationManager(OpenIDAuthenticationManager openIDAuthenticationManager)
public String getIdentifier() throws InvalidAuthenticationException
InvalidAuthenticationException
public void addActionMessage(String color, String message)
color
- The color to use.message
- The message to display.public void setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator)
public CrowdClient getCrowdClient()
public void setCrowdClient(CrowdClient crowdClient)
public CrowdHttpAuthenticator getCrowdHttpAuthenticator()
public void setCrowdHttpAuthenticator(CrowdHttpAuthenticator crowdHttpAuthenticator)
Copyright © 2021 Atlassian. All rights reserved.