net.incongru.berkano.security.password.retrieval
Class AbstractMailPasswordRetrievalStrategy

java.lang.Object
  extended by net.incongru.berkano.security.password.retrieval.AbstractMailPasswordRetrievalStrategy
All Implemented Interfaces:
PasswordRetrievalStrategy
Direct Known Subclasses:
MailCurrentPasswordRetrievalStrategy, MailNewPasswordRetrievalStrategy

public abstract class AbstractMailPasswordRetrievalStrategy
extends java.lang.Object
implements PasswordRetrievalStrategy

An abstract strategy that sends a mail to the user's registered email address.

Version:
$Revision: 1.2 $
Author:
greg, $Author: gj $ (last edit)

Constructor Summary
protected AbstractMailPasswordRetrievalStrategy(net.incongru.util.mail.Mailer mailer)
           
 
Method Summary
protected abstract  java.lang.String getMailSubject()
           
 java.lang.String getRequiredField()
          Will usually return "username" or "email", depending on how this strategy works.
protected abstract  java.lang.String getTemplateName()
           
protected  void prepareMailContext(User u, net.incongru.util.mail.MailBean mail)
          Use this method to change any setting of the user if needed and add items in the map passed to the template engine.
 void retrievePassword(User u)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMailPasswordRetrievalStrategy

protected AbstractMailPasswordRetrievalStrategy(net.incongru.util.mail.Mailer mailer)
Method Detail

retrievePassword

public void retrievePassword(User u)
                      throws java.lang.Exception
Specified by:
retrievePassword in interface PasswordRetrievalStrategy
Throws:
java.lang.Exception

prepareMailContext

protected void prepareMailContext(User u,
                                  net.incongru.util.mail.MailBean mail)
Use this method to change any setting of the user if needed and add items in the map passed to the template engine.


getMailSubject

protected abstract java.lang.String getMailSubject()

getTemplateName

protected abstract java.lang.String getTemplateName()

getRequiredField

public java.lang.String getRequiredField()
Description copied from interface: PasswordRetrievalStrategy
Will usually return "username" or "email", depending on how this strategy works. TODO : does this really belong here ?

Specified by:
getRequiredField in interface PasswordRetrievalStrategy


Copyright © 2004-2007. All Rights Reserved.