com.atlassian.crowd.openid.server.action
Class BaseAction

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.crowd.openid.server.action.BaseAction
All Implemented Interfaces:
com.opensymphony.xwork.Action, com.opensymphony.xwork.LocaleProvider, com.opensymphony.xwork.TextProvider, com.opensymphony.xwork.Validateable, com.opensymphony.xwork.ValidationAware, com.uwyn.rife.continuations.ContinuableObject, Serializable, Cloneable
Direct Known Subclasses:
AllowAuthentication, ChangePassword, Console, CrowdServer, EditAllowAlways, EditProfiles, ForgottenLoginDetails, GeneralOptions, Login, Logoff, ViewAuthRecord, ViewIdentity, ViewPublicIdentity, WhiteAndBlacklist

public class BaseAction
extends com.opensymphony.xwork.ActionSupport

See Also:
Serialized Form

Field Summary
protected  String actionMessageAlertColor
          Webwork action messages color settings.
static String ALERT_BLUE
           
static String ALERT_RED
           
static String ALERT_YELLOW
           
protected  Boolean authenticated
           
protected  Boolean isAdministrator
           
protected  OpenIDAuthenticationManager openIDAuthenticationManager
           
protected  OpenIDPropertyManager openIDPropertyManager
           
protected  ProfileManager profileManager
           
protected  SiteManager siteManager
           
protected  UserManager userManager
           
 
Fields inherited from class com.opensymphony.xwork.ActionSupport
LOG
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
BaseAction()
           
 
Method Summary
 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.
 SOAPAttribute getAttribute(String name)
           
 String getBaseURL()
           
 String getFirstAttribute(String name)
           
 HttpAuthenticator getHttpAuthenticator()
           
protected  javax.servlet.http.HttpServletRequest getHttpRequest()
           
 String getIdentifier()
           
 String getPrincipalName()
          Gets the user's fullname for display.
 SOAPPrincipal getRemotePrincipal()
           
protected  javax.servlet.http.HttpServletRequest getRequest()
          Gets the underlying HTTP request from the Action.
 SecurityServerClient getSecurityServerClient()
           
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 setHttpAuthenticator(HttpAuthenticator httpAuthenticator)
           
 void setOpenIDAuthenticationManager(OpenIDAuthenticationManager openIDAuthenticationManager)
           
 void setProfileManager(ProfileManager profileManager)
           
 void setPropertyManager(OpenIDPropertyManager openIDPropertyManager)
           
 void setSecurityServerClient(SecurityServerClient securityServerClient)
           
 void setSiteManager(SiteManager siteManager)
           
 void setUserManager(UserManager userManager)
           
 void setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator)
           
 
Methods inherited from class com.opensymphony.xwork.ActionSupport
addActionError, addActionMessage, addFieldError, clearErrorsAndMessages, clone, doDefault, doInput, execute, getActionErrors, getActionMessages, getErrorMessages, getErrors, getFieldErrors, getLocale, getText, getText, getText, getText, getText, getText, getText, getText, getText, getTexts, getTexts, hasActionErrors, hasActionMessages, hasErrors, hasFieldErrors, hasKey, pause, setActionErrors, setActionMessages, setFieldErrors, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

authenticated

protected Boolean authenticated

actionMessageAlertColor

protected String actionMessageAlertColor
Webwork action messages color settings. Displays the type of message dressing to use.


ALERT_BLUE

public static final String ALERT_BLUE
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

ALERT_YELLOW

public static final String ALERT_YELLOW
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

ALERT_RED

public static final String ALERT_RED
See Also:
BaseAction#actionMessageAlertColor;, Constant Field Values

openIDPropertyManager

protected OpenIDPropertyManager openIDPropertyManager

userManager

protected UserManager userManager

siteManager

protected SiteManager siteManager

profileManager

protected ProfileManager profileManager

openIDAuthenticationManager

protected OpenIDAuthenticationManager openIDAuthenticationManager

isAdministrator

protected Boolean isAdministrator
Constructor Detail

BaseAction

public BaseAction()
Method Detail

getXsrfTokenName

public String getXsrfTokenName()

getXsrfToken

public String getXsrfToken()

isAuthenticated

public boolean isAuthenticated()
Checks if a principal is currently authenticated verses the Crowd security server.

Returns:
true if and only if the principal is currently authenticated, otherwise false.

getSession

protected javax.servlet.http.HttpSession getSession()
Gets the HTTP session for the current user.

Returns:
The HTTP session.

getRequest

protected javax.servlet.http.HttpServletRequest getRequest()
Gets the underlying HTTP request from the Action.

Returns:
the underlying HTTP request.

getRemotePrincipal

public SOAPPrincipal getRemotePrincipal()
                                 throws InvalidAuthenticationException
Throws:
InvalidAuthenticationException

getPrincipalName

public String getPrincipalName()
                        throws InvalidAuthenticationException
Gets the user's fullname for display.

Returns:
The fullname.
Throws:
InvalidAuthenticationException

getFirstAttribute

public String getFirstAttribute(String name)
                         throws InvalidAuthenticationException
Throws:
InvalidAuthenticationException

getAttribute

public SOAPAttribute getAttribute(String name)
                           throws InvalidAuthenticationException
Throws:
InvalidAuthenticationException

getBaseURL

public String getBaseURL()

baseUrl

public static String baseUrl(javax.servlet.http.HttpServletRequest request)

getHttpRequest

protected javax.servlet.http.HttpServletRequest getHttpRequest()

isAdministrator

public boolean isAdministrator()

getActionMessageAlertColor

public String getActionMessageAlertColor()
Gets the action messageo color dressing to use with the decorator.

Returns:
The window dressing color to use.

containsActionMessages

public boolean containsActionMessages()

setPropertyManager

public void setPropertyManager(OpenIDPropertyManager openIDPropertyManager)

setUserManager

public void setUserManager(UserManager userManager)

setSiteManager

public void setSiteManager(SiteManager siteManager)

setProfileManager

public void setProfileManager(ProfileManager profileManager)

setOpenIDAuthenticationManager

public void setOpenIDAuthenticationManager(OpenIDAuthenticationManager openIDAuthenticationManager)

getIdentifier

public String getIdentifier()
                     throws InvalidAuthenticationException
Throws:
InvalidAuthenticationException

addActionMessage

public void addActionMessage(String color,
                             String message)
Sets a UI message and the color type for the user.

Parameters:
color - The color to use.
message - The message to display.

getHttpAuthenticator

public HttpAuthenticator getHttpAuthenticator()

setHttpAuthenticator

public void setHttpAuthenticator(HttpAuthenticator httpAuthenticator)

getSecurityServerClient

public SecurityServerClient getSecurityServerClient()

setSecurityServerClient

public void setSecurityServerClient(SecurityServerClient securityServerClient)

setXsrfTokenGenerator

public void setXsrfTokenGenerator(XsrfTokenGenerator xsrfTokenGenerator)


Copyright © 2014 Atlassian. All Rights Reserved.