public class ServletMapPrinterFactory extends java.lang.Object implements MapPrinterFactory
MapPrinterFactory that reads configuration from files and uses servlet's methods for resolving
the paths to the files.
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
DEFAULT_CONFIGURATION_FILE_KEY
The name of the default app.
|
| Constructor and Description |
|---|
ServletMapPrinterFactory() |
| Modifier and Type | Method and Description |
|---|---|
MapPrinter |
create(java.lang.String app)
Creates the appropriate map printer.
|
java.util.Set<java.lang.String> |
getAppIds()
Return the set of app ids that are available.
|
void |
setAppsRootDirectory(java.lang.String directory)
Set a single directory that contains one or more subdirectories, each one that contains a config.yaml file will
be considered a print app.
|
void |
setConfigurationFiles(java.util.Map<java.lang.String,java.lang.String> configurationFiles)
The setter for setting configuration file.
|
public static final java.lang.String DEFAULT_CONFIGURATION_FILE_KEY
public final MapPrinter create(@Nullable java.lang.String app) throws NoSuchAppException
MapPrinterFactorycreate in interface MapPrinterFactoryapp - an identifier that controls which configuration to use.NoSuchAppExceptionpublic final java.util.Set<java.lang.String> getAppIds()
MapPrinterFactorygetAppIds in interface MapPrinterFactorypublic final void setConfigurationFiles(java.util.Map<java.lang.String,java.lang.String> configurationFiles)
throws java.net.URISyntaxException
configurationFiles - the configuration file map.java.net.URISyntaxExceptionpublic final void setAppsRootDirectory(java.lang.String directory)
throws java.net.URISyntaxException
directory - the root directory containing the sub-app-directories. This must resolve to a file with thejava.net.URISyntaxException