Java Doc for ControllerRequest.java in  » J2EE » Expresso » com » jcorporate » expresso » core » 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.core.controller 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   com.jcorporate.expresso.core.controller.ControllerRequest

All known Subclasses:   com.jcorporate.expresso.core.controller.ServletControllerRequest,
ControllerRequest
public class ControllerRequest implements Serializable,com.jcorporate.expresso.core.dbobj.RequestContext,Cloneable(Code)
ControllerRequest is a simple "wrapper" object that holds the parameters and data required for a controller to be able to transition to a new state.
Developer Notes Because this class can be cloned, please make sure that you add any fields to this class to the clone function.



Constructor Summary
public  ControllerRequest()
     Default Constructor.

Method Summary
public  Objectclone()
     Returns a clone of this object.
public  ObjectgetAttrib(String attrib)
    
public  StringgetAttribute(String attrib)
    
public  MapgetAttributes()
    
public  StringgetDBName()
    
public  StringgetDataContext()
    
public  ErrorCollectiongetErrorCollection()
     Returns the Error collection that exists in the current session.
public  StringgetFileName(String paramName)
     If a particular parameter represents an uploaded file (which can be determined by the isFileParameter(String) method) then this method retrieves the server-side file name - e.g.
public  StringgetFormAttribute()
    
public  StringgetInitParameter(String paramName)
    
public  LocalegetLocale()
     Returns the locale of this request.
public  ObjectgetObjectParameter(String paramName)
    
public  StringgetParameter(String paramCode)
     Fetch the value for the given parameter.
public  HashtablegetParameters()
    
public  PersistentSessiongetSession()
     Returns the Persistant Session Wrapper object to store requests between environments.
public  intgetUid()
    
public  StringgetUser()
    
public  UsergetUserInfo()
    
public  booleanisFileParameter(String paramName)
    
public  booleanisParameter(String paramName)
     Checks if the described parameter is a defined parameter for this request
Parameters:
  paramName - the parameter to check against.
public  voidpopulate(DBObject myDBObj)
    
public  voidremoveAttrib(String key)
    
public  voidremoveParameter(String paramName)
     Remove a parameter from this controller request.
public  voidsetAttrib(String attrib, Object val)
    
public  voidsetAttribute(String attrib, String val)
    
public  voidsetAttributes(Map attributes)
    
public synchronized  voidsetDBName(String newDBName)
    
public synchronized  voidsetDataContext(String newDBName)
    
public  voidsetFileParameter(String paramName, String paramValue, String fileName)
    
public synchronized  voidsetFormAttribute(String newAttribute)
    
public  voidsetInitParameter(String paramName, String paramValue)
     Our caller can pass us initialization parameters.
public synchronized  voidsetLocale(Locale newLocale)
    
public  voidsetObjectParameter(String paramName, Object paramValue)
    
public  voidsetParameter(String paramName, String paramValue)
    
public  voidsetParameters(Hashtable h)
     Set the parameters for this request.
public  voidsetSession(PersistentSession newSession)
     Provide the controller with a PersitentSession object, which it can use to hold values between invokations.
public  voidsetUid(int newUid)
     Sets the current integer user id.
public  voidsetUser(String newUser)
     The client of the controller must tell us who is accessing us, and we decide if they're allowed to access the given state.
public  voidvalidateDBField(String dbFieldName, DBObject oneObject, ErrorCollection ec)
     Convenience method that retrieves the validates against that one database object field.
public  voidvalidateDBObject(DBObject oneObject, ErrorCollection ec)
     Convenience method that retrieves parameters/field values and populates a specified db object.
public  voidvalidateField(String dbFieldName, String reqFieldName, DBObject oneObject, ErrorCollection ec)
     Convenience method that retrieves the validates against that one database object field.


Constructor Detail
ControllerRequest
public ControllerRequest()(Code)
Default Constructor. Initializes Logging




Method Detail
clone
public Object clone()(Code)
Returns a clone of this object. a newly cloned ControllerRequest object.



getAttrib
public Object getAttrib(String attrib)(Code)
get the named attribute of this Controller
Parameters:
  attrib - The name of an "attribute" for this ControllerElement item java.lang.String



