public class ConfigDocumentLoader extends DocumentLoader implements PropertyChangeListener
| Modifier and Type | Field and Description |
|---|---|
static String |
CONFIG_PROPERTY
Property holding the path to the config XML text.
|
static String |
CONFIG_ROOT
Root element of config XML text.
|
static String |
DEFAULT_CONFIG
Default source of config XML text.
|
static String[] |
DOCTYPE_STRINGS
The document type strings.
|
static String |
VALIDATION_DISABLED_PROPERTY
Validation control properties.
|
static String |
VALIDATION_ENABLED_PROPERTY |
ID_PATTERN, ID_PREFIX| Modifier and Type | Method and Description |
|---|---|
protected DocumentLoader.RootHandler |
getRootHandler()
Gets a root handler.
|
protected String |
getRootName()
Gets the root element name for this document.
|
protected URL |
getURL()
Gets the URL for this document.
|
static Config |
loadConfig(String serviceName,
Optional<String> from,
Optional<ServiceClassLoader> classLoader)
Loads the config.
|
protected boolean |
loadFrom(String from,
Optional<Reader> reader)
Loads this document from the specified location with a supplied reader.
|
void |
propertyChange(PropertyChangeEvent event)
Called when a monitored property changes.
|
protected boolean |
read(String xml)
Reads the document from an XML string.
|
protected void |
setURL(URL url)
Sets the URL for this document.
|
addPrefixNames, getEntity, getPrefixName, getThisLogger, handle, newXMLElement, setEntities, setSubstitutionDeferred, setSubstitutionEnabled, setValidatingpublic static final String CONFIG_PROPERTY
public static final String CONFIG_ROOT
public static final String DEFAULT_CONFIG
public static final String[] DOCTYPE_STRINGS
public static final String VALIDATION_DISABLED_PROPERTY
public static final String VALIDATION_ENABLED_PROPERTY
@Nullable @CheckReturnValue public static Config loadConfig(@Nonnull String serviceName, @Nonnull Optional<String> from, @Nonnull Optional<ServiceClassLoader> classLoader)
serviceName - The name of the service the config is loaded for.from - The optional location to load from.classLoader - An optional class loader.public final void propertyChange(PropertyChangeEvent event)
propertyChange in interface PropertyChangeListenerevent - The event describing the change.protected DocumentLoader.RootHandler getRootHandler()
getRootHandler in class DocumentLoaderprotected final String getRootName()
getRootName in class DocumentLoaderprotected URL getURL()
getURL in class DocumentLoaderprotected boolean loadFrom(String from,
Optional<Reader> reader)
loadFrom in class DocumentLoaderfrom - The location to load from.reader - The optional reader.protected boolean read(String xml)
read in class DocumentLoaderxml - The XML string.protected final void setURL(URL url)
setURL in class DocumentLoaderurl - The URL.Copyright © 2003-2019 Serge Brisson. All Rights Reserved.