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

java.lang.Object
  extended by com.opensymphony.xwork.ActionSupport
      extended by com.atlassian.crowd.openid.client.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:
Login, Logoff, ViewProfile

public class BaseAction
extends com.opensymphony.xwork.ActionSupport

Superclass for WebWork actions. Contains convenience methods for use in actions.

See Also:
Serialized Form

Field Summary
static String AUTHENTICATED_PRINCIPAL_SESSION_KEY
           
 
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
 boolean containsActionMessages()
          Convenience method to check if action contains actionMessages.
 boolean containsErrorMessages()
          Convenience method to check if action contains errorMessages.
 javax.servlet.http.HttpSession getHttpSession()
          Convenience method for accessing the HttpSession object.
 OpenIDPrincipal getOpenIDPrincipal()
          Retrieve the authenticated OpenIDPrincipal.
 String getPrincipalName()
          Returns the "fullname" attribtue from the profile if present.
 boolean isAuthenticated()
          Convenience method to check if the user is authenticated.
 void setOpenIDPrincipal(OpenIDPrincipal principal)
          Puts the OpenIDPrincipal into session.
 
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_PRINCIPAL_SESSION_KEY

public static final String AUTHENTICATED_PRINCIPAL_SESSION_KEY
Constructor Detail

BaseAction

public BaseAction()
Method Detail

containsErrorMessages

public boolean containsErrorMessages()
Convenience method to check if action contains errorMessages.

Returns:
true if there are more than zero errorMessages.

containsActionMessages

public boolean containsActionMessages()
Convenience method to check if action contains actionMessages.

Returns:
true if there are more than zero actionMessages.

getHttpSession

public javax.servlet.http.HttpSession getHttpSession()
Convenience method for accessing the HttpSession object.

Returns:
HttpSession object.

setOpenIDPrincipal

public void setOpenIDPrincipal(OpenIDPrincipal principal)
Puts the OpenIDPrincipal into session. This signifies the OpenIDPrincipal has authenticated for the session.

Parameters:
principal - OpenIDPrincipal to put into session.

getOpenIDPrincipal

public OpenIDPrincipal getOpenIDPrincipal()
Retrieve the authenticated OpenIDPrincipal. Returns null if user is not authenticated.

Returns:
the OpenIDPrincipal in session.

isAuthenticated

public boolean isAuthenticated()
Convenience method to check if the user is authenticated.

Returns:
true if there is an OpenIDPrincipal in session.

getPrincipalName

public String getPrincipalName()
Returns the "fullname" attribtue from the profile if present. Otherwise returns the text corresponding to "unknown.name.label".

Returns:
non-null string.


Copyright © 2013 Atlassian. All Rights Reserved.