|
||||||||||
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,Object> 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: |
abstract String |
getBeforeTemplateContents()
Retrieves the String to put before the actual template contents, for example: |
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 for the outside, It is used by the Loaders to set the resolved locale. |
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 decorateMethod Detail |
---|
public String asString()
String
.
asString
in interface IStringResourceStream
asString
in class TextTemplate
getBeforeTemplateContents()
and
getAfterTemplateContents()
TextTemplate.asString()
public String asString(Map<String,Object> variables)
String
.
asString
in class TextTemplate
variables
- 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 contentspublic void close() throws IOException
IResourceStream
close
in interface Closeable
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()
IResourceStream
getContentType
in interface IResourceStream
getContentType
in class AbstractStringResourceStream
ResourceStreamRequestTarget
handle the Content-Type automaticallyAbstractStringResourceStream.getContentType()
public InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
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()
IModifiable
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractStringResourceStream
Time
AbstractStringResourceStream.lastModifiedTime()
public void setCharset(Charset charset)
AbstractResourceStream
setCharset
in interface IStringResourceStream
setCharset
in class AbstractResourceStream
charset
- Charset for componentAbstractResourceStream.setCharset(java.nio.charset.Charset)
public void setLastModified(Time lastModified)
setLastModified
in class AbstractStringResourceStream
lastModified
- The lastModified to set.AbstractStringResourceStream.setLastModified(org.apache.wicket.util.time.Time)
public void setLocale(Locale locale)
IResourceStream
setLocale
in interface IResourceStream
setLocale
in class AbstractResourceStream
locale
- The Locale where this stream did resolve to.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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |