Java Doc for CWebProxy.java in  » Portal » uPortal_rel-2-6-1-GA » org » jasig » portal » channels » webproxy » 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 » Portal » uPortal_rel 2 6 1 GA » org.jasig.portal.channels.webproxy 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jasig.portal.channels.webproxy.CWebProxy

CWebProxy
public class CWebProxy implements IChannel,ICacheable,IMimeResponse(Code)

A channel which transforms and interacts with dynamic XML or HTML. See docs/website/developers/channel_docs/reference/CwebProxy.html for full documentation.

Static and Runtime Channel Parameters: These parameters can be configured both as ChannelStaticData parameters and as ChannelRuntimeData parameters. These static parameters can be updated by equivalent Runtime parameters. Caching parameters can also be changed temporarily. Cache defaults and IPerson restrictions are loaded first from properties, and overridden by static data if there.

  1. "cw_xml" - a URI for the source XML document. By default, must be an http:// or https:// URI, though this requirement is configurable via ChannelStaticData parameters.
  2. "cw_xslTitle" - a title representing the stylesheet (optional) If no title parameter is specified, a default stylesheet will be chosen according to the media
  3. "cw_cacheDefaultMode" - Default caching mode. May be none (normally don't cache), or all (cache everything).
  4. "cw_cacheDefaultTimeout" - Default timeout in seconds.
  5. "cw_cacheMode" - override default for this request only. Primarily intended as a runtime parameter, but can used statically to override the first instance.
  6. "cw_cacheTimeout" - override default for this request only. Primarily intended as a runtime parameter, but can be used statically to override the first instance.

Static Channel Parameters: These parameters can be configured only as ChannelStaticData parameters. They can no longer (as of uPortal 2.5.1) be changed at runtime. This closes some serious security vulnerabilities wherein the Adversary would manipulate these parameters at runtime to access resources on the local filesystem.

  1. "cw_ssl" - a URI specifying the corresponding .ssl (stylesheet list) file
  2. "cw_xsl" - a URI specifying the stylesheet to use If cw_xsl is supplied, cw_ssl and cw_xslTitle will be ignored.
  3. "cw_passThrough" - indicates how RunTimeData is to be passed through. If cw_passThrough is supplied, and not set to "all" or "application", additional RunTimeData parameters not starting with "cw_" or "upc_" will be passed as request parameters to the XML URI. If cw_passThrough is set to "marked", this will happen only if there is also a RunTimeData parameter of cw_inChannelLink. "application" is intended to keep application-specific links in the channel, while "all" should keep all links in the channel. This distinction is handled entirely in the URL Filters.
  4. "cw_tidy" - output from xmlUri will be passed though Jtidy
  5. "cw_info" - a URI to be called for the info event.
  6. "cw_help" - a URI to be called for the help event.
  7. "cw_edit" - a URI to be called for the edit event.
  8. "cw_person" - IPerson attributes to pass. A comma-separated list of IPerson attributes to pass to the back end application. The static data value will be passed on all requests except some refresh requests.
  9. "cw_personAllow" - Restrict IPerson attribute passing to this list. A comma-separated list of IPerson attributes that may be passed via cw_person. An empty or non-existent value means use the default value from the corresponding property. The special value "*" means all attributes are allowed. The value "!*" means none are allowed. Static data only.
  10. "upc_localConnContext" - LocalConnectionContext implementation class. The name of a class to use when data sent to the backend application needs to be modified or added to suit local needs. Static data only.
  11. "cw_allow_uri_prefixes" - permitted URI prefixes. Optional static data only parameter specifying allowable prefixes for URIs accessed by this channel. This channel will only use URIs with these prefixes for obtaining XML and XSLT for use in rendering. Whitespace delimit allowed prefixes. Effectively defaults to "http:// https://"; do not allow "file:/" lightly.
  12. "cw_block_uri_prefixes" - blocked URI prefixes. Optional static data only parameter further restricting which URIs this channel will use to obtain XML and XSLT. This channel will not use URIs matching prefixes specified in this whitespace- delimited parameter. Effectively defaults to "".
  13. "cw_restrict_xmlUri_inStaticData" - Optional parameter specifying whether the xmlUri should be restricted according to the allow and deny prefix rules above as presented in ChannelStaticData or just as presented in ChannelRuntimeData. "true" means both ChannelStaticData and ChannelRuntimeData will be restricted. Any other value or the parameter not being present means only ChannelRuntimeData will be restricted. It is important to set this value to true when using subscribe-time channel parameter configuration of the xmlUri.

Runtime Channel Parameters:

The following parameters are runtime-only.

  1. "cw_reset" - an instruction to return to reset internal variables. The value return resets cw_xml to its last value before changed by button events. The value "reset" returns all variables to the static data values.
  2. "cw_download" - use download worker for this link or form any link or form that contains this parameter will be handled by the download worker, if the pass-through mode is set to rewrite the link or form. This allows downloads from the proxied site to be delivered via the portal, primarily useful if the download requires verification of a session referenced by a proxied cookie

This channel can be used for all XML formats with appropriate stylesheets. All static data parameters as well as additional runtime data parameters passed to this channel via HttpRequest will in turn be passed on to the XSLT stylesheet as stylesheet parameters. They can be read in the stylesheet as follows: <xsl:param name="yourParamName">aDefaultValue</xsl:param>


author:
   Andrew Draskoy, andrew@mun.ca
author:
   Sarah Arnott, sarnott@mun.ca
version:
   $Revision: 42283 $


Field Summary
final public static  StringALLOW_URI_PREFIXES_PARAM
     The name of the optional ChannelStaticData parameter the value of which will be a String containing a whitespace-delimited list of allowable URI prefixes for URIs from which the configured CWebProxy instance will obtain XML and XSLT.
final public static  StringBLOCK_URI_PREFIXES_PARAM
     The name of the optional ChannelStaticData parameter the value of which will be a String containing a whitespace-delimited list of explicitly blocked URI prefixes for URIs from which the configured CWebProxy instance will not obtain XML and XSLT.
final public static  StringRESTRICT_STATIC_XMLURI_PREFIXES_PARAM
     The name of the optional ChannelStaticData parameter the value of which will be the String "true" to convey that the xmlUri should be restricted as received from both ChannelStaticData and CHannelRuntimeData and any other value to convey that it should be restricted only as received from ChannelRuntimeData.
 ChannelStatechanState
    
static  PrintWriterdevNull
    
final static  StringsystemCacheId
    

Constructor Summary
public  CWebProxy()
    

Method Summary
public  voiddownloadData(OutputStream out)
    
public  ChannelCacheKeygenerateKey()
    
public  StringgetContentType()
    
static  PrintWritergetErrout()
    
public  MapgetHeaders()
    
public  InputStreamgetInputStream()
    
public  StringgetName()
    
public  ChannelRuntimePropertiesgetRuntimeProperties()
     Acquires ChannelRuntimeProperites from the channel.
public  booleanisCacheValid(Object validity)
    
public  voidreceiveEvent(PortalEvent ev)
     Process portal events.
public  voidrenderXML(ContentHandler out)
     Ask channel to render its content.
public  voidreportDownloadError(Exception e)
    
public  voidsetRuntimeData(ChannelRuntimeData rd)
     Passes ChannelRuntimeData to the channel.
public  voidsetStaticData(ChannelStaticData sd)
     Passes ChannelStaticData to the channel.

Field Detail
ALLOW_URI_PREFIXES_PARAM
final public static String ALLOW_URI_PREFIXES_PARAM(Code)
The name of the optional ChannelStaticData parameter the value of which will be a String containing a whitespace-delimited list of allowable URI prefixes for URIs from which the configured CWebProxy instance will obtain XML and XSLT. Defaults to allowing all URIs of the http:// and https:// methods.



BLOCK_URI_PREFIXES_PARAM
final public static String BLOCK_URI_PREFIXES_PARAM(Code)
The name of the optional ChannelStaticData parameter the value of which will be a String containing a whitespace-delimited list of explicitly blocked URI prefixes for URIs from which the configured CWebProxy instance will not obtain XML and XSLT. URIs matching these prefixes will not be used even if they also match an allow prefix specified in ALLOW_URI_PREFIXES_PARAM.



RESTRICT_STATIC_XMLURI_PREFIXES_PARAM
final public static String RESTRICT_STATIC_XMLURI_PREFIXES_PARAM(Code)
The name of the optional ChannelStaticData parameter the value of which will be the String "true" to convey that the xmlUri should be restricted as received from both ChannelStaticData and CHannelRuntimeData and any other value to convey that it should be restricted only as received from ChannelRuntimeData. CWebProxy should be configured to restrict xmlUri from ChannelStaticData in the case where the xmlUri is a subscribe-time configurable parameter.



chanState
ChannelState chanState(Code)



devNull
static PrintWriter devNull(Code)



systemCacheId
final static String systemCacheId(Code)




Constructor Detail
CWebProxy
public CWebProxy()(Code)




Method Detail
downloadData
public void downloadData(OutputStream out) throws IOException(Code)



generateKey
public ChannelCacheKey generateKey()(Code)



getContentType
public String getContentType()(Code)



getErrout
static PrintWriter getErrout() throws FileNotFoundException(Code)



getHeaders
public Map getHeaders()(Code)



getInputStream
public InputStream getInputStream() throws IOException(Code)



getName
public String getName()(Code)



getRuntimeProperties
public ChannelRuntimeProperties getRuntimeProperties()(Code)
Acquires ChannelRuntimeProperites from the channel. This function may be called by the portal framework throughout the session.
See Also:   ChannelRuntimeProperties



isCacheValid
public boolean isCacheValid(Object validity)(Code)



receiveEvent
public void receiveEvent(PortalEvent ev)(Code)
Process portal events. Currently supported events are EDIT_BUTTON_EVENT, HELP_BUTTON_EVENT, ABOUT_BUTTON_EVENT, and SESSION_DONE. The button events work by changing the xmlUri. The new Uri's content should contain a link that will refer back to the old one at the end of its task.
Parameters:
  ev - the event



renderXML
public void renderXML(ContentHandler out) throws PortalException(Code)
Ask channel to render its content.
Parameters:
  out - the SAX ContentHandler to output content to



reportDownloadError
public void reportDownloadError(Exception e)(Code)



setRuntimeData
public void setRuntimeData(ChannelRuntimeData rd)(Code)
Passes ChannelRuntimeData to the channel. This function is called prior to the renderXML() call.
Parameters:
  rd - channel runtime data
See Also:   ChannelRuntimeData



setStaticData
public void setStaticData(ChannelStaticData sd) throws PortalException(Code)
Passes ChannelStaticData to the channel. This is done during channel instantiation time. see org.jasig.portal.ChannelStaticData
Parameters:
  sd - channel static data
See Also:   ChannelStaticData



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.