com.aoindustries.website
Class AuthenticatedAction

java.lang.Object
  extended by Action
      extended by com.aoindustries.website.SiteSettingsAction
          extended by com.aoindustries.website.LocaleAction
              extended by com.aoindustries.website.SkinAction
                  extended by com.aoindustries.website.ProtocolAction
                      extended by com.aoindustries.website.HttpsAction
                          extended by com.aoindustries.website.AuthenticatedAction
Direct Known Subclasses:
BusinessAdministratorPasswordSetterAction, BusinessAdministratorPasswordSetterCompletedAction, IndexAction, MakePaymentAction, MakePaymentNewCardAction, PermissionAction

public abstract class AuthenticatedAction
extends HttpsAction

Ensures the user is logged in. Forwards to "login" if not logged in. Otherwise, it sets the request attribute "aoConn" and then calls execute(ActionMapping,ActionForm,HttpServletRequest,HttpServletResponse,Locale,Skin,AOServConnector). The default implementation of this new execute method simply returns the mapping of "success".

More simply put, without overriding the new execute method, this action returns either the mapping for "login" or "success".

Author:
AO Industries, Inc.

Field Summary
 
Fields inherited from class com.aoindustries.website.ProtocolAction
HTTP, HTTPS
 
Constructor Summary
AuthenticatedAction()
           
 
Method Summary
 ActionForward execute(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SiteSettings siteSettings, java.util.Locale locale, Skin skin, com.aoindustries.aoserv.client.AOServConnector aoConn)
          Once authentication has been handled, this version of the execute method is invoked.
 ActionForward executeProtocolAccepted(ActionMapping mapping, ActionForm form, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, SiteSettings siteSettings, java.util.Locale locale, Skin skin)
          Once the protocols is accepted, this version of the execute method is invoked.
static com.aoindustries.aoserv.client.AOServConnector getAoConn(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Gets the AOServConnector for the user or null if not logged in.
static com.aoindustries.aoserv.client.AOServConnector getAuthenticatedAoConn(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
          Gets the AOServConnector that represents the actual login id.
 
Methods inherited from class com.aoindustries.website.HttpsAction
getAcceptableProtocols
 
Methods inherited from class com.aoindustries.website.ProtocolAction
execute
 
Methods inherited from class com.aoindustries.website.SkinAction
execute, getDefaultSkin, getSkin
 
Methods inherited from class com.aoindustries.website.LocaleAction
execute, getDefaultLocale, getEffectiveLocale
 
Methods inherited from class com.aoindustries.website.SiteSettingsAction
execute
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AuthenticatedAction

public AuthenticatedAction()
Method Detail

executeProtocolAccepted

public final ActionForward executeProtocolAccepted(ActionMapping mapping,
                                                   ActionForm form,
                                                   javax.servlet.http.HttpServletRequest request,
                                                   javax.servlet.http.HttpServletResponse response,
                                                   SiteSettings siteSettings,
                                                   java.util.Locale locale,
                                                   Skin skin)
                                            throws java.lang.Exception
Description copied from class: ProtocolAction
Once the protocols is accepted, this version of the execute method is invoked. The default implementation of this method simply returns the mapping of "success".

Overrides:
executeProtocolAccepted in class ProtocolAction
Throws:
java.lang.Exception

getAuthenticatedAoConn

public static com.aoindustries.aoserv.client.AOServConnector getAuthenticatedAoConn(javax.servlet.http.HttpServletRequest request,
                                                                                    javax.servlet.http.HttpServletResponse response)
Gets the AOServConnector that represents the actual login id. This will not change when the user performs a switch user ("su")..


getAoConn

public static com.aoindustries.aoserv.client.AOServConnector getAoConn(javax.servlet.http.HttpServletRequest request,
                                                                       javax.servlet.http.HttpServletResponse response)
Gets the AOServConnector for the user or null if not logged in. This also handles the "su" behavior that was stored in the session by SkinAction.


execute

public ActionForward execute(ActionMapping mapping,
                             ActionForm form,
                             javax.servlet.http.HttpServletRequest request,
                             javax.servlet.http.HttpServletResponse response,
                             SiteSettings siteSettings,
                             java.util.Locale locale,
                             Skin skin,
                             com.aoindustries.aoserv.client.AOServConnector aoConn)
                      throws java.lang.Exception
Once authentication has been handled, this version of the execute method is invoked. The default implementation of this method simply returns the mapping of "success".

Throws:
java.lang.Exception