|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.webmacro.engine.WMTemplate
org.webmacro.resource.URLTemplate
FileTemplate objects read their template data from a text file.
| Field Summary | |
static java.lang.String |
RCS
CVS revision |
| Fields inherited from class org.webmacro.engine.WMTemplate |
_broker, _content, _log |
| Constructor Summary | |
URLTemplate(Broker broker,
java.net.URL templateURL)
Instantiate a template based on the specified file We use can use the special case or URLs like file:xxxxxx or jar:xxxxxx!yyyyyy extracting the xxxxxx. |
|
| Method Summary | |
protected java.io.Reader |
getReader()
Get the stream the template should be read from. |
java.net.URL |
getURL()
return the URL for the current template. |
void |
parse()
Template API |
boolean |
shouldReload()
URL based templates are difficult to detect as changed in general, but the two special cases for "file:[path]" and "jar:file:[jarpath]![path]" mean we have reference to the actual file |
java.lang.String |
toString()
Return a name for this template. |
| Methods inherited from class org.webmacro.engine.WMTemplate |
accept, evaluate, getDefaultEncoding, getMacros, getName, getParam, getParameters, getParser, setName, setParam, write |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String RCS
| Constructor Detail |
public URLTemplate(Broker broker,
java.net.URL templateURL)
| Method Detail |
public boolean shouldReload()
protected java.io.Reader getReader()
throws java.io.IOException
getReader in class WMTemplatejava.io.IOException - if unable to read templatepublic java.net.URL getURL()
public java.lang.String toString()
toString in class WMTemplate
public void parse()
throws java.io.IOException,
TemplateException
WMTemplate
parse in interface Templateparse in class WMTemplatejava.io.IOException
TemplateException
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||