public final class BerliozConfig extends Object
Modifier and Type | Method and Description |
---|---|
boolean |
enableCompression()
Indicates whether HTTP compression is enabled for the Berlioz configuration.
|
String |
getCacheControl()
Returns the default cache control instruction.
|
String |
getContentType()
Returns the content type.
|
Environment |
getEnvironment()
Returns the environment.
|
long |
getETagSeed()
Return the ETag Seed.
|
long |
getExpiryDate()
Expiry date is a year from now.
|
static GeneratorListener |
getListener() |
String |
getName()
Returns the name of this configuration, usually the servlet name.
|
XSLTransformer |
getTransformer(Service service)
Returns the XSLT transformer for the specified service.
|
boolean |
hasControl(javax.servlet.http.HttpServletRequest req)
Indicates whether this configuration can be controlled by the user.
|
static BerliozConfig |
newConfig(javax.servlet.ServletConfig servletConfig)
Creates a new config for a given Servlet config.
|
void |
resetETagSeed()
Resets the ETag Seed.
|
void |
setContentType(String contentType)
Sets the content type.
|
static void |
setListener(GeneratorListener listener) |
static boolean |
unregister(BerliozConfig config)
Creates a new config for a given Servlet config.
|
public String getName()
public Environment getEnvironment()
public long getETagSeed()
public void resetETagSeed()
public long getExpiryDate()
public String getCacheControl()
public String getContentType()
public boolean enableCompression()
true
to enable HTTP compression;
false
otherwise.public void setContentType(String contentType)
contentType
- the content type.public boolean hasControl(javax.servlet.http.HttpServletRequest req)
req
- the request including the control key is specified as a request parametertrue
if no key has been configured or the berlioz-control
matches
the control key; false otherwise.public XSLTransformer getTransformer(Service service)
service
- the service which requires a transformer.public static BerliozConfig newConfig(javax.servlet.ServletConfig servletConfig)
servletConfig
- The servlet configuration.public static boolean unregister(BerliozConfig config)
config
- The Berlioz configuration to unregister.true
if the config was unregistered;
false
otherwise.public static void setListener(GeneratorListener listener)
listener
- the listener to setpublic static GeneratorListener getListener()
Copyright © 2016 Allette Systems. All rights reserved.