Modifier and Type | Method and Description |
---|---|
Data |
JSilver.createData()
Create new Data instance, ready to be populated.
|
Data |
DataLoader.createData()
Create new Data instance, ready to be populated.
|
Data |
JSilver.loadData(String dataFileName)
Loads data in Hierarchical Data Format (HDF) into a new Data object.
|
Data |
DataLoader.loadData(String dataFileName)
Loads data in Hierarchical Data Format (HDF) into a new Data object.
|
Modifier and Type | Method and Description |
---|---|
EscapeMode |
JSilver.getEscapeMode(Data data)
Determine the escaping to apply based on Config variables in HDF.
|
void |
JSilver.loadData(String dataFileName,
Data output)
Loads data in Hierarchical Data Format (HDF) into an existing Data object.
|
void |
DataLoader.loadData(String dataFileName,
Data output)
Loads data in Hierarchical Data Format (HDF) into an existing Data object.
|
String |
JSilver.render(String templateName,
Data data)
Same as
TemplateRenderer.render(String, Data, Appendable) , except returns rendered
template as a String. |
String |
TemplateRenderer.render(String templateName,
Data data)
Same as
TemplateRenderer.render(String, Data, Appendable) , except returns rendered template as a
String. |
void |
JSilver.render(String templateName,
Data data,
Appendable output)
Renders a given template and provided data, writing to an arbitrary output.
|
void |
TemplateRenderer.render(String templateName,
Data data,
Appendable output)
Same as
TemplateRenderer.render(String, Data, Appendable, ResourceLoader) , except it uses the default
ResourceLoader passed in to the JSilver constructor. |
void |
JSilver.render(String templateName,
Data data,
Appendable output,
ResourceLoader resourceLoader)
Renders a given template and provided data, writing to an arbitrary output.
|
void |
TemplateRenderer.render(String templateName,
Data data,
Appendable output,
ResourceLoader resourceLoader)
Renders a given template and provided data, writing to an arbitrary output.
|
String |
JSilver.render(Template template,
Data data) |
String |
TemplateRenderer.render(Template template,
Data data)
Same as
TemplateRenderer.render(Template,Data,Appendable) , except returns rendered template as a
String. |
void |
JSilver.render(Template template,
Data data,
Appendable output)
Renders a given template and provided data, writing to an arbitrary output.
|
void |
TemplateRenderer.render(Template template,
Data data,
Appendable output)
Same as
TemplateRenderer.render(Template,Data,Appendable,ResourceLoader) , except it uses the
ResourceLoader passed into the JSilver constructor. |
void |
JSilver.render(Template template,
Data data,
Appendable output,
ResourceLoader resourceLoader)
Renders a given template and provided data, writing to an arbitrary output.
|
void |
TemplateRenderer.render(Template template,
Data data,
Appendable output,
ResourceLoader resourceLoader)
Renders a given template and provided data, writing to an arbitrary output.
|
String |
JSilver.renderFromContent(String content,
Data data)
Same as
JSilver.renderFromContent(String, Data, Appendable) , except returns rendered template
as a String. |
String |
TemplateRenderer.renderFromContent(String content,
Data data)
Same as
TemplateRenderer.renderFromContent(String, Data, Appendable) , except returns rendered template
as a String. |
void |
JSilver.renderFromContent(String content,
Data data,
Appendable output)
Renders a given template from the content passed in.
|
void |
TemplateRenderer.renderFromContent(String content,
Data data,
Appendable output)
Renders a given template from the content passed in.
|
Modifier and Type | Method and Description |
---|---|
String |
ClearsilverRenderer.render(String templateName,
Data data) |
void |
ClearsilverRenderer.render(String templateName,
Data data,
Appendable output) |
void |
ClearsilverRenderer.render(String templateName,
Data data,
Appendable output,
ResourceLoader resourceLoader) |
String |
ClearsilverRenderer.render(Template template,
Data data) |
void |
ClearsilverRenderer.render(Template template,
Data data,
Appendable output) |
void |
ClearsilverRenderer.render(Template template,
Data data,
Appendable output,
ResourceLoader resourceLoader) |
String |
ClearsilverRenderer.renderFromContent(String content,
Data data) |
void |
ClearsilverRenderer.renderFromContent(String content,
Data data,
Appendable output) |
Modifier and Type | Method and Description |
---|---|
Iterable<? extends Data> |
BaseCompiledTemplate.getChildren(Data parent)
Returns child nodes of parent.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
BaseCompiledTemplate.asBoolean(Data data) |
static int |
BaseCompiledTemplate.asInt(Data data) |
static String |
BaseCompiledTemplate.asString(Data data) |
RenderingContext |
BaseCompiledTemplate.createRenderingContext(Data data,
Appendable out,
ResourceLoader resourceLoader) |
RenderingContext |
BaseCompiledTemplate.CompiledMacro.createRenderingContext(Data data,
Appendable out,
ResourceLoader resourceLoader) |
static boolean |
BaseCompiledTemplate.exists(Data data) |
Iterable<? extends Data> |
BaseCompiledTemplate.getChildren(Data parent)
Returns child nodes of parent.
|
static String |
BaseCompiledTemplate.getNodeName(Data data)
Gets the name of the node for writing.
|
void |
BaseCompiledTemplate.render(Data data,
Appendable out,
ResourceLoader resourceLoader) |
void |
BaseCompiledTemplate.CompiledMacro.render(Data data,
Appendable out,
ResourceLoader resourceLoader) |
Modifier and Type | Class and Description |
---|---|
class |
AbstractData
This class is meant to hold implementation common to different instances of Data interface.
|
class |
ChainedData
Implementation of Data that allows for multiple underlying Data objects and checks each one in
order for a value before giving up.
|
class |
DefaultData
Default implementation of Data.
|
class |
DelegatedData
Class that wraps a Data object and exports the same interface.
|
class |
LocalAndGlobalData
This is a special implementation of ChainedData to be used for holding the local and global Data
objects (like local and global HDFs in Clearsilver).
|
class |
NestedMapData
Represents a hierarchical data set of primitives.
|
class |
UnmodifiableData
Data wrapper that prevents modifying the delegated Data node or its tree.
|
Modifier and Type | Method and Description |
---|---|
Data |
LocalAndGlobalData.createChild(String path) |
Data |
UnmodifiableData.createChild(String path)
UnmodifiableData.createChild(java.lang.String) calls DelegatedData.getChild(java.lang.String) and throws UnsupportedOperationException
if no object was found. |
Data |
ChainedData.createChild(String path) |
Data |
DelegatedData.createChild(String path) |
Data |
Data.createChild(String path)
Retrieves the HDF object that is the root of the subtree at hdfpath, create the subtree if it
doesn't exist
|
Data |
HDFDataFactory.createData() |
Data |
DataFactory.createData()
Create new Data instance, ready to be populated.
|
Data |
DefaultDataContext.findVariable(String name,
boolean create) |
Data |
DataContext.findVariable(String name,
boolean create)
Searches the variable map stack for the specified variable name.
|
Data |
ChainedData.getChild(String path) |
Data |
DelegatedData.getChild(String path) |
Data |
Data.getChild(String path)
Retrieves the object that is the root of the subtree at hdfpath, returning null if the subtree
doesn't exist
|
protected Data |
DelegatedData.getDelegate() |
Data |
NestedMapData.getNextSibling() |
Data |
DelegatedData.getNextSibling() |
Data |
Data.getNextSibling()
Retrieves the node representing the next sibling of this Data node, if any.
|
Data |
NestedMapData.getParent()
Get the parent node.
|
Data |
DelegatedData.getParent() |
Data |
Data.getParent()
Get the parent node.
|
Data |
NestedMapData.getRoot()
Return the root of the tree where the current node lies.
|
Data |
DelegatedData.getRoot() |
Data |
Data.getRoot()
Return the root of the tree where the current node lies.
|
Data |
DefaultDataContext.getRootData() |
Data |
DataContext.getRootData()
Returns the main Data object this RenderingContext was defined with.
|
Data |
NestedMapData.getSymlink()
Retrieve the symbolic link this node points to.
|
Data |
DelegatedData.getSymlink() |
Data |
Data.getSymlink()
Retrieve the symbolic link this node points to.
|
Data |
HDFDataFactory.loadData(String dataFileName,
ResourceLoader resourceLoader) |
Data |
DataFactory.loadData(String dataFileName,
ResourceLoader resourceLoader)
Loads data in Hierarchical Data Format (HDF) into a new Data object.
|
protected static Data |
DelegatedData.unwrap(Data data) |
Modifier and Type | Method and Description |
---|---|
Iterable<? extends Data> |
NestedMapData.getChildren()
Returns children of this node.
|
Iterable<? extends Data> |
DelegatedData.getChildren() |
Iterable<? extends Data> |
Data.getChildren()
Returns children of this node.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
TypeConverter.asBoolean(Data data)
Helper method to safely convert an arbitrary data instance (including null) into a valid
boolean representation.
|
static int |
TypeConverter.asNumber(Data data)
Helper method to safely convert an arbitrary data instance (including null) into a valid
integer representation.
|
static String |
TypeConverter.asString(Data data)
Helper method to safely convert an arbitrary data instance (including null) into a valid
(non-null) string representation.
|
void |
NestedMapData.copy(Data from) |
void |
UnmodifiableData.copy(Data from) |
void |
DelegatedData.copy(Data from) |
void |
Data.copy(Data from)
Does a deep copy the attributes and values from one node to another
|
void |
NestedMapData.copy(String toPath,
Data from) |
void |
UnmodifiableData.copy(String toPath,
Data from) |
void |
DelegatedData.copy(String toPath,
Data from) |
void |
Data.copy(String toPath,
Data from)
Does a deep copy of the attributes and values from one node to another.
|
static boolean |
TypeConverter.exists(Data data)
Determines if the given data node exists in a ClearSilver compatible way.
|
void |
HDFDataFactory.loadData(String dataFileName,
ResourceLoader resourceLoader,
Data output) |
void |
DataFactory.loadData(String dataFileName,
ResourceLoader resourceLoader,
Data output)
Loads data in Hierarchical Data Format (HDF) into an existing Data object.
|
protected DelegatedData |
UnmodifiableData.newInstance(Data newDelegate) |
protected DelegatedData |
ChainedData.newInstance(Data newDelegate) |
protected DelegatedData |
DelegatedData.newInstance(Data newDelegate)
Subclasses will want to override this method to return a Data object of their specific type.
|
void |
Parser.parse(Reader reader,
Data output,
Parser.ErrorHandler errorHandler,
ResourceLoader resourceLoader,
String dataFileName,
boolean ignoreAttributes)
Reads in a stream of characters and parses data from it, putting it into the given Data object.
|
void |
DefaultHdfParser.parse(Reader reader,
Data output,
Parser.ErrorHandler errorHandler,
ResourceLoader resourceLoader,
String dataFileName,
boolean ignoreAttributes) |
void |
NewHdfParser.parse(Reader reader,
Data output,
Parser.ErrorHandler errorHandler,
ResourceLoader resourceLoader,
String dataFileName,
boolean ignoreAttributes) |
void |
NestedMapData.setSymlink(Data symLink)
Set this node to be a symbolic link to another node.
|
void |
UnmodifiableData.setSymlink(Data symLink) |
void |
DelegatedData.setSymlink(Data symLink) |
void |
Data.setSymlink(Data symLink)
Set this node to be a symbolic link to another node.
|
void |
NestedMapData.setSymlink(String sourcePath,
Data destination)
Set the source node to be a symbolic link to the destination.
|
void |
UnmodifiableData.setSymlink(String sourcePath,
Data destination) |
void |
DelegatedData.setSymlink(String sourcePath,
Data destination) |
void |
Data.setSymlink(String sourcePath,
Data destination)
Set the source node to be a symbolic link to the destination.
|
protected static Data |
DelegatedData.unwrap(Data data) |
Constructor and Description |
---|
ChainedData(Data... dataList) |
ChainedData(Data data)
Optmization for case of single item.
|
DefaultDataContext(Data data) |
DelegatedData(Data delegate) |
LocalAndGlobalData(Data local,
Data global)
Creates a Data object that encapsulates both request-scoped local HDF and an application
global-scoped HDF that can be read from the template renderer.
|
LocalAndGlobalData(Data local,
Data global,
boolean allowGlobalDataModification)
Creates a Data object that encapsulates both request-scoped local HDF and an application
global-scoped HDF that can be read from the template renderer.
|
UnmodifiableData(Data delegate) |
Constructor and Description |
---|
ChainedData(List<Data> dataList) |
Modifier and Type | Method and Description |
---|---|
RenderingContext |
InterpretedTemplate.createRenderingContext(Data data,
Appendable out,
ResourceLoader resourceLoader) |
RenderingContext |
InterpretedMacro.createRenderingContext(Data data,
Appendable out,
ResourceLoader resourceLoader) |
void |
InterpretedTemplate.render(Data data,
Appendable out,
ResourceLoader resourceLoader) |
void |
InterpretedMacro.render(Data data,
Appendable out,
ResourceLoader resourceLoader) |
Modifier and Type | Method and Description |
---|---|
RenderingContext |
Template.createRenderingContext(Data data,
Appendable out,
ResourceLoader resourceLoader)
Create a new RenderingContext.
|
void |
Template.render(Data data,
Appendable out,
ResourceLoader resourceLoader)
Render the template.
|
Modifier and Type | Method and Description |
---|---|
Data |
VariableValue.getReference() |
Copyright © 2010–2018 Google. All rights reserved.