public class DqcServletConfig extends Object
| Modifier | Constructor and Description |
|---|---|
|
DqcServletConfig(File configPath,
String configFileName)
Create a new DqcServletConfig instance using the given configuration file.
|
protected |
DqcServletConfig(String configDocResourcePath,
String configDocResourceName)
Used for testing.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addItem(DqcServletConfigItem item) |
boolean |
addItem(String name,
String description,
String handlerName,
String handlerConfigFileName) |
InvCatalog |
createCatalogRepresentation(String servletURL) |
DqcServletConfigItem |
findItem(String itemName)
Find an item with the given name.
|
String |
getDqcServletTitle() |
Iterator |
getIterator()
Return an iterator of the config items in this config.
|
String |
toString() |
void |
writeConfig(OutputStream os) |
static void |
writeExampleConfig(String fileName,
String name,
String description,
String handlerName,
String handlerConfigFileName)
A convenience routine for writing a DqcServlet config file.
|
public DqcServletConfig(File configPath, String configFileName) throws IOException
Create a new DqcServletConfig instance using the given configuration file.
The configuration file is a ucar.util.prefs.XMLStore that contains one bean collection named "config". Each bean is a DqcServletConfigItem containing information about the setup of a DQC handler. Here is an example configuration document:
Several other examples are distributed as part of the DqcServlet distribution.
configPath - - the path to the DqcServlet configuration files.configFileName - - the name of the DqcServlet configuration file.IOException - if can't create XMLStore from given file.NullPointerException - if either the path or the filename parameters are null.RuntimeException - if ucar.util.prefs has problems (not clear when these situations might occur).protected DqcServletConfig(String configDocResourcePath, String configDocResourceName) throws IOException
configDocResourcePath - - the path to the resource containing the configuration document.configDocResourceName - - the name of the resource containing the configuration document.IOException - if can't create XMLStore from resource.NullPointerException - if the resource name parameter is null.RuntimeException - if ucar.util.prefs has problems (not clear when these situations might occur).public String getDqcServletTitle()
public Iterator getIterator()
public DqcServletConfigItem findItem(String itemName)
public boolean addItem(DqcServletConfigItem item)
public boolean addItem(String name, String description, String handlerName, String handlerConfigFileName)
public void writeConfig(OutputStream os) throws IOException
IOExceptionpublic static void writeExampleConfig(String fileName, String name, String description, String handlerName, String handlerConfigFileName) throws IOException
fileName - name - description - handlerName - handlerConfigFileName - IOExceptionpublic InvCatalog createCatalogRepresentation(String servletURL)
Copyright © 1999–2013 UCAR/Unidata. All rights reserved.