org.clearsilver
Interface CS

All Superinterfaces:
Closeable
All Known Implementing Classes:
DelegatedCs, JniCs

public interface CS
extends Closeable


Method Summary
 void close()
          Clean up CS object state.
 CSFileLoader getFileLoader()
          Get the file loader in use, if any.
 HDF getGlobalHDF()
          Return global hdf in use
 void parseFile(String filename)
          Parses the specified file as if it has template content.
 void parseStr(String content)
          Parse the given string as a CS template.
 String render()
          Generate output from the CS templates and HDF objects that have been read in.
 void setFileLoader(CSFileLoader fileLoader)
          Set the CS file loader to use
 void setGlobalHDF(HDF global)
          Specify a new/different global HDF
 

Method Detail

setGlobalHDF

void setGlobalHDF(HDF global)
Specify a new/different global HDF


getGlobalHDF

HDF getGlobalHDF()
Return global hdf in use


close

void close()
Clean up CS object state.

Specified by:
close in interface Closeable

parseFile

void parseFile(String filename)
               throws IOException
Parses the specified file as if it has template content. The file will be located using the HDF's loadpaths.

Parameters:
filename - the name of file to read in and parse.
Throws:
FileNotFoundException - if the specified file does not exist.
IOException - other problems reading the file.

parseStr

void parseStr(String content)
Parse the given string as a CS template.

Parameters:
content - string to parse.

render

String render()
Generate output from the CS templates and HDF objects that have been read in.

Returns:
the output of the template rendering.

getFileLoader

CSFileLoader getFileLoader()
Get the file loader in use, if any.

Returns:
the file loader in use.

setFileLoader

void setFileLoader(CSFileLoader fileLoader)
Set the CS file loader to use

Parameters:
fileLoader - the file loader that should be used.


Copyright © 2010-2012 Google. All Rights Reserved.