getAttribute
public String getAttribute(String attrib)(Code)
get the named attribute of this Controller
Parameters:
  attrib - The name of an "attribute" for this ControllerElement item java.lang.String



getAttributes
public Map getAttributes()(Code)
Get the attributes Map java.util.Map of objects keyed by String.todo return new HashMap(attributes) to encapsulate the data member properly? // 4/04 LAH



getDBName
public String getDBName()(Code)
Return the name of the database connection we use - or null for the default connection The current DBContext



getDataContext
public String getDataContext()(Code)
Return the name of the database connection we use - or null for the default connection The current DBContext



getErrorCollection
public ErrorCollection getErrorCollection() throws ControllerException(Code)
Returns the Error collection that exists in the current session. an ErrorCollection object or NULL if an error collection doesn'texist.
throws:
  ControllerException - if there is an error getting the Session object



getFileName
public String getFileName(String paramName)(Code)
If a particular parameter represents an uploaded file (which can be determined by the isFileParameter(String) method) then this method retrieves the server-side file name - e.g. the location that has the data that was uploaded stored in it.
Parameters:
  paramName - the name of the paramter to get the filename for. java.lang.String



getFormAttribute
public String getFormAttribute()(Code)



getInitParameter
public String getInitParameter(String paramName)(Code)
Retrieve the initialization parameter
Parameters:
  paramName - the name of the parameter to retrieve java.lang.String



getLocale
public Locale getLocale()(Code)
Returns the locale of this request. a Locale Object based upon current locale settings.



getObjectParameter
public Object getObjectParameter(String paramName) throws ControllerException(Code)

Parameters:
  paramName - The name of the parameter to retrieve the Object retrieved from the object parameters list.
throws:
  ControllerException - if unable to get the object parameters



getParameter
public String getParameter(String paramCode)(Code)
Fetch the value for the given parameter. Return null if there is no such parameter
Parameters:
  paramCode - Code of the parameter desired java.lang.String



getParameters
public Hashtable getParameters()(Code)
Return the complete hashtable of parameters all keyed by parameter names a Hashtable containing all the parameter values, keyed by name; this is a CLONE of the source hashtable, not the original



getSession
public PersistentSession getSession() throws ControllerException(Code)
Returns the Persistant Session Wrapper object to store requests between environments. Use this instead of HTTPSession or HTTPServletRequest a Persistant Session Object
throws:
  ControllerException - upon error



getUid
public int getUid()(Code)
Get the user id as an integer an integer representing the internal UID



getUser
public String getUser()(Code)
Get the user name the currently logged in user or NONE if there's no user logged in



getUserInfo
public User getUserInfo() throws DBException(Code)
get requesting user user object for requesting user; will throw if UID is not found



isFileParameter
public boolean isFileParameter(String paramName)(Code)
Does a specified parameter refer to an uploaded file?
Parameters:
  paramName - the name of the parameter to check if it is a file boolean



isParameter
public boolean isParameter(String paramName)(Code)
Checks if the described parameter is a defined parameter for this request
Parameters:
  paramName - the parameter to check against. true if the name given IS a valid defined parameter



populate
public void populate(DBObject myDBObj) throws ControllerException(Code)
Convenience method to populate a dbobject from the parameters supplied, by looking for parameters with the same name as the field name in the db object
Parameters:
  myDBObj - the dbobject to populate
throws:
  ControllerException - upon error



removeAttrib
public void removeAttrib(String key)(Code)
remove the attribute
Parameters:
  key - the name of the attribute to remove



removeParameter
public void removeParameter(String paramName)(Code)
Remove a parameter from this controller request.
Parameters:
  paramName - the name of the parameter to remove



setAttrib
public void setAttrib(String attrib, Object val)(Code)
Set the named attribute to the given value
Parameters:
  attrib - The name of an "attribtue" for this ControllerElement item
Parameters:
  val - The value for this attribute



setAttribute
public void setAttribute(String attrib, String val)(Code)
Set the named attribute of this Controller to the given value
Parameters:
  attrib - The name of an "attribtue" for this ControllerElement item
