|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jetspeed.rewriter.AbstractRewriter
public abstract class AbstractRewriter
AbstractRewriter
| Field Summary | |
|---|---|
protected static org.apache.commons.logging.Log |
log
|
| Constructor Summary | |
|---|---|
AbstractRewriter()
|
|
| Method Summary | |
|---|---|
void |
enterConvertTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter event called back just before tag conversion (rewriter callbacks) begins by the ParserAdaptor. |
boolean |
enterEndTagEvent(java.lang.String tag)
Rewriter event called back on the leading edge of processing an end tag by the ParserAdaptor. |
boolean |
enterSimpleTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter event called back on the leading edge of processing a simple tag by the ParserAdaptor. |
boolean |
enterStartTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter event called back on the leading edge of processing a start tag by the ParserAdaptor. |
boolean |
enterText(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. |
java.lang.String |
exitEndTagEvent(java.lang.String tag)
Rewriter event called back on the trailing edge of a end tag by the ParserAdaptor. |
java.lang.String |
exitSimpleTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter event called back on the trailing edge of a simple tag by the ParserAdaptor. |
java.lang.String |
exitStartTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter event called back on the trailing edge of a start tag by the ParserAdaptor. |
java.lang.String |
getBaseRelativeUrl(java.lang.String relativeUrl)
Gets a new URL relative to Base according to the site / and URL rewriting rules of java.net.URL |
java.lang.String |
getBaseUrl()
Gets the base URL for rewriting. |
boolean |
getUseProxy()
Gets whether this rewriter require a proxy server. |
void |
parse(ParserAdaptor adaptor,
java.io.Reader reader)
Parses the reader of content receiving call backs for rewriter events. |
void |
rewrite(ParserAdaptor adaptor,
java.io.Reader reader,
java.io.Writer writer)
Parses the reader of content receiving call backs for rewriter events. |
abstract java.lang.String |
rewriteUrl(java.lang.String url,
java.lang.String tag,
java.lang.String attribute)
This event is the inteface between the Rewriter and ParserAdaptor for rewriting URLs. |
void |
setBaseUrl(java.lang.String base)
Sets the base URL for rewriting. |
void |
setUseProxy(boolean useProxy)
Set whether this rewriter require a proxy server. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.jetspeed.rewriter.Rewriter |
|---|
shouldRemoveComments, shouldRemoveTag, shouldStripTag |
| Field Detail |
|---|
protected static final org.apache.commons.logging.Log log
| Constructor Detail |
|---|
public AbstractRewriter()
| Method Detail |
|---|
public void parse(ParserAdaptor adaptor,
java.io.Reader reader)
throws RewriterException
Rewriter
parse in interface Rewriteradaptor - the parser adaptor which handles generating SAX-like events called back on this object.reader - the input stream over the content to be parsed.
RewriterException
public void rewrite(ParserAdaptor adaptor,
java.io.Reader reader,
java.io.Writer writer)
throws RewriterException
Rewriter
rewrite in interface Rewriteradaptor - the parser adaptor which handles generating SAX-like events called back on this object.reader - the input stream over the content to be parsed.writer - the output stream where content is rewritten to.
RewriterException
public abstract java.lang.String rewriteUrl(java.lang.String url,
java.lang.String tag,
java.lang.String attribute)
Rewriter
rewriteUrl in interface Rewriterurl - the URL to be rewrittentag - The tag being processedattribute - The current attribute being processsedpublic void setBaseUrl(java.lang.String base)
Rewriter
setBaseUrl in interface Rewriterbase - The base URL for this rewriterpublic java.lang.String getBaseUrl()
Rewriter
getBaseUrl in interface Rewriterpublic java.lang.String getBaseRelativeUrl(java.lang.String relativeUrl)
Rewriter
getBaseRelativeUrl in interface Rewriterpublic boolean getUseProxy()
Rewriter
getUseProxy in interface Rewriterpublic void setUseProxy(boolean useProxy)
Rewriter
setUseProxy in interface RewriteruseProxy - true if it requires a proxy
public boolean enterSimpleTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter
enterSimpleTagEvent in interface Rewritertag - The name of the tag being processed.attrs - The attribute list for the tag.
public java.lang.String exitSimpleTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter
exitSimpleTagEvent in interface Rewritertag - The name of the tag being processed.attrs - The attribute list for the tag.
public boolean enterStartTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter
enterStartTagEvent in interface Rewritertag - The name of the tag being processed.attrs - The attribute list for the tag.
public java.lang.String exitStartTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter
exitStartTagEvent in interface Rewritertag - The name of the tag being processed.attrs - The attribute list for the tag.
public boolean enterEndTagEvent(java.lang.String tag)
Rewriter
enterEndTagEvent in interface Rewritertag - The name of the tag being processed.
public java.lang.String exitEndTagEvent(java.lang.String tag)
Rewriter
exitEndTagEvent in interface Rewritertag - The name of the tag being processed.
public boolean enterText(char[] values,
int param)
Rewriter
enterText in interface Rewritervalues - an array of characters containing the text.
public void enterConvertTagEvent(java.lang.String tag,
MutableAttributes attrs)
Rewriter
enterConvertTagEvent in interface Rewritertag - The name of the tag being processed.attrs - The attribute list for the tag.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||