|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.weborganic.bastille.xml.GetXMLFileInfo
public final class GetXMLFileInfo
Returns information about a file in the WEB-INF/xml based on the specified by the path info.
If the file is a directory, lists the files corresponding to the specified directory.
The root XML folder can be configured globally using the Berlioz configuration:
For example:
<node name="bastille">
<map/>
<node name="xml">
<map>
<entry key="folder" value="xml/content"/>
</map>
</node>
</node>
The path to the resource can be specified using the path parameter, if the path parameter is not specified, the path will use the path info.
XML for a file:
<file name="[filename]"
path="[path_to_folder]"
type="file"
media-type="[media_type]"
length="[file_size]"
modified="[ISO8601_datetime]">
XML for a folder:
<file name="[filename]" path="[path_from_root]" type="folder">
<!-- for each file... -->
<file name="" ... />
</file>
XML 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-found
Constructor Summary | |
---|---|
GetXMLFileInfo()
|
Method Summary | |
---|---|
String |
getETag(ContentRequest req)
|
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 GetXMLFileInfo()
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 |