Java Doc for Rewriter.java in  » Portal » jetspeed-2.1.3 » org » apache » jetspeed » rewriter » 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 » jetspeed 2.1.3 » org.apache.jetspeed.rewriter 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.jetspeed.rewriter.Rewriter

All known Subclasses:   org.apache.jetspeed.rewriter.WebContentRewriter,  org.apache.jetspeed.rewriter.BasicRewriter,  org.apache.jetspeed.rewriter.AbstractRewriter,
Rewriter
public interface Rewriter (Code)
Rewriter
author:
   David Sean Taylor
version:
   $Id: Rewriter.java 516448 2007-03-09 16:25:47Z ate $




Method Summary
 voidenterConvertTagEvent(String tag, MutableAttributes attrs)
     Rewriter event called back just before tag conversion (rewriter callbacks) begins by the ParserAdaptor.
 booleanenterEndTagEvent(String tag)
     Rewriter event called back on the leading edge of processing an end tag by the ParserAdaptor. Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag.
 booleanenterSimpleTagEvent(String tag, MutableAttributes attrs)
     Rewriter event called back on the leading edge of processing a simple tag by the ParserAdaptor. Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag.
 booleanenterStartTagEvent(String tag, MutableAttributes attrs)
     Rewriter event called back on the leading edge of processing a start tag by the ParserAdaptor. Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag.
 booleanenterText(char[] values, int param)
     Rewriter event called back when text is found for Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
 StringexitEndTagEvent(String tag)
     Rewriter event called back on the trailing edge of a end tag by the ParserAdaptor. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.
 StringexitSimpleTagEvent(String tag, MutableAttributes attrs)
     Rewriter event called back on the trailing edge of a simple tag by the ParserAdaptor. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.
 StringexitStartTagEvent(String tag, MutableAttributes attrs)
     Rewriter event called back on the trailing edge of a start tag by the ParserAdaptor. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.
 StringgetBaseRelativeUrl(String path)
    
 StringgetBaseUrl()
     Gets the base URL for rewriting.
 booleangetUseProxy()
     Gets whether this rewriter require a proxy server.
 voidparse(ParserAdaptor adaptor, Reader reader)
     Parses the reader of content receiving call backs for rewriter events. This method does not rewrite, but only parses.
 voidrewrite(ParserAdaptor adaptor, Reader reader, Writer writer)
     Parses the reader of content receiving call backs for rewriter events. The content is rewritten to the output stream. The configured parser can parse over different stream formats returning a normalized (org.sax.xml) attribute and element based events.
 StringrewriteUrl(String url, String tag, String attribute)
     This event is the inteface between the Rewriter and ParserAdaptor for rewriting URLs. The ParserAdaptor calls back the Rewriter when it finds a URL that is a candidate to be rewritten.
 voidsetBaseUrl(String base)
     Sets the base URL for rewriting.
 voidsetUseProxy(boolean useProxy)
     Set whether this rewriter require a proxy server.
 booleanshouldRemoveComments()
     Returns true if all comments should be removed.
 booleanshouldRemoveTag(String tag)
     Returns true if the tag should be removed, otherwise false.
 booleanshouldStripTag(String tag)
     Returns true if the tag should be stripped, otherwise false.



Method Detail
enterConvertTagEvent
void enterConvertTagEvent(String tag, MutableAttributes attrs)(Code)
Rewriter event called back just before tag conversion (rewriter callbacks) begins by the ParserAdaptor.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag.



enterEndTagEvent
boolean enterEndTagEvent(String tag)(Code)
Rewriter event called back on the leading edge of processing an end tag by the ParserAdaptor. Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag. Should return true to continue processing the tag in the ParserAdaptor, false to indicate that processing is completed.



enterSimpleTagEvent
boolean enterSimpleTagEvent(String tag, MutableAttributes attrs)(Code)
Rewriter event called back on the leading edge of processing a simple tag by the ParserAdaptor. Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag. Should return true to continue processing the tag in the ParserAdaptor, false to indicate that processing is completed.



enterStartTagEvent
boolean enterStartTagEvent(String tag, MutableAttributes attrs)(Code)
Rewriter event called back on the leading edge of processing a start tag by the ParserAdaptor. Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag. Should return true to continue processing the tag in the ParserAdaptor, false to indicate that processing is completed.



