com.aoindustries.website
Class ProtocolAction

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
Direct Known Subclasses:
HttpAction, HttpsAction

public abstract class ProtocolAction
extends SkinAction

Makes sure the request coming in is in the right protocol (either http or https) by checking the HttpServletRequest.isSecure() method.

Author:
Dan Armstrong <dan@aoindustries.com>

Field Summary
static int HTTP
          Flag used to indicate HTTP is acceptable.
static int HTTPS
          Flag used to indicate HTTPS is acceptable.
 
Constructor Summary
ProtocolAction()
           
 
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)
          Once the skin is selected, 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.
abstract  int getAcceptableProtocols()
          Return the bitwise or of the acceptable protocols.
 
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
 

Field Detail

HTTP

public static final int HTTP
Flag used to indicate HTTP is acceptable.

See Also:
Constant Field Values

HTTPS

public static final int HTTPS
Flag used to indicate HTTPS is acceptable.

See Also:
Constant Field Values
Constructor Detail

ProtocolAction

public ProtocolAction()
Method Detail

execute

public final ActionForward execute(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: SkinAction
Once the skin is selected, this version of the execute method is invoked. The default implementation of this method simply returns the mapping of "success".

Overrides:
execute in class SkinAction
Throws:
java.lang.Exception

getAcceptableProtocols

public abstract int getAcceptableProtocols()
Return the bitwise or of the acceptable protocols.


executeProtocolAccepted

public 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
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".

Throws:
java.lang.Exception