|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectfreemarker.ext.misc.Transforms
public final class Transforms
A simple hash model that provides access to all the non-deprecated transform models in this package.
The keys are as follows:
Pipeline transformCompressWhitespace transformFreeMarkerToHtml transformHtmlEscape transformJavaToHtml transformLegacyCompress transformNormalizeNewlines transformPipeline transformRemoveBlankLines transformPerl5Substitute transformPerl5Translate transformXmlEscape transformUsage:
From java:
TemplateModelRoot root = new SimpleHash(); root.put( "transforms", freemarker.ext.misc.Transforms.getInstance() ); ...
From your FM-Classic template:
The following is compressed: <transform transforms.compressWhitespace> <p>This paragraph has all whitespace reduced to a single space character.</p> </transform> ...
Note:
Transforms is a singleton instance. Use the
getInstance() method to retrieve instances of this model.
| Method Summary | |
|---|---|
TemplateModel |
get(java.lang.String key)
Gets a TemplateModel from the hash. |
static Transforms |
getInstance()
Retrieve a singleton instance of this class. |
boolean |
isEmpty()
Is the object empty? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Transforms getInstance()
Transforms class
public boolean isEmpty()
throws TemplateModelException
isEmpty in interface TemplateModelfalse to indicate that this model is non-empty
TemplateModelException
public TemplateModel get(java.lang.String key)
throws TemplateModelException
TemplateModel from the hash.
get in interface TemplateHashModelkey - the name by which the TemplateModel
is identified in the template.
TemplateModel referred to by the key,
or null if not found.
TemplateModelException - there was a problem getting the value
for the given key
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||