Java Doc for ScopedServletUtils.java in  » Library » Apache-beehive-1.0.2-src » org » apache » beehive » netui » pageflow » scoping » 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 » Library » Apache beehive 1.0.2 src » org.apache.beehive.netui.pageflow.scoping 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.beehive.netui.pageflow.scoping.ScopedServletUtils

ScopedServletUtils
public class ScopedServletUtils (Code)
Utilities for creating scoped wrapper versions of HttpRequest, HttpResponse, ServletContext. These wrappers are the basis for a scoped servlet environment, which can be used to scope the Struts framework.


Field Summary
final static  StringATTR_PREFIX
    
final public static  StringSCOPE_ID_PARAM
    


Method Summary
public static  StringdecodeURI(HttpServletRequest request)
    
public static  HttpServletRequestgetOuterRequest(HttpServletRequest request)
     Get the outer (unwrapped) request.
Parameters:
  request - the request to unwrap.
public static  ServletRequestgetOuterServletRequest(ServletRequest request)
     Get the outer (unwrapped) request.
Parameters:
  request - the request to unwrap.
final public static  StringgetRelativeURI(HttpServletRequest request)
     Get the request URI, relative to the webapp root.
final public static  StringgetRelativeURI(HttpServletRequest request, String uri)
     Get a URI relative to the webapp root.
final public static  StringgetRelativeURI(String contextPath, String uri)
     Get a URI relative to a given webapp root.
public static  StringgetScopedName(String baseName, Object scopeKey)
     Get a scoped version of a given name.
Parameters:
  baseName - the name to be scoped.
Parameters:
  scopeKey - the context key for scoping the name.
public static  ScopedRequestgetScopedRequest(HttpServletRequest realRequest, String overrideURI, ServletContext servletContext, Object scopeKey)
     Get the cached ScopedRequest wrapper.
public static  ScopedRequestgetScopedRequest(HttpServletRequest realRequest, String overrideURI, ServletContext servletContext, Object scopeKey, boolean seeOuterRequestAttributes)
     Get the cached ScopedRequest wrapper.
public static  ObjectgetScopedRequestAttribute(String attrName, ServletRequest request)
     Get an attribute from the given request, and if it is a ScopedRequest , ensure that the attribute is not "showing through" from the outer request, even if the ScopedRequest allows that by default.
public static  ScopedResponsegetScopedResponse(HttpServletResponse realResponse, ScopedRequest scopedRequest)
     Get the cached wrapper servlet response.
public static  ObjectgetScopedSessionAttr(String attrName, HttpServletRequest request)
     If the request is a ScopedRequest, this returns an attribute whose name is scoped to that request's scope-ID; otherwise, it is a straight passthrough to HttpSession.getAttribute .
public static  StringgetScopedSessionAttrName(String attrName, HttpServletRequest request)
     If the request is a ScopedRequest, this returns an attribute name scoped to that request's scope-ID; otherwise, it returns the given attribute name.
public static  StringnormalizeURI(String uri)
     Resolve "." and ".." in a URI.
public static  voidremoveScopedSessionAttr(String attrName, HttpServletRequest request)
     If the request is a ScopedRequest, this removes an attribute whose name is scoped to that request's scope-ID; otherwise, it is a straight passthrough to HttpSession.removeAttribute .
public static  voidrenameScope(Object oldScopeKey, Object newScopeKey, HttpServletRequest request)
     Find all scoped objects ( ScopedRequest , ScopedResponse ) which have a certain scope-key, replaces this scope-key with the new one, and re-caches the objects the new scope-key.
public static  voidsetScopedSessionAttr(String attrName, Object val, HttpServletRequest request)
     If the request is a ScopedRequest, this sets an attribute whose name is scoped to that request's scope-ID; otherwise, it is a straight passthrough to HttpSession.setAttribute .
public static  ScopedRequestunwrapRequest(ServletRequest request)
     Unwraps the contained ScopedRequest from the given ServletRequest, which may be a ServletRequestWrapper.
Parameters:
  request - the ScopedRequest, or a wrapper (ServletRequestWrapper) around it.
public static  ScopedResponseunwrapResponse(ServletResponse response)
     Unwraps the contained ScopedResponseImpl from the given ServletResponse, which may be a ServletResponseWrapper.
Parameters:
  response - the ScopedResponse, or a wrapper (ServletResponseWrapper) around it.

Field Detail
ATTR_PREFIX
final static String ATTR_PREFIX(Code)



SCOPE_ID_PARAM
final public static String SCOPE_ID_PARAM(Code)





Method Detail
decodeURI
public static String decodeURI(HttpServletRequest request)(Code)



getOuterRequest
public static HttpServletRequest getOuterRequest(HttpServletRequest request)(Code)
Get the outer (unwrapped) request.
Parameters:
  request - the request to unwrap. the outer request, if the given request is a ScopedRequest (or wraps a ScopedRequest);otherwise, the given request itself.



getOuterServletRequest
public static ServletRequest getOuterServletRequest(ServletRequest request)(Code)
Get the outer (unwrapped) request.
Parameters:
  request - the request to unwrap. the outer request, if the given request is a ScopedRequest (or wraps a ScopedRequest);otherwise, the given request itself.



getRelativeURI
final public static String getRelativeURI(HttpServletRequest request)(Code)
Get the request URI, relative to the webapp root.
Parameters:
  request - the current HttpServletRequest.



