atg.servlet.security
Class AdminLoginFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.servlet.security.AdminFormHandler
                      extended by atg.servlet.security.AdminLoginFormHandler
All Implemented Interfaces:
DropletFormHandler, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class AdminLoginFormHandler
extends AdminFormHandler


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
 
Fields inherited from class atg.servlet.security.AdminFormHandler
RESOURCE_BUNDLE, sResources, STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
AdminLoginFormHandler()
          Empty as all bean consructors usually are.
 
Method Summary
protected  int checkFormError(java.lang.String pErrorURL, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Check to see if there were errors during the submit operation.
 java.lang.String getFailureRedirect()
          Returns URL to which the user will be re-directed if the Login or Logout commands failed
 java.lang.String getLoginRedirect()
          Returns URL to which the user gets re-directed upon successfull authentication
 java.lang.String getLogoutRedirect()
          Returns URL to which the user gets re-directed upon successful Logout
 java.lang.String getPassword()
          Returns Password passed through from the HTML form
 LoginUserAuthority getUserAuthority()
          Returns UserAuthority that authenticates the user
 UserLoginManager getUserManager()
          Returns Manages the login in process
 java.lang.String getUsername()
          Returns Username passed through from the HTML form
 boolean handleLogin(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          on submit, takes the username and password tries to authenticate using appropriate UserAuthority
 boolean handleLogout(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          on submit logs the user out of the admin UserAuthority
 void setFailureRedirect(java.lang.String pFailureRedirect)
          Sets URL to which the user will be re-directed if the Login or Logout commands failed
 void setLoginRedirect(java.lang.String pLoginRedirect)
          Sets URL to which the user gets re-directed upon successfull authentication
 void setLogoutRedirect(java.lang.String pLogoutRedirect)
          Sets URL to which the user gets re-directed upon successful Logout
 void setPassword(java.lang.String pPassword)
          Sets Password passed through from the HTML form
 void setUserAuthority(LoginUserAuthority pUserAuthority)
          Sets UserAuthority that authenticates the user
 void setUserManager(UserLoginManager pUserManager)
          Sets Manages the login in process
 void setUsername(java.lang.String pUsername)
          Sets Username passed through from the HTML form
 
Methods inherited from class atg.servlet.security.AdminFormHandler
formatUserMessage, formatUserMessage, generatePropertyPath, getErrorRedirect, getLocale, setErrorRedirect
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, beforeSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet, beforeGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string

Constructor Detail

AdminLoginFormHandler

public AdminLoginFormHandler()
Empty as all bean consructors usually are. All of the initial values are provided within the .properties file

Method Detail

setUsername

public void setUsername(java.lang.String pUsername)
Sets Username passed through from the HTML form


getUsername

public java.lang.String getUsername()
Returns Username passed through from the HTML form


setPassword

public void setPassword(java.lang.String pPassword)
Sets Password passed through from the HTML form


getPassword

public java.lang.String getPassword()
Returns Password passed through from the HTML form


setFailureRedirect

public void setFailureRedirect(java.lang.String pFailureRedirect)
Sets URL to which the user will be re-directed if the Login or Logout commands failed


getFailureRedirect

public java.lang.String getFailureRedirect()
Returns URL to which the user will be re-directed if the Login or Logout commands failed


setLoginRedirect

public void setLoginRedirect(java.lang.String pLoginRedirect)
Sets URL to which the user gets re-directed upon successfull authentication


getLoginRedirect

public java.lang.String getLoginRedirect()
Returns URL to which the user gets re-directed upon successfull authentication


setLogoutRedirect

public void setLogoutRedirect(java.lang.String pLogoutRedirect)
Sets URL to which the user gets re-directed upon successful Logout


getLogoutRedirect

public java.lang.String getLogoutRedirect()
Returns URL to which the user gets re-directed upon successful Logout


setUserAuthority

public void setUserAuthority(LoginUserAuthority pUserAuthority)
Sets UserAuthority that authenticates the user


getUserAuthority

public LoginUserAuthority getUserAuthority()
Returns UserAuthority that authenticates the user


setUserManager

public void setUserManager(UserLoginManager pUserManager)
Sets Manages the login in process


getUserManager

public UserLoginManager getUserManager()
Returns Manages the login in process


handleLogout

public boolean handleLogout(DynamoHttpServletRequest pRequest,
                            DynamoHttpServletResponse pResponse)
                     throws javax.servlet.ServletException,
                            java.io.IOException
on submit logs the user out of the admin UserAuthority

Parameters:
pRequest -
pResponse -
Returns:
the true if the logout was successfull
Throws:
javax.servlet.ServletException
java.io.IOException

handleLogin

public boolean handleLogin(DynamoHttpServletRequest pRequest,
                           DynamoHttpServletResponse pResponse)
                    throws javax.servlet.ServletException,
                           java.io.IOException
on submit, takes the username and password tries to authenticate using appropriate UserAuthority

Parameters:
pRequest -
pResponse -
Returns:
false if there were any fatal errors encountered such as missing componnents, returns true if the user was denied login based on a bad username/password or if the user was allowed login.
Throws:
javax.servlet.ServletException
java.io.IOException

checkFormError

protected int checkFormError(java.lang.String pErrorURL,
                             DynamoHttpServletRequest pRequest,
                             DynamoHttpServletResponse pResponse)
                      throws javax.servlet.ServletException,
                             java.io.IOException
Description copied from class: AdminFormHandler
Check to see if there were errors during the submit operation. If so, redirect to the supplied error url if possible.

Overrides:
checkFormError in class AdminFormHandler
Parameters:
pErrorURL - the URL to redirect to if there are any form errors
pRequest - the servlet's request
pResponse - the servlet's response
Returns:
the status of the form
Throws:
javax.servlet.ServletException - if there was an error while executing the code
java.io.IOException - if there was an error with servlet io
See Also:
STATUS_SUCCESS, STATUS_ERROR_STAY, STATUS_ERROR_REDIRECT