enterText
boolean enterText(char[] values, int param)(Code)
Rewriter event called back when text is found for Returns false to indicate to the ParserAdaptor to short-circuit processing on this tag.
Parameters:
  values - an array of characters containing the text.
Parameters:
  param - Should return true to continue processing the tag in the ParserAdaptor, false to indicate that processing is completed.



exitEndTagEvent
String exitEndTagEvent(String tag)(Code)
Rewriter event called back on the trailing edge of a end tag by the ParserAdaptor. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.



exitSimpleTagEvent
String exitSimpleTagEvent(String tag, MutableAttributes attrs)(Code)
Rewriter event called back on the trailing edge of a simple tag by the ParserAdaptor. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.



exitStartTagEvent
String exitStartTagEvent(String tag, MutableAttributes attrs)(Code)
Rewriter event called back on the trailing edge of a start tag by the ParserAdaptor. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.
Parameters:
  tag - The name of the tag being processed.
Parameters:
  attrs - The attribute list for the tag. Returns a String that can be appended to the rewritten output for the given tag, or null to indicate no content available.



getBaseRelativeUrl
String getBaseRelativeUrl(String path)(Code)
Gets a new URL relative to Base according to the site / and URL rewriting rules of java.net.URL The new URL from path, relative to the base URL (or path, if path is absolute)



getBaseUrl
String getBaseUrl()(Code)
Gets the base URL for rewriting. This URL is the base from which other URLs are generated. The base URL for this rewriter



getUseProxy
boolean getUseProxy()(Code)
Gets whether this rewriter require a proxy server. true if it requires a proxy



parse
void parse(ParserAdaptor adaptor, Reader reader) throws RewriterException(Code)
Parses the reader of content receiving call backs for rewriter events. This method does not rewrite, but only parses. Useful for readonly operations. The configured parser can parse over different stream formats returning a normalized (org.sax.xml) attribute and element based events.
Parameters:
  adaptor - the parser adaptor which handles generating SAX-like events called back on this object.
Parameters:
  reader - the input stream over the content to be parsed.
exception:
  RewriteException - when a parsing error occurs or unexpected content is found.



rewrite
void rewrite(ParserAdaptor adaptor, Reader reader, Writer writer) throws RewriterException(Code)
Parses the reader of content receiving call backs for rewriter events. The content is rewritten to the output stream. The configured parser can parse over different stream formats returning a normalized (org.sax.xml) attribute and element based events.
Parameters:
  adaptor - the parser adaptor which handles generating SAX-like events called back on this object.
Parameters:
  reader - the input stream over the content to be parsed.
Parameters:
  writer - the output stream where content is rewritten to.
exception:
  RewriteException - when a parsing error occurs or unexpected content is found.



rewriteUrl
String rewriteUrl(String url, String tag, String attribute)(Code)
This event is the inteface between the Rewriter and ParserAdaptor for rewriting URLs. The ParserAdaptor calls back the Rewriter when it finds a URL that is a candidate to be rewritten. The Rewriter rewrites the URL and returns it as the result of this function.
Parameters:
  url - the URL to be rewritten
Parameters:
  tag - The tag being processed
Parameters:
  attribute - The current attribute being processsed



setBaseUrl
void setBaseUrl(String base)(Code)
Sets the base URL for rewriting. This URL is the base from which other URLs are generated.
Parameters:
  base - The base URL for this rewriter



setUseProxy
void setUseProxy(boolean useProxy)(Code)
Set whether this rewriter require a proxy server.
Parameters:
  useProxy - true if it requires a proxy



shouldRemoveComments
boolean shouldRemoveComments()(Code)
Returns true if all comments should be removed. true If all comments should be removed.



shouldRemoveTag
boolean shouldRemoveTag(String tag)(Code)
Returns true if the tag should be removed, otherwise false. Removing a tag only removes the tag but not the contents in between the start and end tag. true if the tag should be removed.



shouldStripTag
boolean shouldStripTag(String tag)(Code)
Returns true if the tag should be stripped, otherwise false. Stripping tags removes the start and end tag, plus all tags and content in between the start and end tag. true if the tag should be stripped.



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