Java Doc for ServletControllerRequest.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
      com.jcorporate.expresso.core.controller.ServletControllerRequest

ServletControllerRequest
public class ServletControllerRequest extends ControllerRequest implements Cloneable(Code)
ServletControllerRequest is an extension of ControllerRequest that also contains access to "special" servlet-related items, such as the ServletResponse object. It should only be used *when absolutely necessary*, as normally a standard ControllerParms object is better.



Constructor Summary
public  ServletControllerRequest()
    

Method Summary
public  Objectclone()
     Method that returns a copy of itself with all the fields properly filled out.
public  ServletgetCallingServlet()
     Gets the calling servlet.
public synchronized  ActionFormgetForm()
     Gets the action form as a convenience for pure Struts writer. The base Controller object stores the current action form instance in the ControllerResponse using this method.
public  HttpServletRequestgetHttpServletRequest()
     Gets the http servlet response object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions.

public  HttpServletResponsegetHttpServletResponse()
     Gets the http servlet response object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions.

public  LocalegetLocale()
    
public synchronized  ActionMappinggetMapping()
     Gets the action mapping as a convenience for pure Struts writer. The base Controller object stores the current action mapping instance in the ControllerResponse using this method.
public  String[]getParamValues(String paramName)
    
public  ServletRequestgetServletRequest()
     Gets the servlet request object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions.

public  ServletResponsegetServletResponse()
     Gets the servlet response object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions.

