Java Doc for XMLProvider.java in  » Portal » Open-Portal » com » sun » portal » providers » xml » 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 » Open Portal » com.sun.portal.providers.xml 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.sun.portal.providers.urlscraper.URLScraperProvider
   com.sun.portal.providers.xml.XMLProvider

XMLProvider
public class XMLProvider extends URLScraperProvider (Code)

A XML Provider is used to convert and display the XML file according to the specified style sheet.

XMLProvider is an extension of the existing URLScraperProvider. It uses the URLScraperProvider to fetch the XML contents when the url is of type http://url or https://url and if the url is of type file://// , the XMLProvider manually reads the contents of the specified file .

The XMLProvider can transform generic XML content to specific markups using an XSLT engine. It allows creating multiple markup channels from a single XML source (local or over http/https)

XML Provider requires two arguments to do the transformation.

  • The XML file that needs to the transformed
  • The stylesheet to be used to do the transformation.

The XMLProvider-based channel has the following configurable attributes:

  • url - the XML attribute used to store the path to the XML source
  • xslFileName - the XML attribute used to store the path to the XSL style sheet.

The path to the XML content can be specified as HTTP,HTTPs or file URL. If the path is HTTP or HTTPs the provider uses URLScraper provider to fetch the contents. If the path is a file URL, the provider reads the file into a StringBuffer.

The value for the XSL filename to use for transformation is stored as a value of the string attribute as indicated above. The user can either specify the complete path (including the file name) or can specify just the file name in which case it will be picked from the default directory. While specifying a value for this property there should not be any use of the protocols like "file://" or "http://" or "https://"

If both the XML file and the XSL file are present, the XMLProvider does the transformation using the XSLT engine. The generated contents are displayed in the channel. In order to do the conversion the XMLProvider uses the JAXP1.1 jar files.

NOTE: getEdit() and  processEdit() methods are not implemented in the XMLProvider.


Inner Class :class CacheEntry



Method Summary
public  StringBuffergetContent(HttpServletRequest req, HttpServletResponse res)
    

Gets and displays the XML file contents after converting the xml file according to the specified XSL stylesheet
Parameters:
  req - An HttpServletRequest that contains information relatedto this request for content.
Parameters:
  res - An HttpServletResponse that allows the provider toinfluence the overall response for the desktop page(besides generating the content).

protected  StringgetContentEncodingFromContentBytes(byte[] contentBytes)
    
protected  StringBuffergetXML(HttpServletRequest req, HttpServletResponse res)
    

Gets the XML file as a string buffer.

protected  FilegetXSL(String xslFileName)
    

Gets the XSL file object.




Method Detail
getContent
public StringBuffer getContent(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)

Gets and displays the XML file contents after converting the xml file according to the specified XSL stylesheet
Parameters:
  req - An HttpServletRequest that contains information relatedto this request for content.
Parameters:
  res - An HttpServletResponse that allows the provider toinfluence the overall response for the desktop page(besides generating the content). Transformed XML contents.
exception:
  ProviderException -




getContentEncodingFromContentBytes
protected String getContentEncodingFromContentBytes(byte[] contentBytes)(Code)
Gets the charset from content This method determines the charset from the XML Header
Parameters:
  contentBytes - Bytes from the scraped content String charset or null if charset cannot be determined



getXML
protected StringBuffer getXML(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)

Gets the XML file as a string buffer.

This method calls the getHttpContent in class URLScraperProvider to get the XML file content as a StringBuffer if the XML URL specified is a http or https url.
Parameters:
  req - An HttpServletRequest that contains information relatedto this request for content.
Parameters:
  res - An HttpServletResponse that allows the provider toinfluence the overall response for the desktop page(besides generating the content). the XML file contents as a buffer
exception:
  ProviderException - if the xml URL specified in the storageis not a valid URL.
See Also:   com.sun.portal.providers.urlscraper.URLScraperProvider.getHttpContent




getXSL
protected File getXSL(String xslFileName) throws ProviderException(Code)

Gets the XSL file object.
exception:
  ProviderException - if the xsl url specified in the storageis not a valid url.




Fields inherited from com.sun.portal.providers.urlscraper.URLScraperProvider
protected static String typeTable(Code)(Java Doc)

Methods inherited from com.sun.portal.providers.urlscraper.URLScraperProvider
public StringBuffer getContent(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)
protected boolean getCookiesToForwardAll() throws ProviderException(Code)(Java Doc)
public StringBuffer getEdit(HttpServletRequest req, HttpServletResponse res) throws ProviderException(Code)(Java Doc)
protected File getFile(String pathname)(Code)(Java Doc)
protected StringBuffer getFileAsBuffer(String pathName) throws IOException, ProviderException(Code)(Java Doc)
protected String getFormData() throws ProviderException(Code)(Java Doc)
protected String getHttpAuthPassword() throws ProviderException(Code)(Java Doc)
protected String getHttpAuthUid() throws ProviderException(Code)(Java Doc)
protected StringBuffer getHttpContent(HttpServletRequest req, HttpServletResponse res, String url) throws InterruptedException, MalformedURLException, ProviderException(Code)(Java Doc)
protected StringBuffer getHttpContent(HttpServletRequest req, HttpServletResponse res, String url, boolean ubt) throws InterruptedException, MalformedURLException, ProviderException(Code)(Java Doc)
public String getInputEncoding() throws ProviderException(Code)(Java Doc)
protected String getLoginFormData() throws ProviderException(Code)(Java Doc)
protected String getLoginUrl() throws ProviderException(Code)(Java Doc)
protected String getLogoutUrl() throws ProviderException(Code)(Java Doc)
protected String getRuleSetID() throws ProviderException(Code)(Java Doc)
protected int getTimeout() throws ProviderException(Code)(Java Doc)
protected String getURL() throws ProviderException(Code)(Java Doc)
protected List getcookiesToForwardList() throws ProviderException(Code)(Java Doc)
protected boolean isHttpAuth() throws ProviderException(Code)(Java Doc)
public boolean isPresentable(HttpServletRequest request)(Code)(Java Doc)
public URL processEdit(HttpServletRequest req, HttpServletResponse res) throws ProviderException(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.