public class CMSTemplate extends CMSFile
| Modifier and Type | Field and Description |
|---|---|
static org.slf4j.Logger |
logger |
java.lang.String |
mPostOutput |
java.lang.String |
mPreOutput |
static java.lang.String |
SUFFIX |
static java.lang.String |
TEMPLATE_TAG |
mAbsPath, mContent, mLastAccess, mLastModified| Constructor and Description |
|---|
CMSTemplate(java.io.File file,
java.lang.String charset)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
escapeJavaScriptString(java.lang.String v)
Escape the contents of src string in preparation to be enclosed in
double quotes as a JavaScript String Literal within an <script>
portion of an HTML document.
|
static java.lang.String |
escapeJavaScriptStringHTML(java.lang.String v)
Like escapeJavaScriptString(String s) but also escape '[' for
HTML processing.
|
java.lang.String |
getOutput(CMSTemplateParams input)
for debugging, return contents that would've been outputed.
|
java.lang.String |
getTemplateName() |
boolean |
init(java.io.File template) |
boolean |
outputEpilog(java.io.PrintWriter out)
Output the post HTML tags and post-output
buffer.
|
boolean |
outputProlog(java.io.PrintWriter out)
Ouput the pre-amble HTML Header including
the pre-output buffer.
|
void |
renderOutput(java.io.OutputStream rout,
CMSTemplateParams input)
Write a javascript representation of 'input'
surrounded by SCRIPT tags to the outputstream
|
getAbsPath, getContent, getLastAccess, getLastModified, setLastAccess, toString, toStringpublic static org.slf4j.Logger logger
public static final java.lang.String SUFFIX
public java.lang.String mPreOutput
public java.lang.String mPostOutput
public static final java.lang.String TEMPLATE_TAG
public CMSTemplate(java.io.File file,
java.lang.String charset)
throws java.io.IOException,
EBaseException
file - template file to loadcharset - character setjava.io.IOException - if the there was an error opening the fileEBaseExceptionpublic boolean init(java.io.File template)
throws EBaseException,
java.io.IOException
EBaseExceptionjava.io.IOExceptionpublic void renderOutput(java.io.OutputStream rout,
CMSTemplateParams input)
throws java.io.IOException
rout - the outputstream to write toinput - the parameters to writejava.io.IOExceptionpublic boolean outputProlog(java.io.PrintWriter out)
out - output stream specifiedpublic boolean outputEpilog(java.io.PrintWriter out)
out - output stream specifiedpublic java.lang.String getTemplateName()
public static java.lang.String escapeJavaScriptString(java.lang.String v)
public static java.lang.String escapeJavaScriptStringHTML(java.lang.String v)
public java.lang.String getOutput(CMSTemplateParams input) throws java.io.IOException
java.io.IOException