Parameters:
  val - The value for this attribute



setAttributes
public void setAttributes(Map attributes)(Code)
Set the attributes Map to the supplied Map
Parameters:
  attributes - a Map of attribute values



setDBName
public synchronized void setDBName(String newDBName)(Code)
Set this DB Controller to operate on a database other than the default
Parameters:
  newDBName - The dbcontext to set this request to.



setDataContext
public synchronized void setDataContext(String newDBName)(Code)
Set this DB Controller to operate on a database other than the default
Parameters:
  newDBName - The dbcontext to set this request to.



setFileParameter
public void setFileParameter(String paramName, String paramValue, String fileName) throws ControllerException(Code)



setFormAttribute
public synchronized void setFormAttribute(String newAttribute)(Code)



setInitParameter
public void setInitParameter(String paramName, String paramValue)(Code)
Our caller can pass us initialization parameters. For example, if we're being called by a client that has information on connecting to a database, the connection parameters can be passed to us.
Parameters:
  paramName - the name of the parameter
Parameters:
  paramValue - the value of the parameter



setLocale
public synchronized void setLocale(Locale newLocale)(Code)
Sets the Locale of this request
Parameters:
  newLocale - the new Locale to set this request to.



setObjectParameter
public void setObjectParameter(String paramName, Object paramValue) throws ControllerException(Code)
Set a parameter as an object
Parameters:
  paramName - The name of the parameter
Parameters:
  paramValue - The value object
throws:
  ControllerException - upon error



setParameter
public void setParameter(String paramName, String paramValue) throws ControllerException(Code)

Parameters:
  paramName - The name of the parameter
Parameters:
  paramValue - The value of the parameter
throws:
  ControllerException - upon error



setParameters
public void setParameters(Hashtable h)(Code)
Set the parameters for this request.
Parameters:
  h - The hashtable for the bulk copies.



setSession
public void setSession(PersistentSession newSession) throws ControllerException(Code)
Provide the controller with a PersitentSession object, which it can use to hold values between invokations. It is essential to use the PersistentSession rather than handing the controller the HTTPSession or HTTPServletRequest, for example, to preserve it's portability across all UI environments.
Parameters:
  newSession - A PersistentSession object



setUid
public void setUid(int newUid)(Code)
Sets the current integer user id.
Parameters:
  newUid - - the user ID integer to set this request to.



setUser
public void setUser(String newUser)(Code)
The client of the controller must tell us who is accessing us, and we decide if they're allowed to access the given state.
Parameters:
  newUser - The user's string id to set this user to.



validateDBField
public void validateDBField(String dbFieldName, DBObject oneObject, ErrorCollection ec) throws ControllerException, DBException(Code)
Convenience method that retrieves the validates against that one database object field. Assumes that the parameter name in the request is the same as the DB field name.
Parameters:
  dbFieldName - the name of the field to validate
Parameters:
  oneObject - the DBOBject to validate
Parameters:
  ec - The ErrorCollection to fill out if there is an error
throws:
  DBException - upon data error
throws:
  ControllerException - upon internal error



validateDBObject
public void validateDBObject(DBObject oneObject, ErrorCollection ec) throws ControllerException, ValidationException(Code)
Convenience method that retrieves parameters/field values and populates a specified db object. Once the object is populated, the fields are validated and the error collection populated if necessary.
Parameters:
  oneObject - the object to validate
Parameters:
  ec - The error collection that gets filled out.
throws:
  ControllerException - upon internal or data error
throws:
  ValidationException - if there is an error validating the object



validateField
public void validateField(String dbFieldName, String reqFieldName, DBObject oneObject, ErrorCollection ec) throws ControllerException, DBException(Code)
Convenience method that retrieves the validates against that one database object field.
Parameters:
  dbFieldName - the name of the field to validate
Parameters:
  reqFieldName - ???
Parameters:
  oneObject - the DBOBject to validate
Parameters:
  ec - The ErrorCollection to fill out if there is an error
throws:
  DBException - upon data error
throws:
  ControllerException - upon internal error



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(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.