public final class GetMatchingService extends Object implements ContentGenerator, Cacheable
This content generator is mostly useful for developers to see how the services are configured.
There is no configuration associated with this generator.
This generator does not use and require any parameter.
This generator contains the /WEB-INF/config/services.xml
used by Berlioz to load
its services.
<services version="1.0"> ... </services>
The formatting of the XML may differ from the actual files as it is parsed before being returned; the XML declaration and comments are stripped.
Should there be any problem parsing or reading the file, the XML returned will be:
<no-data error="[error]" details="[error-details]"/>
The error details are only shown if available.
To use this generator in Berlioz (in /WEB-INF/config/services.xml
):
<generator class="org.pageseeder.berlioz.generator.GetServices"
name="[name]" target="[target]"/>
This generator uses a weak etag based on the name, length and last modified date of the file.
Constructor and Description |
---|
GetMatchingService() |
Modifier and Type | Method and Description |
---|---|
String |
getETag(ContentRequest req)
Returns the ETag for the specified content request.
|
void |
process(ContentRequest req,
org.pageseeder.xmlwriter.XMLWriter xml)
Produces the actual content.
|
public String getETag(ContentRequest req)
Cacheable
public void process(ContentRequest req, org.pageseeder.xmlwriter.XMLWriter xml) throws IOException
ContentGenerator
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.IOException
- If an I/O error occurs while writing to the XML writer.Copyright © 2016 Allette Systems. All rights reserved.