public static  ServletControllerRequestparseParams(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Controller controller)
     Parse a regular servlet request for parameters (e.g.
public static  ServletControllerRequestparseParamsMultiPart(MultipartRequestHandler mp, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Controller controller)
     Static constructor for creating an servlet controller request with all the acoutrements of the Struts Action execution signature.

I deliberate add the ActionMapping, ActionForm beans as conveniences for Struts developers.

public  voidsetCallingServlet(Servlet newServlet)
     Sets the calling servlet.
public synchronized  voidsetForm(ActionForm newForm)
     Sets the action form as a convenience for pure Struts writer.
public synchronized  voidsetMapping(ActionMapping newMapping)
    
public synchronized  voidsetServletRequest(ServletRequest newRequest)
    
public synchronized  voidsetServletResponse(ServletResponse newResponse)
    


Constructor Detail
ServletControllerRequest
public ServletControllerRequest()(Code)
Default constructor




Method Detail
clone
public Object clone()(Code)
Method that returns a copy of itself with all the fields properly filled out. Note that all the servletrequest/servletresponse classes are merely shallow copied since a deep copy is meaningless in a servlet environment a new instantiated ServletControllerRequest object



getCallingServlet
public Servlet getCallingServlet()(Code)
Gets the calling servlet. Used for creation, for example. javax.servlet.Servlet set previously in setCallingServlet()
See Also:   ServletControllerRequest.getCallingServlet



getForm
public synchronized ActionForm getForm()(Code)
Gets the action form as a convenience for pure Struts writer. The base Controller object stores the current action form instance in the ControllerResponse using this method. Writers who only ever intend there controller to be used in a web environment can access the action form to do more sophisticated processing.

 public AcmeController extends DBController {
 

protected void runProcessOrderState( ControllerRequest req, ControllerRequest res ) { ServletControllerRequest request = (ServletControllerRequest)req; ActionForm form = request.getForm();

} ... }

author Peter Pilgrim ActionForm
See Also:   ServletControllerRequest.setForm




getHttpServletRequest
public HttpServletRequest getHttpServletRequest()(Code)
Gets the http servlet response object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions. If you do access the response object, you must also call setCustomOutput(true) in the ControllResponse object to let the Controller container (ControllerServlet, ControllRun, etc) know that it should not attempt to handle view processing itself. Don't use it if you don't *need* it.

HttpServletRequest object
throws:
  ClassCastException - if the servlet request cannot beconvert to HttpServletResponse
See Also:   ServletControllerRequest.getHttpServletResponse



getHttpServletResponse
public HttpServletResponse getHttpServletResponse()(Code)
Gets the http servlet response object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions. If you do access the response object, you must also call setCustomOutput(true) in the ControllResponse object to let the Controller container (ControllerServlet, ControllRun, etc) know that it should not attempt to handle view processing itself. Don't use it if you don't *need* it.

HttpServletResponse object
throws:
  ClassCastException - if the servlet request cannot beconvert to HttpServletResponse
See Also:   ServletControllerRequest.getHttpServletRequest



getLocale
public Locale getLocale()(Code)



getMapping
public synchronized ActionMapping getMapping()(Code)
Gets the action mapping as a convenience for pure Struts writer. The base Controller object stores the current action mapping instance in the ControllerResponse using this method. Writers who only ever intend there controller to be used in a web environment can access the action mapping to do more sophisticated processing.

 public AcmeController extends DBController {
 

protected void runProcessOrderState( ControllerRequest req, ControllerRequest res ) { ServletControllerRequest request = (ServletControllerRequest)req; ActionMapping mapping = request.getMapping();

} ... }

author Peter Pilgrim ActionMapping
See Also:   ServletControllerRequest.setMapping




getParamValues
public String[] getParamValues(String paramName)(Code)
Fetches array of parameter values from underlying HTTP request; use this in a web app to access the underlying parameters in the HTTP request which have the same name; parameters with the same name are not reflected in the hashtable of params maintained by ControllerRequest;
Parameters:
  paramName - key to look for among all parameters an array of String objects containing all of the values the given request parameter has, or null if the parameter does not exist.



getServletRequest
public ServletRequest getServletRequest()(Code)
Gets the servlet request object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions. If you do access the response object, you must also call setCustomOutput(true) in the ControllResponse object to let the Controller container (ControllerServlet, ControllRun, etc) know that it should not attempt to handle view processing itself. Don't use it if you don't *need* it.

ServletRequest object
See Also:   ServletControllerRequest.getServletResponse
See Also:   ServletControllerRequest.setServletRequest



getServletResponse
public ServletResponse getServletResponse()(Code)
Gets the servlet response object

Important: A Controller should only use this method if strictly necessary, and not write output that is otherwise able to be handled with inputs, outputs and transitions. If you do access the response object, you must also call setCustomOutput(true) in the ControllResponse object to let the Controller container (ControllerServlet, ControllRun, etc) know that it should not attempt to handle view processing itself. Don't use it if you don't *need* it.

ServletResponse object
See Also:   ServletControllerRequest.getServletRequest
See Also:   ServletControllerRequest.setServletResponse



parseParams
public static ServletControllerRequest parseParams(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Controller controller) throws ServletException, ControllerException(Code)
Parse a regular servlet request for parameters (e.g. not multipart)
Parameters:
  mapping - The ActionMapping used to select this instance
Parameters:
  form - The optional ActionForm bean for this request (if any)
Parameters:
  request - the Servlet Request
Parameters:
  response - the Servlet Response
Parameters:
  controller - the Controller a constructed ServletControllerRequest object
throws:
  ControllerException - exception upon controller error
throws:
  ServletException - upon javax.servlet related errors



parseParamsMultiPart
public static ServletControllerRequest parseParamsMultiPart(MultipartRequestHandler mp, ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response, Controller controller) throws ServletException, ControllerException(Code)
Static constructor for creating an servlet controller request with all the acoutrements of the Struts Action execution signature.

I deliberate add the ActionMapping, ActionForm beans as conveniences for Struts developers. You can probably sense I am cheesed off like Simon Cowell int American (Pop) Idol

Docu byte Peter Pilgrim Fri Jan 23 23:20:41 GMT 2004
Parameters:
  mapping - The ActionMapping used to select this instance
Parameters:
  form - The optional ActionForm bean for this request (if any)
Parameters:
  request - the Servlet Request
Parameters:
  response - the Servlet Response
Parameters:
  controller - the Controller
throws:
  ControllerException - exception upon controller error
throws:
  ServletException - upon javax.servlet related errors




setCallingServlet
public void setCallingServlet(Servlet newServlet)(Code)
Sets the calling servlet. For example an ExpressoActionServlet
Parameters:
  newServlet - the new calling servlet
See Also:   ServletControllerRequest.getCallingServlet



setForm
public synchronized void setForm(ActionForm newForm)(Code)
Sets the action form as a convenience for pure Struts writer.

author Peter Pilgrim Fri Jan 23 23:40:14 GMT 2004
Parameters:
  newForm - the ActionForm associated with the controller request
See Also:   ServletControllerRequest.getForm




setMapping
public synchronized void setMapping(ActionMapping newMapping)(Code)
Sets the action mapping as a convenience for pure Struts writer

author Peter Pilgrim
Parameters:
  newMapping - the ActionMapping associated with the controller request
See Also:   ServletControllerRequest.getMapping




setServletRequest
public synchronized void setServletRequest(ServletRequest newRequest)(Code)
Sets the servlet request object
Parameters:
  newRequest - the new servlet request
See Also:   ServletControllerRequest.getServletRequest



setServletResponse
public synchronized void setServletResponse(ServletResponse newResponse)(Code)
Sets the servlet response object
Parameters:
  newResponse - the new servlet response
See Also:   ServletControllerRequest.getServletResponse



Methods inherited from com.jcorporate.expresso.core.controller.ControllerRequest
public Object clone()(Code)(Java Doc)
public Object getAttrib(String attrib)(Code)(Java Doc)
public String getAttribute(String attrib)(Code)(Java Doc)
public Map getAttributes()(Code)(Java Doc)
public String getDBName()(Code)(Java Doc)
public String getDataContext()(Code)(Java Doc)
public ErrorCollection getErrorCollection() throws ControllerException(Code)(Java Doc)
public String getFileName(String paramName)(Code)(Java Doc)
public String getFormAttribute()(Code)(Java Doc)
public String getInitParameter(String paramName)(Code)(Java Doc)
public Locale getLocale()(Code)(Java Doc)
public Object getObjectParameter(String paramName) throws ControllerException(Code)(Java Doc)
public String getParameter(String paramCode)(Code)(Java Doc)
public Hashtable getParameters()(Code)(Java Doc)
public PersistentSession getSession() throws ControllerException(Code)(Java Doc)
public int getUid()(Code)(Java Doc)
public String getUser()(Code)(Java Doc)
public User getUserInfo() throws DBException(Code)(Java Doc)
public boolean isFileParameter(String paramName)(Code)(Java Doc)
public boolean isParameter(String paramName)(Code)(Java Doc)
public void populate(DBObject myDBObj) throws ControllerException(Code)(Java Doc)
public void removeAttrib(String key)(Code)(Java Doc)
public void removeParameter(String paramName)(Code)(Java Doc)
public void setAttrib(String attrib, Object val)(Code)(Java Doc)
public void setAttribute(String attrib, String val)(Code)(Java Doc)
public void setAttributes(Map attributes)(Code)(Java Doc)
public synchronized void setDBName(String newDBName)(Code)(Java Doc)
public synchronized void setDataContext(String newDBName)(Code)(Java Doc)
public void setFileParameter(String paramName, String paramValue, String fileName) throws ControllerException(Code)(Java Doc)
public synchronized void setFormAttribute(String newAttribute)(Code)(Java Doc)
public void setInitParameter(String paramName, String paramValue)(Code)(Java Doc)
public synchronized void setLocale(Locale newLocale)(Code)(Java Doc)
public void setObjectParameter(String paramName, Object paramValue) throws ControllerException(Code)(Java Doc)
public void setParameter(String paramName, String paramValue) throws ControllerException(Code)(Java Doc)
public void setParameters(Hashtable h)(Code)(Java Doc)
public void setSession(PersistentSession newSession) throws ControllerException(Code)(Java Doc)
public void setUid(int newUid)(Code)(Java Doc)
public void setUser(String newUser)(Code)(Java Doc)
public void validateDBField(String dbFieldName, DBObject oneObject, ErrorCollection ec) throws ControllerException, DBException(Code)(Java Doc)
public void validateDBObject(DBObject oneObject, ErrorCollection ec) throws ControllerException, ValidationException(Code)(Java Doc)
public void validateField(String dbFieldName, String reqFieldName, DBObject oneObject, ErrorCollection ec) throws ControllerException, DBException(Code)(Java Doc)

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.