public final class Service extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
affectStatus(ContentGenerator generator)
Indicates whether the specified generator affects the status of the service.
|
String |
cache()
Returns the value of the 'Cache-Control' for this service.
|
List<ContentGenerator> |
generators()
Returns the list of generators for this service.
|
String |
group()
Returns the group this service is part of.
|
String |
id()
Returns the ID of this service.
|
boolean |
isCacheable()
Indicates whether this service is cacheable.
|
String |
name(ContentGenerator generator)
Returns the name of the given generator.
|
List<Parameter> |
parameters(ContentGenerator generator)
Returns the list of parameter specifications for the given generator.
|
ServiceStatusRule |
rule()
Returns the status rule for this service.
|
String |
target(ContentGenerator generator)
Returns the target of the given generator.
|
String |
toString() |
void |
toXML(org.pageseeder.xmlwriter.XMLWriter xml,
HttpMethod method,
List<String> urls)
Serialises the specified service as XML.
|
void |
toXML(org.pageseeder.xmlwriter.XMLWriter xml,
HttpMethod method,
List<String> urls,
String cacheControl)
Serialises the specified service as XML.
|
public String id()
public String group()
public String cache()
public ServiceStatusRule rule()
public boolean isCacheable()
A service is cacheable only if all its generators are cacheable.
true
if this response is cacheable;
false
otherwise.public List<ContentGenerator> generators()
public List<Parameter> parameters(ContentGenerator generator)
generator
- the content generator for which we need to parameters.public String target(ContentGenerator generator)
generator
- the content generator for which we need the target.null
).public String name(ContentGenerator generator)
generator
- the content generator for which we need the name.public boolean affectStatus(ContentGenerator generator)
generator
- The generator.true
if the generator affects the status of the service;
false
otherwise.public void toXML(org.pageseeder.xmlwriter.XMLWriter xml, HttpMethod method, List<String> urls) throws IOException
xml
- the XML writermethod
- the HTTP method the service is mapped to.urls
- the URI patterns this service matchesIOException
- if thrown by the XML writer.public void toXML(org.pageseeder.xmlwriter.XMLWriter xml, HttpMethod method, List<String> urls, String cacheControl) throws IOException
xml
- the XML writermethod
- the HTTP method the service is mapped to.urls
- the URI patterns this service matchescacheControl
- the cache control directives.IOException
- if thrown by the XML writer.Copyright © 2016 Allette Systems. All rights reserved.