|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.x5.template.TemplateSet
com.x5.template.TemplateSetSlice
public class TemplateSetSlice
TemplateSetSlice enables the formation of a TemplateSet from a single file
with multiple subtemplate definitions a la {#optional_part}bla bla bla{#}.
It maps the concept of fetching a template from within a folder of templates
to fetching a subtemplate from within a file of subtemplates.
Copyright: Copyright (c) 2003
Company: X5 Software
Updates: www.dagblastit.com
| Field Summary |
|---|
| Fields inherited from class com.x5.template.TemplateSet |
|---|
BLOCKEND_LONGHAND, BLOCKEND_SHORTHAND, DEFAULT_TAG_END, DEFAULT_TAG_START, INCLUDE_SHORTHAND, PROTOCOL_SHORTHAND |
| Constructor Summary | |
|---|---|
TemplateSetSlice(TemplateSet parent,
java.lang.String templateContext)
|
|
TemplateSetSlice(TemplateSet parent,
java.lang.String templateContext,
java.lang.String ext)
|
|
| Method Summary | |
|---|---|
Snippet |
getSnippet(java.lang.String templateName)
Retrieve as String the template specified by name. |
Chunk |
makeChunk()
Creates a Chunk with no starter template and sets its tag boundary markers to match the other templates in this set. |
Chunk |
makeChunk(java.lang.String templateName)
Creates a Chunk with a starting template. |
| Methods inherited from class com.x5.template.TemplateSet |
|---|
addProtocol, clearCache, convertTags, convertTags, convertToMyTags, fetch, getDefaultExtension, getFilters, getFromCache, getProtocol, getResourcePath, getSnippet, getSubset, getTemplatePath, makeChunk, provides, removeBlockTagIndents, setDirtyInterval, setEncoding, setJarContext, setJarContext, setLayerName, signalFailureWithNull |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TemplateSetSlice(TemplateSet parent,
java.lang.String templateContext)
public TemplateSetSlice(TemplateSet parent,
java.lang.String templateContext,
java.lang.String ext)
| Method Detail |
|---|
public Snippet getSnippet(java.lang.String templateName)
TemplateSetFor example: String myTemplate = templateSet.get("outer_file.inner_template");
will look for {#inner_template}bla bla bla{#} inside the file "outer_file.html" or "outer_file.xml" ie whatever your TemplateSet extension is.
getSnippet in interface ContentSourcegetSnippet in class TemplateSettemplateName - the location of the template definition.
public Chunk makeChunk()
TemplateSet
makeChunk in interface ChunkFactorymakeChunk in class TemplateSetpublic Chunk makeChunk(java.lang.String templateName)
TemplateSet
makeChunk in interface ChunkFactorymakeChunk in class TemplateSettemplateName - the location of the template definition.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||