Java Doc for SimpleRegistration.java in  » J2EE » Expresso » com » jcorporate » expresso » services » controller » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » J2EE » Expresso » com.jcorporate.expresso.services.controller 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


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




Constructor Summary
public  SimpleRegistration()
     Registration constructor comment.

Method Summary
protected  BlockbuildForm(RegistrationDomain rd, DBObject db, ControllerResponse response)
     Builds the registration fill-in form.
protected  BlockbuildLoginBlock(RegistrationDomain rd, ControllerRequest request, ControllerResponse response)
     Builds the specially pre-defined block of login information.
public  StringgetTitle()
    
protected  booleanisShowable(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  UserprocessLoginInformation(ErrorCollection errors, ControllerRequest request, ControllerResponse response, RegistrationDomain rd)
     Step #1 in registration - pick a username and password.
protected  ControllerResponseprocessPostRegistration(ControllerRequest request, ControllerResponse response, User user, RegistrationDomain rd, String loginControllerName)
     Processes post Registration If the user is done.
protected  voidrunEmailValidateState(ControllerRequest request, ControllerResponse response)
     If the user validates correctly, this method completes registration and sends the email notification out.
protected  voidrunProcessAddRecordState(ControllerRequest request, ControllerResponse response)
     Processes the addition of a registration record.
protected  voidrunProcessApprovalState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunProcessDeleteRecordState(ControllerRequest request, ControllerResponse response)
     Deletes a registration record.
protected  voidrunProcessListRecordsState(ControllerRequest request, ControllerResponse response)
     Lists the registration records.
protected  voidrunProcessRevalidateState(ControllerRequest request, ControllerResponse response)
     Resend the validation email.
protected  voidrunProcessSelfRegisterState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunProcessUpdateRecordState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunPromptAddRecordState(ControllerRequest request, ControllerResponse response)
     Displays fill-in form for registration.
protected  voidrunPromptApprovalState(ControllerRequest request, ControllerResponse response)
     Displays the 'prompt admin for approval' page.
protected  voidrunPromptDeleteRecordState(ControllerRequest request, ControllerResponse response)
     Displays confirmation of deleting a registration record.
protected  voidrunPromptSelfRegisterState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunPromptUpdateRecordState(ControllerRequest request, ControllerResponse response)
    
protected  voidrunShowDBMenuState(ControllerRequest request, ControllerResponse response)
     Displays a menu of registrations to fill out.


Constructor Detail
SimpleRegistration
public SimpleRegistration()(Code)
Registration constructor comment.




Method Detail
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



processPostRegistration
protected ControllerResponse processPostRegistration(ControllerRequest request, ControllerResponse response, User user, RegistrationDomain rd, String loginControllerName) throws DBException, ControllerException, NonHandleableException(Code)
Processes post Registration If the user is done.
Parameters:
  request - the ControllerRequest Object
Parameters:
  response - the ControllerResponse object
Parameters:
  user - An instantiated user object representing the current Userregistering
Parameters:
  rd - The RegistrationDomain that this user is registering for
Parameters:
  loginControllerName - The name of the login controller used forreferencing back to this class A completed ControllerResponse object
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.



runProcessAddRecordState
protected void runProcessAddRecordState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Processes the addition of 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.
throws:
  NonHandleableException - upon fatal error



runProcessApprovalState
protected void runProcessApprovalState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Processes the 'administrator wishes to process the approval state'
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.
throws:
  NonHandleableException - upon fatal error



runProcessDeleteRecordState
protected void runProcessDeleteRecordState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Deletes 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.
throws:
  NonHandleableException - upon fatal error



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.



runProcessRevalidateState
protected void runProcessRevalidateState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Resend the validation email.
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.
throws:
  NonHandleableException - upon fatal error



runProcessSelfRegisterState
protected void runProcessSelfRegisterState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Processes the 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.
throws:
  NonHandleableException - upon fatal error



runProcessUpdateRecordState
protected void runProcessUpdateRecordState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Updates the 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.



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.



runPromptApprovalState
protected void runPromptApprovalState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Displays the 'prompt admin for approval' page. Modify this page if you want custom displays for your administrators.
Parameters:
  request - The ControllerRequest object for the system.
Parameters:
  response - The ControllerResponse object for the system
throws:
  ControllerException - upon state completion error.



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.



runPromptUpdateRecordState
protected void runPromptUpdateRecordState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Displays the fill-in form for updating a 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.
throws:
  NonHandleableException - upon fatal error



runShowDBMenuState
protected void runShowDBMenuState(ControllerRequest request, ControllerResponse response) throws ControllerException, NonHandleableException(Code)
Displays a menu of registrations to fill out.
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.
throws:
  NonHandleableException - upon fatal error



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.DBController
protected String getString(String stringCode, Object[] args, ControllerRequest myRequest)(Code)(Java Doc)
public static boolean isAllowed(ControllerRequest request, DBController controller, String newState) throws DBException, CacheException(Code)(Java Doc)
public boolean stateAllowed(String newState, ControllerRequest myRequest) throws ControllerException(Code)(Java Doc)

Fields inherited from com.jcorporate.expresso.core.controller.Controller
final public static String CONTROLLER_PARAM_KEY(Code)(Java Doc)
final public static String CTL_SUCC_CTL(Code)(Java Doc)
final public static String CTL_SUCC_STATE(Code)(Java Doc)
final public static String CTL_SUCC_TRAN(Code)(Java Doc)
final public static String NEWSTATE_EXCEPTION_KEY(Code)(Java Doc)
final public static String ORIGINAL_URL_KEY(Code)(Java Doc)
final public static String REQUEST_KEY(Code)(Java Doc)
final public static String RESPONSE_KEY(Code)(Java Doc)
final public static String RETURN_TO_SENDER_TRAN(Code)(Java Doc)
final public static String STATE_ERR_CTL(Code)(Java Doc)
final public static String STATE_ERR_STATE(Code)(Java Doc)
final public static String STATE_ERR_TRAN(Code)(Java Doc)
final public static String STATE_PARAM_KEY(Code)(Java Doc)
final public static String STATE_SUCC_CTL(Code)(Java Doc)
final public static String STATE_SUCC_STATE(Code)(Java Doc)
final public static String STATE_SUCC_TRAN(Code)(Java Doc)
protected Logger mLog(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)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.