|
||||||||||
| 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. |
| Constructor Summary | |
|---|---|
TextTemplateDecorator(TextTemplate textTemplate)
Constructor. |
|
| Method Summary | |
|---|---|
java.lang.String |
asString()
Returns the decorated contents as a String. |
java.lang.String |
asString(java.util.Map<java.lang.String,java.lang.Object> variables)
Returns the decorated contents as a String. |
void |
close()
Closes the resource. |
boolean |
equals(java.lang.Object obj)
|
abstract java.lang.String |
getAfterTemplateContents()
Retrieves the String to put after the actual template contents, for example: |
abstract java.lang.String |
getBeforeTemplateContents()
Retrieves the String to put before the actual template contents, for example: |
java.lang.String |
getContentType()
Gets the mime type of this resource |
java.io.InputStream |
getInputStream()
Gets the resource stream. |
java.util.Locale |
getLocale()
|
java.lang.String |
getString()
Retrieves the String resource. |
int |
hashCode()
|
Time |
lastModifiedTime()
Gets the last time this modifiable thing changed. |
void |
setCharset(java.nio.charset.Charset charset)
Sets the character set used for reading this resource. |
void |
setLastModified(Time lastModified)
|
void |
setLocale(java.util.Locale locale)
This method shouldn't be used for the outside, It is used by the Loaders to set the resolved locale. |
java.lang.String |
toString()
|
| Methods inherited from class org.apache.wicket.util.template.TextTemplate |
|---|
interpolate |
| Methods inherited from class org.apache.wicket.util.resource.AbstractStringResourceStream |
|---|
length |
| Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
|---|
getCharset |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected final TextTemplate decorated
TextTemplate.
| Constructor Detail |
|---|
public TextTemplateDecorator(TextTemplate textTemplate)
textTemplate - a TextTemplate to decorate| Method Detail |
|---|
public java.lang.String asString()
String.
asString in interface IStringResourceStreamasString in class TextTemplategetBeforeTemplateContents() and
getAfterTemplateContents()TextTemplate.asString()public java.lang.String asString(java.util.Map<java.lang.String,java.lang.Object> variables)
String.
asString in class TextTemplatevariables - the variables to interpolate
getBeforeTemplateContents() and
getAfterTemplateContents().TextTemplate.asString(java.util.Map)public abstract java.lang.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 java.lang.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 java.io.IOException
IResourceStream
close in interface java.io.Closeableclose in interface IResourceStreamclose in class AbstractStringResourceStreamjava.io.IOExceptionAbstractStringResourceStream.close()public boolean equals(java.lang.Object obj)
equals in class java.lang.ObjectObject.equals(java.lang.Object)public java.lang.String getContentType()
IResourceStream
getContentType in interface IResourceStreamgetContentType in class AbstractStringResourceStreamResourceStreamRequestTarget handle the Content-Type automaticallyAbstractStringResourceStream.getContentType()
public java.io.InputStream getInputStream()
throws ResourceStreamNotFoundException
IResourceStream
getInputStream in interface IResourceStreamgetInputStream in class AbstractStringResourceStreamResourceStreamNotFoundExceptionAbstractStringResourceStream.getInputStream()public java.util.Locale getLocale()
getLocale in interface IResourceStreamgetLocale in class AbstractResourceStreamAbstractResourceStream.getLocale()public int hashCode()
hashCode in class java.lang.ObjectObject.hashCode()public Time lastModifiedTime()
IModifiable
lastModifiedTime in interface IModifiablelastModifiedTime in class AbstractStringResourceStreamTimeAbstractStringResourceStream.lastModifiedTime()public void setCharset(java.nio.charset.Charset charset)
AbstractResourceStream
setCharset in interface IStringResourceStreamsetCharset in class AbstractResourceStreamcharset - Charset for componentAbstractResourceStream.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(java.util.Locale locale)
IResourceStream
setLocale in interface IResourceStreamsetLocale in class AbstractResourceStreamlocale - The Locale where this stream did resolve to.AbstractResourceStream.setLocale(java.util.Locale)public java.lang.String getString()
TextTemplateString resource.
getString in class TextTemplateString resourceTextTemplate.getString()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||