getRelativeURI
final public static String getRelativeURI(HttpServletRequest request, String uri)(Code)
Get a URI relative to the webapp root.
Parameters:
  request - the current HttpServletRequest.
Parameters:
  uri - the URI which should be made relative.



getRelativeURI
final public static String getRelativeURI(String contextPath, String uri)(Code)
Get a URI relative to a given webapp root.
Parameters:
  contextPath - the webapp context path, e.g., "/myWebapp"
Parameters:
  uri - the URI which should be made relative.



getScopedName
public static String getScopedName(String baseName, Object scopeKey)(Code)
Get a scoped version of a given name.
Parameters:
  baseName - the name to be scoped.
Parameters:
  scopeKey - the context key for scoping the name. a scoped version of the given name.



getScopedRequest
public static ScopedRequest getScopedRequest(HttpServletRequest realRequest, String overrideURI, ServletContext servletContext, Object scopeKey)(Code)
Get the cached ScopedRequest wrapper. If none exists, creates one and caches it. ScopedServletUtils.getScopedRequest(HttpServletRequest,String,ServletContext,Object,boolean)
Parameters:
  realRequest - the "real" (outer) HttpServletRequest, which will be wrapped.
Parameters:
  overrideURI - the request-URI for the wrapped object. This URI must begin with the context path.
Parameters:
  servletContext - the current ServletContext.
Parameters:
  scopeKey - the scope-key associated with the new (or looked-up) scoped request. the cached (or newly-created) ScopedRequest.



getScopedRequest
public static ScopedRequest getScopedRequest(HttpServletRequest realRequest, String overrideURI, ServletContext servletContext, Object scopeKey, boolean seeOuterRequestAttributes)(Code)
Get the cached ScopedRequest wrapper. If none exists, creates one and caches it.
Parameters:
  realRequest - the "real" (outer) HttpServletRequest, which will be wrapped.
Parameters:
  overrideURI - the request-URI for the wrapped object. This URI must begin with the context path.
Parameters:
  servletContext - the current ServletContext.
Parameters:
  scopeKey - the scope-key associated with the new (or looked-up) scoped request.
Parameters:
  seeOuterRequestAttributes - if true, a request attribute will be "seen" in the outer request,if it is not found within the scoped request; if false, attributes are only seen whenthey are present in the scoped request. the cached (or newly-created) ScopedRequest.



getScopedRequestAttribute
public static Object getScopedRequestAttribute(String attrName, ServletRequest request)(Code)
Get an attribute from the given request, and if it is a ScopedRequest , ensure that the attribute is not "showing through" from the outer request, even if the ScopedRequest allows that by default.



getScopedResponse
public static ScopedResponse getScopedResponse(HttpServletResponse realResponse, ScopedRequest scopedRequest)(Code)
Get the cached wrapper servlet response. If none exists, creates one and caches it.
Parameters:
  realResponse - the "real" (outer) ServletResponse, which will be wrapped.
Parameters:
  scopedRequest - the ScopedRequest returned from ScopedServletUtils.getScopedRequest. the cached (or newly-created) ScopedResponse.



getScopedSessionAttr
public static Object getScopedSessionAttr(String attrName, HttpServletRequest request)(Code)
If the request is a ScopedRequest, this returns an attribute whose name is scoped to that request's scope-ID; otherwise, it is a straight passthrough to HttpSession.getAttribute .



getScopedSessionAttrName
public static String getScopedSessionAttrName(String attrName, HttpServletRequest request)(Code)
If the request is a ScopedRequest, this returns an attribute name scoped to that request's scope-ID; otherwise, it returns the given attribute name.



normalizeURI
public static String normalizeURI(String uri)(Code)
Resolve "." and ".." in a URI.



removeScopedSessionAttr
public static void removeScopedSessionAttr(String attrName, HttpServletRequest request)(Code)
If the request is a ScopedRequest, this removes an attribute whose name is scoped to that request's scope-ID; otherwise, it is a straight passthrough to HttpSession.removeAttribute .



renameScope
public static void renameScope(Object oldScopeKey, Object newScopeKey, HttpServletRequest request)(Code)
Find all scoped objects ( ScopedRequest , ScopedResponse ) which have a certain scope-key, replaces this scope-key with the new one, and re-caches the objects the new scope-key.
Parameters:
  oldScopeKey -
Parameters:
  newScopeKey -
Parameters:
  request - the real (outer) request, where the scoped objects are cached.



setScopedSessionAttr
public static void setScopedSessionAttr(String attrName, Object val, HttpServletRequest request)(Code)
If the request is a ScopedRequest, this sets an attribute whose name is scoped to that request's scope-ID; otherwise, it is a straight passthrough to HttpSession.setAttribute .



unwrapRequest
public static ScopedRequest unwrapRequest(ServletRequest request)(Code)
Unwraps the contained ScopedRequest from the given ServletRequest, which may be a ServletRequestWrapper.
Parameters:
  request - the ScopedRequest, or a wrapper (ServletRequestWrapper) around it. the unwrapped ScopedRequest.



unwrapResponse
public static ScopedResponse unwrapResponse(ServletResponse response)(Code)
Unwraps the contained ScopedResponseImpl from the given ServletResponse, which may be a ServletResponseWrapper.
Parameters:
  response - the ScopedResponse, or a wrapper (ServletResponseWrapper) around it. the unwrapped ScopedResponseImpl.



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.