|
||||||||||
| 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
org.apache.wicket.util.template.TextTemplateDecorator
public abstract class TextTemplateDecorator
Provides the ability to 'decorate' the actual template contents before it is contributed to the header. For example, to embed it inside a JavaScript tag pair.
| Field Summary | |
|---|---|
protected TextTemplate |
decorated
The decorated TextTemplate. |
| Fields inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream |
|---|
DEFAULT_CONTENT_TYPE |
| Constructor Summary | |
|---|---|
TextTemplateDecorator(TextTemplate textTemplate)
Constructor. |
|
| Method Summary | |
|---|---|
String |
asString()
Returns the decorated contents as a String. |
String |
asString(Map<String,?> variables)
Returns the decorated contents as a String. |
void |
close()
Closes the resource. |
boolean |
equals(Object obj)
|
abstract String |
getAfterTemplateContents()
Retrieves the String to put after the actual template contents, for example:
</script>
|
abstract String |
getBeforeTemplateContents()
Retrieves the String to put before the actual template contents, for example:
<script type="text/javascript">
|
String |
getContentType()
Gets the mime type of this resource |
InputStream |
getInputStream()
Gets the resource stream. |
Locale |
getLocale()
|
String |
getString()
Retrieves the String resource. |
int |
hashCode()
|
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed. |
void |
setCharset(Charset charset)
Sets the character set used for reading this resource. |
void |
setLastModified(Time lastModified)
|
void |
setLocale(Locale locale)
This method shouldn't be used from the outside. |
String |
toString()
|
| Methods inherited from class org.apache.wicket.util.template.TextTemplate |
|---|
interpolate |
| Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream |
|---|
getCharset, length |
| Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
|---|
getStyle, getVariation, setStyle, setVariation |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.wicket.util.resource.IResourceStream |
|---|
getStyle, getVariation, setStyle, setVariation |
| Field Detail |
|---|
protected final TextTemplate decorated
TextTemplate.
| Constructor Detail |
|---|
public TextTemplateDecorator(TextTemplate textTemplate)
textTemplate - a TextTemplate to decorate| Method Detail |
|---|
public 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 interpolate
getBeforeTemplateContents() 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 contents
public void close()
throws IOException
IResourceStream
close in interface Closeableclose in interface IResourceStreamclose in class AbstractStringResourceStreamIOExceptionAbstractStringResourceStream.close()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public String getContentType()
IResourceStream
getContentType in interface IResourceStreamgetContentType in class AbstractStringResourceStreamAbstractStringResourceStream.getContentType()
public InputStream getInputStream()
throws ResourceStreamNotFoundException
IResourceStream
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()
IModifiable
lastModifiedTime in interface IModifiablelastModifiedTime in class AbstractStringResourceStreamTime or
null if that information is not availableAbstractStringResourceStream.lastModifiedTime()public void setCharset(Charset charset)
AbstractStringResourceStream
setCharset in interface IStringResourceStreamsetCharset in class AbstractStringResourceStreamcharset - Charset for componentorg.apache.wicket.util.resource.AbstractResourceStream#setCharset(java.nio.charset.Charset)public void setLastModified(Time lastModified)
setLastModified in class AbstractStringResourceStreamlastModified - The lastModified to set.AbstractStringResourceStream.setLastModified(org.apache.wicket.util.time.Time)public void setLocale(Locale locale)
IResourceStream
setLocale in interface IResourceStreamsetLocale in class AbstractResourceStreamlocale - The Locale where this stream did resolve to.AbstractResourceStream.setLocale(java.util.Locale)public String getString()
TextTemplateString resource.
getString in class TextTemplateString resourceTextTemplate.getString()public String toString()
toString in class ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||