public abstract class TextTemplateDecorator extends TextTemplate
| Modifier and Type | Field and Description |
|---|---|
protected TextTemplate |
decorated
The decorated
TextTemplate. |
DEFAULT_CONTENT_TYPE| Constructor and Description |
|---|
TextTemplateDecorator(TextTemplate textTemplate)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
String |
asString()
Returns the decorated contents as a
String. |
String |
asString(Map<String,?> variables)
Returns the decorated contents as a
String. |
void |
close() |
boolean |
equals(Object obj) |
abstract String |
getAfterTemplateContents()
Retrieves the
String to put after the actual template contents, for example: |
abstract String |
getBeforeTemplateContents()
Retrieves the
String to put before the actual template contents, for example: |
String |
getContentType() |
InputStream |
getInputStream() |
Locale |
getLocale() |
String |
getString()
Retrieves the
String resource. |
int |
hashCode() |
Time |
lastModifiedTime() |
void |
setCharset(Charset charset) |
void |
setLastModified(Time lastModified) |
void |
setLocale(Locale locale) |
String |
toString() |
interpolategetCharset, lengthgetStyle, getVariation, setStyle, setVariationclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetStyle, getVariation, setStyle, setVariationprotected final TextTemplate decorated
TextTemplate.public TextTemplateDecorator(TextTemplate textTemplate)
textTemplate - a TextTemplate to decoratepublic String asString()
String.asString in interface IStringResourceStreamasString in class TextTemplategetBeforeTemplateContents() and
getAfterTemplateContents()TextTemplate.asString()public String asString(Map<String,?> variables)
String.asString in class TextTemplatevariables - the variables to interpolategetBeforeTemplateContents() and
getAfterTemplateContents().TextTemplate.asString(java.util.Map)public abstract String getBeforeTemplateContents()
String to put before the actual template contents, for example:
<script type="text/javascript">
String to put before the actual template contentspublic abstract String getAfterTemplateContents()
String to put after the actual template contents, for example:
</script>
String to put after the actual template contentspublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in interface IResourceStreamclose in class AbstractStringResourceStreamIOExceptionAbstractStringResourceStream.close()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String getContentType()
getContentType in interface IResourceStreamgetContentType in class AbstractStringResourceStreamAbstractStringResourceStream.getContentType()public InputStream getInputStream() throws ResourceStreamNotFoundException
getInputStream in interface IResourceStreamgetInputStream in class AbstractStringResourceStreamResourceStreamNotFoundExceptionAbstractStringResourceStream.getInputStream()public Locale getLocale()
getLocale in interface IResourceStreamgetLocale in class AbstractResourceStreamAbstractResourceStream.getLocale()public int hashCode()
hashCode in class ObjectObject.hashCode()public Time lastModifiedTime()
lastModifiedTime in interface IModifiablelastModifiedTime in class AbstractStringResourceStreamAbstractStringResourceStream.lastModifiedTime()public void setCharset(Charset charset)
setCharset in interface IStringResourceStreamsetCharset in class AbstractStringResourceStreamorg.apache.wicket.util.resource.AbstractResourceStream#setCharset(java.nio.charset.Charset)public void setLastModified(Time lastModified)
setLastModified in class AbstractStringResourceStreamAbstractStringResourceStream.setLastModified(org.apache.wicket.util.time.Time)public void setLocale(Locale locale)
setLocale in interface IResourceStreamsetLocale in class AbstractResourceStreamAbstractResourceStream.setLocale(java.util.Locale)public String getString()
TextTemplateString resource.getString in class TextTemplateString resourceTextTemplate.getString()public String toString()
toString in class ObjectObject.toString()Copyright © 2006–2021 Apache Software Foundation. All rights reserved.