Expresso 5-6

com.jcorporate.expresso.services.validation
Class ApproveRegistrationValidator

java.lang.Object
  extended bycom.jcorporate.expresso.services.validation.ApproveRegistrationValidator
All Implemented Interfaces:
ValidationHandler

public class ApproveRegistrationValidator
extends Object
implements ValidationHandler

This class is a helper class that allows the LoginController controller to authorize or deny a registration request

Since:
Expresso 5.0
Version:
$Revision: 1.19 $ $Date: 2004/11/17 20:48:22 $
Author:
Shash Chatterjee
See Also:
LoginController

Field Summary
protected static org.apache.log4j.Logger log
           
 
Constructor Summary
ApproveRegistrationValidator()
          Default constructor Creation date: (9/23/2001 2:23:06 PM) Author: Shash Chatterjee
 
Method Summary
protected  String getString(String stringCode)
          Convenience version of the above with no arguments.
protected  String getString(String stringCode, Object[] args)
          Pass on a call to retrieve an appropriate localized string from the correct Schema object.
 void notify(Hashtable params, String URL)
          This method is used to send administrators of a registration domain an email notifying that a user registered and requires approval.
 ControllerResponse validated(Hashtable params, ControllerRequest request, ControllerResponse response, Controller ctlr)
          This method is used after the approver is validated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static org.apache.log4j.Logger log
Constructor Detail

ApproveRegistrationValidator

public ApproveRegistrationValidator()
Default constructor Creation date: (9/23/2001 2:23:06 PM) Author: Shash Chatterjee

Method Detail

notify

public void notify(Hashtable params,
                   String URL)
            throws AuthValidationException
This method is used to send administrators of a registration domain an email notifying that a user registered and requires approval. This method is called by ValidationJob when a new validation request is submitted. Creation date: (9/23/2001 2:24:30 PM) Author: Shash Chatterjee

Specified by:
notify in interface ValidationHandler
Parameters:
params - params All the application-specific parameters from LoginController
URL - URL The link that the user will click on to validate the request
Throws:
AuthValidationException - AuthValidationException
See Also:
ValidationJob

validated

public ControllerResponse validated(Hashtable params,
                                    ControllerRequest request,
                                    ControllerResponse response,
                                    Controller ctlr)
                             throws ControllerException,
                                    NonHandleableException
This method is used after the approver is validated. This method simply transitions back to a state of the LoginController This method is called by ValidationController after a validation code matches that stored in the validation entry. Creation date: (9/23/2001 2:24:30 PM) Author: Shash Chatterjee

Specified by:
validated in interface ValidationHandler
Parameters:
params - params All the application-specific parameters from LoginController
request - the ControllerRequest object
response - response The controller response from the runValidationState of ValidationController
ctlr - ctlr The ValidationController instance
Returns:
A ControllerResponse object
Throws:
ControllerException - ControllerException
NonHandleableException - upon fatal error
See Also:
ValidationController

getString

protected String getString(String stringCode)
Convenience version of the above with no arguments.

Parameters:
stringCode - the string to retrieve
Returns:
The local-language string corresponding to the given code to return the local language by considering the user as well.

getString

protected String getString(String stringCode,
                           Object[] args)
Pass on a call to retrieve an appropriate localized string from the correct Schema object. This version of the call is overridden with more sophisticated versions in DBController (which knows the user id) to return the local language by considering the user as well.

Parameters:
stringCode - the string to retrieve
args - the formatting arguments
Returns:
java.lang.String

Expresso 5-6

Please see www.jcorporate.com for information about new Expresso releases.