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() |
interpolate
getCharset, length
getStyle, getVariation, setStyle, setVariation
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getStyle, getVariation, setStyle, setVariation
protected final TextTemplate decorated
TextTemplate
.public TextTemplateDecorator(TextTemplate textTemplate)
textTemplate
- a TextTemplate
to decoratepublic String asString()
String
.asString
in interface IStringResourceStream
asString
in class TextTemplate
getBeforeTemplateContents()
and
getAfterTemplateContents()
TextTemplate.asString()
public String asString(Map<String,?> variables)
String
.asString
in class TextTemplate
variables
- 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 Closeable
close
in interface AutoCloseable
close
in interface IResourceStream
close
in class AbstractStringResourceStream
IOException
AbstractStringResourceStream.close()
public boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public String getContentType()
getContentType
in interface IResourceStream
getContentType
in class AbstractStringResourceStream
AbstractStringResourceStream.getContentType()
public InputStream getInputStream() throws ResourceStreamNotFoundException
getInputStream
in interface IResourceStream
getInputStream
in class AbstractStringResourceStream
ResourceStreamNotFoundException
AbstractStringResourceStream.getInputStream()
public Locale getLocale()
getLocale
in interface IResourceStream
getLocale
in class AbstractResourceStream
AbstractResourceStream.getLocale()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public Time lastModifiedTime()
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractStringResourceStream
AbstractStringResourceStream.lastModifiedTime()
public void setCharset(Charset charset)
setCharset
in interface IStringResourceStream
setCharset
in class AbstractStringResourceStream
org.apache.wicket.util.resource.AbstractResourceStream#setCharset(java.nio.charset.Charset)
public void setLastModified(Time lastModified)
setLastModified
in class AbstractStringResourceStream
AbstractStringResourceStream.setLastModified(org.apache.wicket.util.time.Time)
public void setLocale(Locale locale)
setLocale
in interface IResourceStream
setLocale
in class AbstractResourceStream
AbstractResourceStream.setLocale(java.util.Locale)
public String getString()
TextTemplate
String
resource.getString
in class TextTemplate
String
resourceTextTemplate.getString()
public String toString()
toString
in class Object
Object.toString()
Copyright © 2006–2020 Apache Software Foundation. All rights reserved.