| com.jcorporate.expresso.core.controller.Controller com.jcorporate.expresso.core.controller.DBController com.jcorporate.expresso.services.controller.Registration com.jcorporate.expresso.services.controller.SimpleRegistration
SimpleRegistration | public class SimpleRegistration extends com.jcorporate.expresso.services.controller.Registration (Code) | | SimpleRegistration Controller. This is the implementation example of
Registration. Depends on:
-
Login Controller
-
Email Validator
-
Registration Validator
-
Reg Domain DBObjects
-
Reg Domain DBObject Map
The following states are the usual entry points into the registration
controller
-
showDBMenu - For users that want to change/edit their registraiton info
-
promptAddRecord - Where we prompt the user to fill out the registration
information
-
promptSelfRegister - Where we prompt for login information et.al. from users
who wish to self-register
-
promptApproval - For approval administrators only. Shows the registration
information and asks if a user should be approved or not.
Parameter Explanation: Login Controller == the classname of the login
controller that should be forwarded to upon transfer back to the login
controller.
Creation date: (6/23/2001 4:05:05 PM)
author: Shash Chatterjee, refactored by Michael Rimov |
Method Summary | |
protected Block | buildForm(RegistrationDomain rd, DBObject db, ControllerResponse response) Builds the registration fill-in form. | protected Block | buildLoginBlock(RegistrationDomain rd, ControllerRequest request, ControllerResponse response) Builds the specially pre-defined block of login information. | public String | getTitle() | protected boolean | isShowable(RegistrationDomain rd, DBObject db, String fieldName, boolean forListView) Based upon customization of the registration domain, should a particular
field name be displayed in the registration form. | protected User | processLoginInformation(ErrorCollection errors, ControllerRequest request, ControllerResponse response, RegistrationDomain rd) Step #1 in registration - pick a username and password. | protected ControllerResponse | processPostRegistration(ControllerRequest request, ControllerResponse response, User user, RegistrationDomain rd, String loginControllerName) Processes post Registration If the user is done. | protected void | runEmailValidateState(ControllerRequest request, ControllerResponse response) If the user validates correctly, this method completes registration and
sends the email notification out. | protected void | runProcessAddRecordState(ControllerRequest request, ControllerResponse response) Processes the addition of a registration record. | protected void | runProcessApprovalState(ControllerRequest request, ControllerResponse response) | protected void | runProcessDeleteRecordState(ControllerRequest request, ControllerResponse response) Deletes a registration record. | protected void | runProcessListRecordsState(ControllerRequest request, ControllerResponse response) Lists the registration records. | protected void | runProcessRevalidateState(ControllerRequest request, ControllerResponse response) Resend the validation email. | protected void | runProcessSelfRegisterState(ControllerRequest request, ControllerResponse response) | protected void | runProcessUpdateRecordState(ControllerRequest request, ControllerResponse response) | protected void | runPromptAddRecordState(ControllerRequest request, ControllerResponse response) Displays fill-in form for registration. | protected void | runPromptApprovalState(ControllerRequest request, ControllerResponse response) Displays the 'prompt admin for approval' page. | protected void | runPromptDeleteRecordState(ControllerRequest request, ControllerResponse response) Displays confirmation of deleting a registration record. | protected void | runPromptSelfRegisterState(ControllerRequest request, ControllerResponse response) | protected void | runPromptUpdateRecordState(ControllerRequest request, ControllerResponse response) | protected void | runShowDBMenuState(ControllerRequest request, ControllerResponse response) Displays a menu of registrations to fill out. |
SimpleRegistration | public SimpleRegistration()(Code) | | Registration constructor comment.
|
buildForm | protected Block buildForm(RegistrationDomain rd, DBObject db, ControllerResponse response) throws ControllerException(Code) | | Builds the registration fill-in form.
Parameters: rd - The registration domain of this request Parameters: db - The secured DBObject that contains the data to fill out. Parameters: response - The controllerResponse handed down by the framework A block that represents all the fill in forms for this object. throws: ControllerException - upon error. |
buildLoginBlock | protected Block buildLoginBlock(RegistrationDomain rd, ControllerRequest request, ControllerResponse response) throws ControllerException(Code) | | Builds the specially pre-defined block of login information.
Parameters: rd - The Registration Domain the user is to register for. Parameters: request - the ControllerRequest object Parameters: response - The ControllerResponse object an instantiated and filled out Block for login information |
getTitle | public String getTitle()(Code) | | Get the title of this registration controller
the String title of this registration. |
isShowable | protected boolean isShowable(RegistrationDomain rd, DBObject db, String fieldName, boolean forListView) throws ControllerException(Code) | | Based upon customization of the registration domain, should a particular
field name be displayed in the registration form.
Parameters: rd - The registration domain that this request is under Parameters: db - The secured dbobject that will be the container for theresulting data Parameters: fieldName - the field name of the database object. Parameters: forListView - is this for showing the registration list true if the field should be visible to the end user. throws: ControllerException - if there's trouble talking with the dbobject |
processLoginInformation | protected User processLoginInformation(ErrorCollection errors, ControllerRequest request, ControllerResponse response, RegistrationDomain rd) throws DBException, ControllerException, LogException, NonHandleableException(Code) | | Step #1 in registration - pick a username and password. This function
performs the guts of the owrk.
Parameters: errors - The system fills out the errors collection if there areproblems with the registration processing. Parameters: request - The ControllerRequest handed off to a controller by theframework Parameters: response - The ControllerResponse handed off to a controller by theframework. Parameters: rd - if successful, rd will contain an instantiated registrationdomain object representing the registration domain that thisuser belongs to. an Instantiated User object or null if errors exist. throws: DBException - upon data access error throws: ControllerException - upon controller error throws: LogException - upon logging error throws: NonHandleableException - upon fatal error |
runEmailValidateState | protected void runEmailValidateState(ControllerRequest request, ControllerResponse response) throws ControllerException(Code) | | If the user validates correctly, this method completes registration and
sends the email notification out. If admin. authorization is required
this will setup the authorization process.
Parameters: request - The ControllerRequest object handed down by the frameworkfor this request Parameters: response - The ControllerResponse object returned by thiscontroller throws: ControllerException - upon error of processing this state. |
runProcessListRecordsState | protected void runProcessListRecordsState(ControllerRequest request, ControllerResponse response) throws ControllerException(Code) | | Lists the registration records.
Parameters: request - The ControllerRequest object handed down by the frameworkfor this request Parameters: response - The ControllerResponse object returned by thiscontroller throws: ControllerException - upon error of processing this state. |
runPromptAddRecordState | protected void runPromptAddRecordState(ControllerRequest request, ControllerResponse response) throws ControllerException(Code) | | Displays fill-in form for registration.
Parameters: request - The ControllerRequest object handed down by the frameworkfor this request Parameters: response - The ControllerResponse object returned by thiscontroller throws: ControllerException - upon error of processing this state. |
runPromptDeleteRecordState | protected void runPromptDeleteRecordState(ControllerRequest request, ControllerResponse response) throws ControllerException(Code) | | Displays confirmation of deleting a registration record.
Parameters: request - The ControllerRequest object handed down by the frameworkfor this request Parameters: response - The ControllerResponse object returned by thiscontroller throws: ControllerException - upon error of processing this state. |
runPromptSelfRegisterState | protected void runPromptSelfRegisterState(ControllerRequest request, ControllerResponse response) throws ControllerException(Code) | | Displays the fill-in form for self-registering users
Parameters: request - The ControllerRequest object handed down by the frameworkfor this request Parameters: response - The ControllerResponse object returned by thiscontroller throws: ControllerException - upon error of processing this state. |
Methods inherited from com.jcorporate.expresso.services.controller.Registration | protected boolean checkRegComplete(ControllerRequest request, int uid) throws DBException, ControllerException(Code)(Java Doc) protected void delayLogin()(Code)(Java Doc) protected String displayValue(String fieldType, String fieldValue) throws ControllerException(Code)(Java Doc) public String getDB(ControllerRequest request) throws ControllerException(Code)(Java Doc) protected String getDefaultValue(String fieldName)(Code)(Java Doc) protected String getLoginController(ControllerRequest request)(Code)(Java Doc) protected RegistrationDomain getRegDomain(ControllerRequest request, User user) throws ControllerException(Code)(Java Doc) protected User getRegUser(ControllerRequest request) throws ControllerException(Code)(Java Doc) protected DBObject[] getRequiredDBObjects(ControllerRequest request, RegistrationDomain rd, User user) throws DBException(Code)(Java Doc) protected DBObject isRegistrationObjectNeeded(ControllerRequest request, User user, RegistrationObjectMap rom) throws DBException(Code)(Java Doc) protected SecuredDBObject loadDBObject(ControllerRequest request, String dbobj) throws ControllerException(Code)(Java Doc) public String nextToAdd(ControllerRequest request) throws ControllerException(Code)(Java Doc) protected void setupEmailValidation(ControllerRequest request, ControllerResponse response, User user, RegistrationDomain rd, String loginControllerName) throws DBException, ControllerException(Code)(Java Doc)
|
Methods inherited from com.jcorporate.expresso.core.controller.Controller | protected void addFinalState(State newFinalState) throws NonHandleableException(Code)(Java Doc) protected void addPromptTransitions(State nextState, ControllerResponse response) throws ControllerException(Code)(Java Doc) protected void addRegDomainParamtoSession(HttpServletRequest req, ControllerRequest creq, String regDomain) throws ControllerException(Code)(Java Doc) protected void addRequestedURLtoSession(HttpServletRequest req, ControllerRequest creq) throws ControllerException(Code)(Java Doc) protected void addState(State newState)(Code)(Java Doc) protected void addStatePairing(State promptState, State handleState, String stateFormClass) throws NonHandleableException(Code)(Java Doc) protected void endTimer(long beginTimer, HttpServletRequest request)(Code)(Java Doc) public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException(Code)(Java Doc) protected ActionForm findControllerForm(ControllerRequest request) throws ControllerException(Code)(Java Doc) protected String generateToken(ControllerRequest request)(Code)(Java Doc) protected ActionForward getActionForward(ServletControllerRequest req, ActionConfig mapping, ControllerResponse res) throws NonHandleableException, ControllerException(Code)(Java Doc) protected Transition getControllerChainingTransition()(Code)(Java Doc) protected Transition getControllerSecurityTransition()(Code)(Java Doc) public State getFinalState()(Code)(Java Doc) public String getInitialState()(Code)(Java Doc) public synchronized Logger getLogger()(Code)(Java Doc) public static String[] getParamValues(ServletControllerRequest request, String paramName)(Code)(Java Doc) protected String getRequestURL(HttpServletRequest req)(Code)(Java Doc) final protected String getSchema()(Code)(Java Doc) public synchronized Stack getSchemaHierarchy()(Code)(Java Doc) protected Schema getSchemaInstance()(Code)(Java Doc) public synchronized Stack getSchemaStack()(Code)(Java Doc) final public State getState(String stateName)(Code)(Java Doc) final public Hashtable getStates()(Code)(Java Doc) protected String getString(String stringCode)(Code)(Java Doc) protected String getString(String stringCode, Object[] args)(Code)(Java Doc) public String getTitle()(Code)(Java Doc) protected void handleException(HttpServletRequest req, ControllerRequest creq, String dbName, String userName, Throwable theException) throws ServletException(Code)(Java Doc) public static synchronized Controller instantiate(String className) throws ControllerException(Code)(Java Doc) protected boolean isFinalState(String newState)(Code)(Java Doc) protected boolean isHandleState(State nextState)(Code)(Java Doc) protected boolean isPromptState(State nextState)(Code)(Java Doc) protected boolean isTokenValid(ControllerRequest request)(Code)(Java Doc) protected StateForm loadStateForm(State nextState, ActionForm controllerForm) throws ControllerException(Code)(Java Doc) public ControllerResponse newState(String newState, ControllerRequest myRequest) throws ControllerException, NonHandleableException(Code)(Java Doc) protected String nextHandleState(State nextState)(Code)(Java Doc) protected String nextPromptState(State nextState)(Code)(Java Doc) protected void populateStateForm(StateForm stateForm, ControllerRequest request) throws ControllerException(Code)(Java Doc) protected void postPerform(State nextState, ControllerRequest request, ControllerResponse response) throws ControllerException(Code)(Java Doc) protected void prePerform(State nextState, ControllerRequest request, ControllerResponse response) throws ControllerException(Code)(Java Doc) protected String previousPromptState(State nextState)(Code)(Java Doc) protected void processRequestTransitions(State nextState, ControllerRequest request) throws ControllerException(Code)(Java Doc) protected Transition processTransitions(ControllerRequest request, ControllerResponse response, State nextState) throws ControllerException, NonHandleableException(Code)(Java Doc) protected void redirectRequest(HttpServletResponse response, String redirectURL) throws IOException(Code)(Java Doc) public void redirectRequest(ControllerRequest request, ControllerResponse response, String redirectURL) throws IOException(Code)(Java Doc) protected ForwardConfig remapFromExtension(ForwardConfig fwd, ActionConfig mapping, ServletControllerRequest req) throws ControllerException(Code)(Java Doc) protected void resetToken(ControllerRequest request)(Code)(Java Doc) protected void saveToken(ControllerRequest request)(Code)(Java Doc) protected void setControllerChainingTransition(Transition newControllerChainingTransition) throws NonHandleableException(Code)(Java Doc) protected void setControllerSecurityTransition(Transition newControllerSecurityTransition)(Code)(Java Doc) public ControllerResponse setCurrentState(String newState, ControllerRequest params) throws ControllerException, NonHandleableException(Code)(Java Doc) public void setInitialState(String newInitialState)(Code)(Java Doc) protected void setSchema(String schemaClass)(Code)(Java Doc) protected void setSchema(Class schemaClass)(Code)(Java Doc) public void setupDefaultValues(String dbName) throws DBException(Code)(Java Doc) protected void setupReturnToSender(State nextState, ControllerRequest request) throws ControllerException(Code)(Java Doc) protected synchronized void setupSubclassLog()(Code)(Java Doc) public boolean stateAllowed(String newState, ControllerRequest params) throws ControllerException(Code)(Java Doc) protected void transition(String newState, ControllerRequest req, ControllerResponse res) throws ControllerException, NonHandleableException(Code)(Java Doc) protected void transition(String newState, Class externalController, ControllerRequest req, ControllerResponse res) throws ControllerException, NonHandleableException(Code)(Java Doc) protected void transition(String newState, ControllerRequest req, ControllerResponse res, boolean clear) throws ControllerException, NonHandleableException(Code)(Java Doc) protected void unloadStateForm(StateForm stateForm, ActionForm controllerForm) throws ControllerException(Code)(Java Doc)
|
|
|