Java Doc for ProxyTransformer.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » portal » transformation » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.portal.transformation 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.cocoon.transformation.AbstractTransformer
   org.apache.cocoon.portal.transformation.ProxyTransformer

ProxyTransformer
public class ProxyTransformer extends AbstractTransformer implements Serviceable,Disposable,Parameterizable(Code)
This transformer is used to insert the XHTML data from an request to an external application at the specified element ("envelope-tag" parameter). Nesessary connection data for the external request like sessionid, cookies, documentbase, the uri, etc. will be taken from the application coplet instance data.
author:
   Friedrich Klenner
author:
   Gernot Koller
version:
   CVS $Id: ProxyTransformer.java 433543 2006-08-22 06:22:54Z crossley $


Field Summary
final public static  StringCOOKIE
    
final public static  StringCOPLETID
    
final public static  StringCOPLET_ID_PARAM
    
final public static  StringDOCUMENT_BASE
    
final public static  StringENVELOPE_TAG_PARAMETER
    
final public static  StringLINK
    
final public static  StringPORTALNAME
    
final public static  StringPORTAL_NAME_PARAM
    
final public static  StringPROTOCOL_HANDLER_PARAMETER
    
final public static  StringPROXY_PREFIX
    
final public static  StringSESSIONTOKEN
    
final public static  StringSTART_URI
    
protected  intconfiguredEncoding
    
protected  CopletInstanceDatacopletInstanceData
    
protected  StringdefaultEnvelopeTag
    
protected  StringdocumentBase
    
protected  StringenvelopeTag
    
protected  InputModuleHelperimHelper
     Helper for resolving input modules.
protected  Stringlink
    
protected  ServiceManagermanager
    
protected  Parametersparameters
    
protected  Requestrequest
    
protected  StringuserAgent
    


Method Summary
protected  booleanappendParameter(StringBuffer buffer, boolean firstparameter, boolean post, String name, String value)
    
protected  StringcheckForRedirect(HttpURLConnection connection, String documentBase)
     Check the http status code of the http response to detect any redirects.
protected  StringcheckForRedirect(Document doc, String documentBase)
     Analyses the XHTML response document for redirects in <meta http-equiv="refresh"> elements.
protected  HttpURLConnectionconnect(Request request, String uri, String query, boolean post)
     Establish the HttpURLConnection to the given uri.
public  voiddispose()
    
public static  CopletInstanceDatagetInstanceData(ServiceManager manager, String copletID, String portalName)
    
public static  CopletInstanceDatagetInstanceData(ServiceManager manager, Map objectModel, Parameters parameters)
     Method getInstanceData.
public  voidparameterize(Parameters parameters)
     For the proxy transformer the envelope-tag parameter can be specified.
protected  voidprocessRequest()
    
protected  DocumentreadXML(HttpURLConnection connection)
    
public  voidrecycle()
    
public static  StringresolveURI(String uri, String documentBase)
     Resolve the possibly relative uri to an absolue uri based on given document base.
Parameters:
  uri - the uri to resolve
