|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.util.resource.AbstractResourceStream
org.apache.wicket.util.resource.AbstractStringResourceStream
org.apache.wicket.util.template.TextTemplate
org.apache.wicket.util.template.PackagedTextTemplate
public class PackagedTextTemplate
A String resource that can be appended to.
| Constructor Summary | |
|---|---|
PackagedTextTemplate(java.lang.Class<?> clazz,
java.lang.String fileName)
Constructor. |
|
PackagedTextTemplate(java.lang.Class<?> clazz,
java.lang.String fileName,
java.lang.String contentType)
Constructor. |
|
PackagedTextTemplate(java.lang.Class<?> clazz,
java.lang.String fileName,
java.lang.String contentType,
java.lang.String encoding)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
getString()
Retrieves the String resource. |
TextTemplate |
interpolate(java.util.Map<java.lang.String,java.lang.Object> variables)
Interpolates a Map of variables with the content and replaces the content with
the result. |
| Methods inherited from class org.apache.wicket.util.template.TextTemplate |
|---|
asString, asString |
| Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream |
|---|
close, getContentType, getInputStream, lastModifiedTime, length, setLastModified |
| Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
|---|
getCharset, getLocale, setCharset, setLocale |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PackagedTextTemplate(java.lang.Class<?> clazz,
java.lang.String fileName)
clazz - the Class to be used for retrieving the classloader for loading the
PackagedTextTemplatefileName - the name of the file, relative to the clazz position
public PackagedTextTemplate(java.lang.Class<?> clazz,
java.lang.String fileName,
java.lang.String contentType)
clazz - the Class to be used for retrieving the classloader for loading the
PackagedTextTemplatefileName - the name of the file, relative to the clazz positioncontentType - the mime type of this resource, such as "image/jpeg" or "
text/html"
public PackagedTextTemplate(java.lang.Class<?> clazz,
java.lang.String fileName,
java.lang.String contentType,
java.lang.String encoding)
clazz - the Class to be used for retrieving the classloader for loading the
PackagedTextTemplatefileName - the name of the file, relative to the clazz positioncontentType - the mime type of this resource, such as "image/jpeg" or "
text/html"encoding - the file's encoding, for example, "UTF-8"| Method Detail |
|---|
public java.lang.String getString()
TextTemplateString resource.
getString in class TextTemplateString resourceAbstractStringResourceStream.getString()public final TextTemplate interpolate(java.util.Map<java.lang.String,java.lang.Object> variables)
Map of variables with the content and replaces the content with
the result. Variables are denoted in the String by the
syntax ${variableName}. The contents will be altered by replacing each variable
of the form ${variableName} with the value returned by
variables.getValue("variableName").
WARNING: there is no going back to the original contents after the interpolation is done. If
you need to do different interpolations on the same original contents, use the method
TextTemplate.asString(Map) instead.
interpolate in class TextTemplatevariables - a Map of variables to interpolate
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||