|
||||||||||
| 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
public abstract class TextTemplate
Represents a text template that can do variable interpolation.
VariableInterpolator,
Serialized Form| Constructor Summary | |
|---|---|
TextTemplate()
Constructor. |
|
TextTemplate(java.lang.String contentType)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
asString()
|
java.lang.String |
asString(java.util.Map<java.lang.String,java.lang.Object> variables)
Interpolates the Map of variables with the content and returns the resulting
String without replacing the content. |
abstract java.lang.String |
getString()
Retrieves the String resource. |
abstract TextTemplate |
interpolate(java.util.Map<java.lang.String,java.lang.Object> variables)
Interpolates values into this TextTemplate. |
| 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 TextTemplate()
public TextTemplate(java.lang.String contentType)
contentType - the mime type of this resource, such as "image/jpeg" or "
text/html"| Method Detail |
|---|
public java.lang.String asString(java.util.Map<java.lang.String,java.lang.Object> variables)
Map of variables with the content and returns the resulting
String without replacing the content. Variables are denoted in this 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").
variables - the variables to interpolate
public java.lang.String asString()
asString in interface IStringResourceStreamasString in class AbstractResourceStreamAbstractResourceStream.asString()public abstract java.lang.String getString()
String resource.
getString in class AbstractStringResourceStreamString resourcepublic abstract TextTemplate interpolate(java.util.Map<java.lang.String,java.lang.Object> variables)
TextTemplate.
variables - variables to interpolate into this TextTemplate
this, for chaining purposes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||