public final class CssTemplate extends TextTemplateDecorator
TextTemplate
with CSS tags.decorated
DEFAULT_CONTENT_TYPE
Constructor and Description |
---|
CssTemplate(TextTemplate textTemplate)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getAfterTemplateContents()
Retrieves the
String to put after the actual template contents, for example: |
String |
getBeforeTemplateContents()
Retrieves the
String to put before the actual template contents, for example: |
String |
getString()
Retrieves the
String resource. |
TextTemplate |
interpolate(Map<String,?> variables)
This class decorates another
TextTemplate class and so does not allow
interpolation. |
asString, asString, close, equals, getContentType, getInputStream, getLocale, hashCode, lastModifiedTime, setCharset, setLastModified, setLocale, toString
getCharset, length
getStyle, getVariation, setStyle, setVariation
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getStyle, getVariation, setStyle, setVariation
public CssTemplate(TextTemplate textTemplate)
textTemplate
- a TextTemplate
to decoratepublic String getBeforeTemplateContents()
TextTemplateDecorator
String
to put before the actual template contents, for example:
<script type="text/javascript">
getBeforeTemplateContents
in class TextTemplateDecorator
String
to put before the actual template contentsTextTemplateDecorator.getBeforeTemplateContents()
public String getAfterTemplateContents()
TextTemplateDecorator
String
to put after the actual template contents, for example:
</script>
getAfterTemplateContents
in class TextTemplateDecorator
String
to put after the actual template contentsTextTemplateDecorator.getAfterTemplateContents()
public TextTemplate interpolate(Map<String,?> variables)
TextTemplate
class and so does not allow
interpolation.interpolate
in class TextTemplate
variables
- ignoredthis
, for chaining purposespublic String getString()
TextTemplate
String
resource.getString
in class TextTemplateDecorator
String
resourceTextTemplate.getString()
Copyright © 2006–2022 Apache Software Foundation. All rights reserved.