|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.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 FormConstructor Summary | |
---|---|
TextTemplate()
Constructor. |
|
TextTemplate(java.lang.String contentType)
Constructor. |
Method Summary | |
---|---|
java.lang.String |
asString()
|
java.lang.String |
asString(java.util.Map 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 variables)
Interpolates values into this TextTemplate . |
Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream |
---|
close, getContentType, getInputStream, lastModifiedTime, setLastModified |
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
---|
getCharset, getLocale, length, 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 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 IStringResourceStream
asString
in class AbstractResourceStream
AbstractResourceStream.asString()
public abstract java.lang.String getString()
String
resource.
getString
in class AbstractStringResourceStream
String
resourcepublic abstract TextTemplate interpolate(java.util.Map 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 |