public final class NoContent extends Object implements ContentGenerator, Cacheable
This content generator is useful for when the XML header already contains enough information for the purpose of application.
This generator can also be useful to be picked up by the XSLT even if no content is required.
There is no configuration associated with this generator.
This generator does not use and require any parameter.
This generator does not have any content, so the XML content is always empty.
Since Berlioz always wraps generators' content, the final XML is always:
<content generator="org.pageseeder.berlioz.generator.NoContent"
name="[name]" target="[target]" status="ok"/>
Note: since this generator does produce any data, the return status is always
ok
.
To use this generator in Berlioz (in /WEB-INF/config/services.xml
):
<generator class="org.pageseeder.berlioz.generator.NoContent"
name="[name]" target="[target]"/>
This Etag for this generator is always "nocontent"
.
Constructor and Description |
---|
NoContent() |
Modifier and Type | Method and Description |
---|---|
String |
getETag(ContentRequest req)
Always returns the
"nocontent" . |
void |
process(ContentRequest req,
org.pageseeder.xmlwriter.XMLWriter xml)
Do nothing.
|
public String getETag(ContentRequest req)
"nocontent"
.
Returns the ETag for the specified content request.public void process(ContentRequest req, org.pageseeder.xmlwriter.XMLWriter xml)
This is the main method of this interface, it should:
Implementation should specify which attribute or parameters are used or required.
process
in interface ContentGenerator
req
- The content request.xml
- The XML output.Copyright © 2016 Allette Systems. All rights reserved.