Class ConfigurationContextImpl
java.lang.Object
net.officefloor.configuration.impl.ConfigurationContextImpl
- All Implemented Interfaces:
ConfigurationContext
- Direct Known Subclasses:
AbstractWritableConfigurationContext,ClassLoaderConfigurationContext,XmlFileConfigurationContext
Abstract
ConfigurationContext.- Author:
- Daniel Sagenschneider
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceFunction interface to obtain theInputStreamfor theConfigurationItem. -
Field Summary
Fields inherited from interface net.officefloor.configuration.ConfigurationContext
DEFAULT_TAG_PREFIX, DEFAULT_TAG_SUFFIX, PROPERTY_CONFIGURATION_INPUT_CHARSET, PROPERTY_CONFIGURATION_INPUT_TAG_PREFIX, PROPERTY_CONFIGURATION_INPUT_TAG_SUFFIX, PROPERTY_CONFIGURATION_OUTPUT_CHARSET -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationContextImpl(ConfigurationContextImpl.ConfigurationSource configurationSource, SourceProperties properties) Instantiate. -
Method Summary
Modifier and TypeMethodDescriptionprotected ConfigurationItemcreateConfigurationItem(String location, byte[] rawConfiguration, String configuration, Charset charset) Creates theConfigurationItem.getConfigurationItem(String location, PropertyList properties) Obtains theConfigurationItemat the location.Obtains theConfigurationContextImpl.ConfigurationSource.getOptionalConfigurationItem(String location, PropertyList properties) Obtains the optionalConfigurationItemat the location.
-
Constructor Details
-
ConfigurationContextImpl
public ConfigurationContextImpl(ConfigurationContextImpl.ConfigurationSource configurationSource, SourceProperties properties) Instantiate.- Parameters:
configurationSource-ConfigurationContextImpl.ConfigurationSource.properties-SourceProperties.
-
-
Method Details
-
getConfigurationSource
Obtains theConfigurationContextImpl.ConfigurationSource. -
createConfigurationItem
protected ConfigurationItem createConfigurationItem(String location, byte[] rawConfiguration, String configuration, Charset charset) Creates the
ConfigurationItem.Provided to enable overriding the creation of the
ConfigurationItem.- Parameters:
location- Location of theConfigurationItem.rawConfiguration- Raw configuration read fromConfigurationContextImpl.ConfigurationSource.configuration- Configuration withPropertyreplacement.charset- OutputCharset.- Returns:
ConfigurationItem.
-
getConfigurationItem
Description copied from interface:ConfigurationContextObtains the
ConfigurationItemat the location.Tags within the configuration are replaced by the
PropertyListfollowing naming convention${PropertyName}.- Specified by:
getConfigurationItemin interfaceConfigurationContext- Parameters:
location- Location of theConfigurationItemto obtain.properties- OverridePropertyListfor tag replacement. May benull.- Returns:
ConfigurationItem.
-
getOptionalConfigurationItem
Description copied from interface:ConfigurationContextObtains the optional
ConfigurationItemat the location. May returnnullif notConfigurationItemat the location.Also, undertakes tag replacement from the
PropertyList.- Specified by:
getOptionalConfigurationItemin interfaceConfigurationContext- Parameters:
location- Location of theConfigurationItemto obtain.properties- OverridePropertyListfor tag replacement. May benull.- Returns:
ConfigurationItemornullif no configuration at location.
-