org.melati.login
Class LoginHandler

Package class diagram package LoginHandler
java.lang.Object
  extended by org.melati.login.LoginHandler

public class LoginHandler
extends Object

An object which sets up the login process.


Field Summary
protected  TemplateServlet servlet
           
 
Constructor Summary
LoginHandler(TemplateServlet servlet)
          Constructor.
 
Method Summary
 String doTemplateRequest(Melati melati, ServletTemplateContext templateContext)
          Action the login.
protected  String loginPageTemplate()
           
 String loginSuccessfullyAs(Melati melati, ServletTemplateContext templateContext, User user)
          Set cookies if requested, remove any leftovers from any triggering AccessPoemException.
protected  String loginSuccessTemplate()
           
protected  String loginTemplate(String name)
           
protected  String passwordIncorrectTemplate()
           
 void setupContext(ServletTemplateContext context)
          Extract current values from context and add fields to context.
protected  String usernameUnknownTemplate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servlet

protected TemplateServlet servlet
Constructor Detail

LoginHandler

public LoginHandler(TemplateServlet servlet)
Constructor.

Parameters:
servlet - to set
Method Detail

loginTemplate

protected String loginTemplate(String name)

loginPageTemplate

protected String loginPageTemplate()

usernameUnknownTemplate

protected String usernameUnknownTemplate()

passwordIncorrectTemplate

protected String passwordIncorrectTemplate()

loginSuccessTemplate

protected String loginSuccessTemplate()

setupContext

public void setupContext(ServletTemplateContext context)
Extract current values from context and add fields to context.

Parameters:
context - the ServletTemplateContext to modify

loginSuccessfullyAs

public String loginSuccessfullyAs(Melati melati,
                                  ServletTemplateContext templateContext,
                                  User user)
Set cookies if requested, remove any leftovers from any triggering AccessPoemException.

Parameters:
melati - the melati
templateContext - context to augment
user - the established User
Returns:
the name of the success template

doTemplateRequest

public String doTemplateRequest(Melati melati,
                                ServletTemplateContext templateContext)
                         throws Exception
Action the login.

Parameters:
melati - the Melati
templateContext -
Returns:
a template name
Throws:
Exception


Copyright © 2000-2010 PanEris. All Rights Reserved.