public class Config
extends java.lang.Object
implements java.io.Closeable
| Modifier and Type | Field and Description |
|---|---|
static org.apache.log4j.Logger |
LOGGER |
| Constructor and Description |
|---|
Config() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Stop all the threads and stuff used for this config.
|
double |
getBestScale(double target) |
java.lang.String |
getBrokenUrlPlaceholder() |
java.util.TreeSet<java.lang.Integer> |
getDpis() |
java.util.TreeSet<java.lang.String> |
getFonts() |
java.util.TreeSet<java.lang.String> |
getFormats() |
java.util.TreeSet<java.lang.String> |
getHeaders() |
org.apache.commons.httpclient.HttpClient |
getHttpClient(java.net.URI uri)
Get or create the http client to be used to fetch all the map data.
|
boolean |
getIntegerSvg() |
java.util.TreeSet<Key> |
getKeys() |
Layout |
getLayout(java.lang.String name) |
MapReaderFactoryFinder |
getMapReaderFactoryFinder() |
OrderedResultsExecutor<MapTileTask> |
getMapRenderingExecutor() |
int |
getMaxPrintTimeBeforeWarningInSeconds() |
double |
getMaxSvgH() |
java.lang.String |
getMaxSvgHeight() |
double |
getMaxSvgW() |
java.lang.String |
getMaxSvgWidth() |
com.codahale.metrics.MetricRegistry |
getMetricRegistry() |
java.lang.String |
getOutputFilename() |
java.lang.String |
getOutputFilename(java.lang.String layoutName) |
java.util.List<java.lang.String> |
getOverlayLayers() |
int |
getPrintTimeoutMinutes() |
java.lang.String |
getProxyBaseUrl()
Get the url of the proxy that resides between the servlet and the internet.
|
boolean |
getReloadConfig() |
java.lang.Float |
getTmsDefaultOriginX()
Specify the default x - origin used by TMS map reader.
|
java.lang.Float |
getTmsDefaultOriginY()
Specify the default y - origin used by TMS map reader.
|
boolean |
isDisableScaleLocking() |
boolean |
isIgnoreCapabilities() |
boolean |
isScalePresent(double targetScale) |
boolean |
isTilecacheMerging() |
boolean |
localHostForwardIsFrom(java.lang.String host) |
boolean |
localHostForwardIsHttps2http() |
void |
printClientConfig(org.json.JSONWriter json) |
void |
setBrokenUrlPlaceholder(java.lang.String brokenUrlPlaceholder) |
void |
setConnectionTimeout(int connectionTimeout) |
void |
setDisableScaleLocking(boolean disableScaleLocking) |
void |
setDpis(java.util.TreeSet<java.lang.Integer> dpis) |
void |
setFonts(java.util.TreeSet<java.lang.String> fonts) |
void |
setFormats(java.util.TreeSet<java.lang.String> formats) |
void |
setGlobalParallelFetches(int globalParallelFetches) |
void |
setHeaders(java.util.TreeSet<java.lang.String> headers) |
void |
setHosts(java.util.List<HostMatcher> hosts) |
void |
setIgnoreCapabilities(boolean ignoreCapabilities) |
void |
setIntegerSvg(boolean integerSvg) |
void |
setKeys(java.util.TreeSet<Key> keys) |
void |
setLayouts(Layouts layouts) |
void |
setLocalHostForward(java.util.HashMap localHostForward) |
void |
setMapReaderFactoryFinder(MapReaderFactoryFinder mapReaderFactoryFinder) |
void |
setMaxPrintTimeBeforeWarningInSeconds(int maxPrintTimeBeforeWarningInSeconds) |
void |
setMaxSvgHeight(java.lang.String maxSvgHeight) |
void |
setMaxSvgWidth(java.lang.String maxSvgWidth) |
void |
setMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry) |
void |
setOutputFactory(OutputFactory outputFactory) |
void |
setOutputFilename(java.lang.String outputFilename) |
void |
setOverlayLayers(java.util.List<java.lang.String> overlayLayers) |
void |
setPerHostParallelFetches(int perHostParallelFetches) |
void |
setPrintTimeoutMinutes(int printTimeoutMinutes) |
void |
setProxyBaseUrl(java.lang.String proxyBaseUrl)
Set the url of the proxy that resides between the servlet and the internet.
|
void |
setReloadConfig(boolean reloadConfig) |
void |
setScales(java.util.TreeSet<java.lang.Number> scales) |
void |
setSecurity(java.util.List<SecurityStrategy> security) |
void |
setSocketTimeout(int socketTimeout) |
void |
setThreadResources(ThreadResources threadResources) |
void |
setTilecacheMerging(boolean tilecacheMerging) |
void |
setTmsDefaultOriginX(java.lang.Float tmsDefaultOriginX)
Specify the default x - origin used by TMS map reader.
|
void |
setTmsDefaultOriginY(java.lang.Float tmsDefaultOriginY)
Specify the default y - origin used by TMS map reader.
|
void |
validate()
Called just after the config has been loaded to check it is valid.
|
boolean |
validateUri(java.net.URI uri)
Make sure an URI is authorized
|
public void setOutputFactory(OutputFactory outputFactory)
public Layout getLayout(java.lang.String name)
public void setLayouts(Layouts layouts)
public void setDpis(java.util.TreeSet<java.lang.Integer> dpis)
public void setMaxSvgWidth(java.lang.String maxSvgWidth)
public java.lang.String getMaxSvgWidth()
public void setMaxSvgHeight(java.lang.String maxSvgHeight)
public java.lang.String getMaxSvgHeight()
public double getMaxSvgW()
public double getMaxSvgH()
public java.util.TreeSet<java.lang.Integer> getDpis()
public void printClientConfig(org.json.JSONWriter json)
throws org.json.JSONException
org.json.JSONExceptionpublic void setScales(java.util.TreeSet<java.lang.Number> scales)
public boolean isScalePresent(double targetScale)
public void setHosts(java.util.List<HostMatcher> hosts)
public void setFonts(java.util.TreeSet<java.lang.String> fonts)
public java.util.TreeSet<java.lang.String> getFonts()
public void setKeys(java.util.TreeSet<Key> keys)
public java.util.TreeSet<Key> getKeys()
public boolean validateUri(java.net.URI uri)
throws java.net.UnknownHostException,
java.net.SocketException,
java.net.MalformedURLException
java.net.UnknownHostExceptionjava.net.SocketExceptionjava.net.MalformedURLExceptionpublic void validate()
InvalidValueException - When there is a problempublic double getBestScale(double target)
public OrderedResultsExecutor<MapTileTask> getMapRenderingExecutor()
public void close()
close in interface java.io.Closeableclose in interface java.lang.AutoCloseablepublic void setGlobalParallelFetches(int globalParallelFetches)
public void setPerHostParallelFetches(int perHostParallelFetches)
public org.apache.commons.httpclient.HttpClient getHttpClient(java.net.URI uri)
public void setTilecacheMerging(boolean tilecacheMerging)
public boolean isTilecacheMerging()
public void setDisableScaleLocking(boolean disableScaleLocking)
public boolean isDisableScaleLocking()
public void setSocketTimeout(int socketTimeout)
public void setConnectionTimeout(int connectionTimeout)
public java.lang.String getOutputFilename(java.lang.String layoutName)
public java.lang.String getOutputFilename()
public void setOutputFilename(java.lang.String outputFilename)
public java.util.TreeSet<java.lang.String> getFormats()
public void setFormats(java.util.TreeSet<java.lang.String> formats)
public void setOverlayLayers(java.util.List<java.lang.String> overlayLayers)
public java.util.List<java.lang.String> getOverlayLayers()
public boolean getIntegerSvg()
public void setIntegerSvg(boolean integerSvg)
integerSvg - the integerSvg to setpublic boolean getReloadConfig()
public void setReloadConfig(boolean reloadConfig)
reloadConfig - the reloadConfig to setpublic void setSecurity(java.util.List<SecurityStrategy> security)
public void setMapReaderFactoryFinder(MapReaderFactoryFinder mapReaderFactoryFinder)
public MapReaderFactoryFinder getMapReaderFactoryFinder()
public void setLocalHostForward(java.util.HashMap localHostForward)
public boolean localHostForwardIsHttps2http()
public boolean localHostForwardIsFrom(java.lang.String host)
public void setHeaders(java.util.TreeSet<java.lang.String> headers)
public java.util.TreeSet<java.lang.String> getHeaders()
public void setBrokenUrlPlaceholder(java.lang.String brokenUrlPlaceholder)
public java.lang.String getBrokenUrlPlaceholder()
public java.lang.String getProxyBaseUrl()
public void setProxyBaseUrl(java.lang.String proxyBaseUrl)
proxyBaseUrl - the url of the proxy as seen from the internet.public java.lang.Float getTmsDefaultOriginX()
public void setTmsDefaultOriginX(java.lang.Float tmsDefaultOriginX)
public java.lang.Float getTmsDefaultOriginY()
public void setTmsDefaultOriginY(java.lang.Float tmsDefaultOriginY)
public void setThreadResources(ThreadResources threadResources)
public boolean isIgnoreCapabilities()
public void setIgnoreCapabilities(boolean ignoreCapabilities)
public int getMaxPrintTimeBeforeWarningInSeconds()
public int getPrintTimeoutMinutes()
public void setPrintTimeoutMinutes(int printTimeoutMinutes)
public void setMaxPrintTimeBeforeWarningInSeconds(int maxPrintTimeBeforeWarningInSeconds)
public void setMetricRegistry(com.codahale.metrics.MetricRegistry metricRegistry)
public com.codahale.metrics.MetricRegistry getMetricRegistry()