|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.weborganic.bastille.xml.GetFileInfo
public final class GetFileInfo
Returns information about the file specified by the Berlioz path in the public folder.
If the file is a directory, lists the files corresponding to the specified directory.
No configuration required for this generator.
No parameter needed for this generator.
<file name="[filename]"
path="[path_to_folder]"
type="file"
media-type="[media_type]"
length="[file_size]"
modified="[ISO8601_datetime]">
For a folder:
<file name="[filename]" path="[path_from_root]" type="folder">
<!-- for each file... -->
<file name="" ... />
</file>
If the file does not exist,
<file name="[filename]"
path="[path_to_folder]"
status="not-found">
name
: the name of the file (including extension);path
: the path from the root of the website;type
: is either 'file' or 'folder';length
: the full length of the file;modified
: the last modified date and time of the file using ISO8601;media-type
: the media type of the file based on the file extension as
specified in Berlioz, if the file extension does not map to any media type returns
"application/octet-stream";content-type
: same as media type (deprecated);status
equals 'not-foundSince Version 0.6.1, this generator returns both the media-type
and
content-type
attributes. Use media-type
.
Constructor Summary | |
---|---|
GetFileInfo()
|
Method Summary | |
---|---|
String |
getETag(ContentRequest req)
Returns a weak Etag based on the file path, length and last modified date. |
void |
process(ContentRequest req,
XMLWriter xml)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GetFileInfo()
Method Detail |
---|
public String getETag(ContentRequest req)
getETag
in interface Cacheable
public void process(ContentRequest req, XMLWriter xml) throws BerliozException, IOException
process
in interface ContentGenerator
BerliozException
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |