| com.jcorporate.expresso.core.controller.DBController com.jcorporate.expresso.services.controller.Registration
All known Subclasses: com.jcorporate.expresso.services.controller.SimpleRegistration,
Registration | abstract public class Registration extends com.jcorporate.expresso.core.controller.DBController (Code) | | Registration Controller. Provides services for self-registering people... ie
sign-up pages on websites. This is the abstract class from which all Registration class
should extend from. This class contains most of the non prompt/process methods
Depends on:
- Login Controller
- Email Validator
- Registration Validator
|
Method Summary | |
protected boolean | checkRegComplete(ControllerRequest request, int uid) Check a specific UID to see if their registration is complete. | protected void | delayLogin() Function called to suspend thread execution for x many seconds before
offering a retry to login. | protected String | displayValue(String fieldType, String fieldValue) | public String | getDB(ControllerRequest request) Returns the db listed based upon the dbobj parameter. | protected String | getDefaultValue(String fieldName) | protected String | getLoginController(ControllerRequest request) Given the ControllerRequest get what the login controller is. | protected RegistrationDomain | getRegDomain(ControllerRequest request, User user) Based upon the user and the ControllerRequest, return the registration
domain belonging to this session
Parameters: request - The ControllerRequest of this request. Parameters: user - the user associated with this session. | protected User | getRegUser(ControllerRequest request) Given the request object, get the logged in user associated
with this request. | protected DBObject[] | getRequiredDBObjects(ControllerRequest request, RegistrationDomain rd, User user) Returns the required registration dbobjects... | protected DBObject | isRegistrationObjectNeeded(ControllerRequest request, User user, RegistrationObjectMap rom) Loads the dbobject and returns it if it is required.
Parameters: request - The framework's controller Request object Parameters: user - The instantiated user for the registration. Parameters: rom - The RegistrationObjectMap to count. | protected SecuredDBObject | loadDBObject(ControllerRequest request, String dbobj) Instantiated a dbobject based upon the request and dbobject requested. | public String | nextToAdd(ControllerRequest request) Return the name of the next record required for a complete
registration, or null of no more are required. | protected void | setupEmailValidation(ControllerRequest request, ControllerResponse response, User user, RegistrationDomain rd, String loginControllerName) Creates the validation entry for validating email. |
Registration | public Registration()(Code) | | |
checkRegComplete | protected boolean checkRegComplete(ControllerRequest request, int uid) throws DBException, ControllerException(Code) | | Check a specific UID to see if their registration is complete.
If it is, update the user record to reflect this
Parameters: request - The ControllerRequest object Parameters: uid - The UID true if our records show that the user's registration is complete |
delayLogin | protected void delayLogin()(Code) | | Function called to suspend thread execution for x many seconds before
offering a retry to login. Helps to slow down brute force attacks.
[a 40,000 word dictionary attack prolonged by 3 seconds a piece
adds potentially 33 hours to the attack time. Yes this can be partially bypassed
through simultaneous requests, but it still adds significant reponse time]
|
displayValue | protected String displayValue(String fieldType, String fieldValue) throws ControllerException(Code) | | Format a value for display in the HTML being returned to the client
Parameters: fieldType - The type of the field to format Parameters: fieldValue - The value of the field String The formatted field throws: ControllerException - If the field format information could not bedetermined |
getDB | public String getDB(ControllerRequest request) throws ControllerException(Code) | | Returns the db listed based upon the dbobj parameter.
Parameters: request - The ControllerRequest object the data context name that we're supposed to register with |
getDefaultValue | protected String getDefaultValue(String fieldName)(Code) | | ?????
Parameters: fieldName - ???? currently null |
getLoginController | protected String getLoginController(ControllerRequest request)(Code) | | Given the ControllerRequest get what the login controller is. If the request
doesn't have the loginController parameter, then it uses the default Expresso
login controller instead.
Parameters: request - The ControllerRequest that may or may not have the loginControllerparameter. The classname of the login controller to use. |
getRegDomain | protected RegistrationDomain getRegDomain(ControllerRequest request, User user) throws ControllerException(Code) | | Based upon the user and the ControllerRequest, return the registration
domain belonging to this session
Parameters: request - The ControllerRequest of this request. Parameters: user - the user associated with this session. a built registration domain object |
getRegUser | protected User getRegUser(ControllerRequest request) throws ControllerException(Code) | | Given the request object, get the logged in user associated
with this request.
Parameters: request - The ControllerRequest object associated with this request A built User object for this session. |
getRequiredDBObjects | protected DBObject[] getRequiredDBObjects(ControllerRequest request, RegistrationDomain rd, User user) throws DBException(Code) | | Returns the required registration dbobjects... ie, what's the minimum
to do?
Parameters: request - The System ControllerRequest Parameters: rd - The currently set up RegistrationDomain for this user Parameters: user - (optional) if null means that the user is new and all normallyrequired dbobjects will be returned. a DBObject array of required dbobjects to be filled out throws: DBException - if there's an error mapping the registration domainsand building the DBObjects. |
isRegistrationObjectNeeded | protected DBObject isRegistrationObjectNeeded(ControllerRequest request, User user, RegistrationObjectMap rom) throws DBException(Code) | | Loads the dbobject and returns it if it is required.
Parameters: request - The framework's controller Request object Parameters: user - The instantiated user for the registration. Parameters: rom - The RegistrationObjectMap to count. boolean if the record count is less than the minimum needed. |
loadDBObject | protected SecuredDBObject loadDBObject(ControllerRequest request, String dbobj) throws ControllerException(Code) | | Instantiated a dbobject based upon the request and dbobject requested.
Parameters: request - the ControllerRequest Object Parameters: dbobj - The name of the dbobject to instantiate a fully instantiated SecuredDbObject |
nextToAdd | public String nextToAdd(ControllerRequest request) throws ControllerException(Code) | | Return the name of the next record required for a complete
registration, or null of no more are required.
Parameters: request - the ControllerRequest Object java.lang.String that is the name of the next dbobject requiredto be filled out for registration |
setupEmailValidation | protected void setupEmailValidation(ControllerRequest request, ControllerResponse response, User user, RegistrationDomain rd, String loginControllerName) throws DBException, ControllerException(Code) | | Creates the validation entry for validating email.
Parameters: request - The ControllerRequest object Parameters: response - The ControllerResponse object Parameters: user - the user that is registering Parameters: rd - The registration domain that the user is signing up for Parameters: loginControllerName - the name of the login controller used throws: DBException - upon data access error throws: ControllerException - for other errors |
|
|