Parameters:
  documentBase - the current document base returns an absolute URI based on document base (e.g.
public  voidservice(ServiceManager manager)
    
public  voidsetup(SourceResolver resolver, Map objectModel, String src, Parameters parameters)
    
public  voidstartElement(String uri, String name, String raw, Attributes attributes)
    

Field Detail
COOKIE
final public static String COOKIE(Code)



COPLETID
final public static String COPLETID(Code)



COPLET_ID_PARAM
final public static String COPLET_ID_PARAM(Code)



DOCUMENT_BASE
final public static String DOCUMENT_BASE(Code)



ENVELOPE_TAG_PARAMETER
final public static String ENVELOPE_TAG_PARAMETER(Code)
Parameter for specifying the envelope tag



LINK
final public static String LINK(Code)



PORTALNAME
final public static String PORTALNAME(Code)



PORTAL_NAME_PARAM
final public static String PORTAL_NAME_PARAM(Code)



PROTOCOL_HANDLER_PARAMETER
final public static String PROTOCOL_HANDLER_PARAMETER(Code)
Parameter for specifying the java protocol handler (used for https)



PROXY_PREFIX
final public static String PROXY_PREFIX(Code)



SESSIONTOKEN
final public static String SESSIONTOKEN(Code)



START_URI
final public static String START_URI(Code)



configuredEncoding
protected int configuredEncoding(Code)
The encoding (JTidy constant) if configured



copletInstanceData
protected CopletInstanceData copletInstanceData(Code)
The coplet instance data



defaultEnvelopeTag
protected String defaultEnvelopeTag(Code)
The default value for the envelope Tag



documentBase
protected String documentBase(Code)
The document base uri



envelopeTag
protected String envelopeTag(Code)
This tag will include the external XHMTL



imHelper
protected InputModuleHelper imHelper(Code)
Helper for resolving input modules.



link
protected String link(Code)
The current link to the external application



manager
protected ServiceManager manager(Code)
The Avalon component manager



parameters
protected Parameters parameters(Code)
The sitemap parameters



request
protected Request request(Code)
The original request to the portal



userAgent
protected String userAgent(Code)
The user agent identification string if confiugured





Method Detail
appendParameter
protected boolean appendParameter(StringBuffer buffer, boolean firstparameter, boolean post, String name, String value) throws UnsupportedEncodingException(Code)



checkForRedirect
protected String checkForRedirect(HttpURLConnection connection, String documentBase) throws IOException(Code)
Check the http status code of the http response to detect any redirects.
Parameters:
  connection - The HttpURLConnection
Parameters:
  documentBase - The current documentBase (needed for relative redirects) the redirected URL or null if no redirects are detected.
throws:
  IOException - if exceptions occure while analysing the response



checkForRedirect
protected String checkForRedirect(Document doc, String documentBase) throws MalformedURLException(Code)
Analyses the XHTML response document for redirects in <meta http-equiv="refresh"> elements.
Parameters:
  doc - The W3C DOM document containing the XHTML response
Parameters:
  documentBase - The current document base (needed for relative redirects) String the redirected URL or null if no redirects are detected.
throws:
  MalformedURLException - if the redirect uri is malformed.



connect
protected HttpURLConnection connect(Request request, String uri, String query, boolean post) throws IOException(Code)
Establish the HttpURLConnection to the given uri. User-Agent, Accept-Language and Encoding headers will be copied from the original request, if no other headers are specified.
Parameters:
  request - the original request
Parameters:
  uri - the remote uri
Parameters:
  query - the remote query string
Parameters:
  post - true if request method was POST the established HttpURLConnection
throws:
  IOException - on any exception



dispose
public void dispose()(Code)

See Also:   org.apache.avalon.framework.activity.Disposable.dispose



getInstanceData
public static CopletInstanceData getInstanceData(ServiceManager manager, String copletID, String portalName) throws ProcessingException(Code)



getInstanceData
public static CopletInstanceData getInstanceData(ServiceManager manager, Map objectModel, Parameters parameters) throws ProcessingException(Code)
Method getInstanceData.
Parameters:
  manager -
Parameters:
  objectModel -
Parameters:
  parameters - CopletInstanceData
throws:
  ProcessingException -



parameterize
public void parameterize(Parameters parameters)(Code)
For the proxy transformer the envelope-tag parameter can be specified.
See Also:   org.apache.avalon.framework.parameters.Parameterizable.parameterize(Parameters)



processRequest
protected void processRequest() throws SAXException(Code)
Processes the request to the external application



readXML
protected Document readXML(HttpURLConnection connection) throws SAXException(Code)
Reads the HTML document from given connection and returns a correct W3C DOM XHTML document
Parameters:
  connection - hte HttpURLConnection to read from the result as valid W3C DOM XHTML document



recycle
public void recycle()(Code)

See Also:   org.apache.avalon.excalibur.pool.Recyclable.recycle



resolveURI
public static String resolveURI(String uri, String documentBase) throws MalformedURLException(Code)
Resolve the possibly relative uri to an absolue uri based on given document base.
Parameters:
  uri - the uri to resolve
Parameters:
  documentBase - the current document base returns an absolute URI based on document base (e.g. http://mydomain.com/some/file.html)
throws:
  MalformedURLException - if uri or document base is malformed.



service
public void service(ServiceManager manager) throws ServiceException(Code)

See Also:   org.apache.avalon.framework.service.Serviceable.service(org.apache.avalon.framework.service.ServiceManager)



setup
public void setup(SourceResolver resolver, Map objectModel, String src, Parameters parameters) throws ProcessingException, SAXException, IOException(Code)

See Also:   org.apache.cocoon.sitemap.SitemapModelComponent.setup(SourceResolverMapStringParameters)



startElement
public void startElement(String uri, String name, String raw, Attributes attributes) throws SAXException(Code)

See Also:   org.xml.sax.ContentHandler.startElement(StringStringStringAttributes)




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.