|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.wicket.util.resource.AbstractResourceStream org.apache.wicket.util.resource.XSLTResourceStream
public class XSLTResourceStream
IResourceStream
that applies XSLT on an input IResourceStream
. The XSL
stylesheet itself is also an IResourceStream
. Override getParameters()
to pass
parameters to the XSL stylesheet.
FIXME experimental feature, does not implement any kind of caching, use with care, running an XSL
transformation for every request is very expensive! Please have a look at
ZipResourceStream
for an in-depth explanation of what needs to be done with respect to
caching.
Constructor Summary | |
---|---|
XSLTResourceStream(IResourceStream xsltResource,
IResourceStream xmlResource)
Construct. |
Method Summary | |
---|---|
void |
close()
Closes the resource. |
java.lang.String |
getContentType()
Returns always null |
java.io.InputStream |
getInputStream()
Gets the resource stream. |
protected java.util.Map |
getParameters()
|
Time |
lastModifiedTime()
Returns always null |
long |
length()
Gets the size of this resource in bytes TODO 1.5: rename to lengthInBytes() or let it return some sort of size object |
Methods inherited from class org.apache.wicket.util.resource.AbstractResourceStream |
---|
asString, getCharset, getLocale, setCharset, setLocale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XSLTResourceStream(IResourceStream xsltResource, IResourceStream xmlResource)
xsltResource
- the XSL stylesheet as an IResourceStream
xmlResource
- the input XML document as an IResourceStream
Method Detail |
---|
protected java.util.Map getParameters()
Map
of XSLT parameters, appropriate for passing information to the XSL
stylesheetpublic void close() throws java.io.IOException
IResourceStream
java.io.IOException
IResourceStream.close()
public java.lang.String getContentType()
getContentType
in interface IResourceStream
getContentType
in class AbstractResourceStream
ResourceStreamRequestTarget
handle the Content-Type automaticallyIResourceStream.getContentType()
public java.io.InputStream getInputStream() throws ResourceStreamNotFoundException
IResourceStream
ResourceStreamNotFoundException
IResourceStream.getInputStream()
public long length()
IResourceStream
length
in interface IResourceStream
length
in class AbstractResourceStream
IResourceStream.length()
public Time lastModifiedTime()
lastModifiedTime
in interface IModifiable
lastModifiedTime
in class AbstractResourceStream
Time
IModifiable.lastModifiedTime()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |