Class ConfigurationSourceContextImpl
- java.lang.Object
-
- net.officefloor.frame.impl.construct.source.SourcePropertiesImpl
-
- net.officefloor.frame.impl.construct.source.SourceContextImpl
-
- net.officefloor.configuration.impl.ConfigurationSourceContextImpl
-
- All Implemented Interfaces:
ConfigurationContext
,ServiceContext
,SourceContext
,SourceProperties
- Direct Known Subclasses:
OfficeFloorSourceContextImpl
,OfficeSourceContextImpl
,SectionSourceContextImpl
public class ConfigurationSourceContextImpl extends SourceContextImpl implements ConfigurationContext
SourceContext
andConfigurationContext
implementation.- Author:
- Daniel Sagenschneider
-
-
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
Constructors Constructor Description ConfigurationSourceContextImpl(java.lang.String sourceName, boolean isLoadingType, SourceContext delegate, java.lang.String[] additionalProfiles, SourceProperties sourceProperties)
Instantiate.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationItem
getConfigurationItem(java.lang.String location, PropertyList properties)
Obtains theConfigurationItem
at the location.ConfigurationItem
getOptionalConfigurationItem(java.lang.String location, PropertyList properties)
Obtains the optionalConfigurationItem
at the location.-
Methods inherited from class net.officefloor.frame.impl.construct.source.SourceContextImpl
getClassLoader, getClock, getLogger, getName, getOptionalResource, getProfiles, getResource, isLoadingType, loadClass, loadOptionalClass, loadOptionalService, loadOptionalServices, loadService, loadService, loadServices
-
Methods inherited from class net.officefloor.frame.impl.construct.source.SourcePropertiesImpl
addProperty, getProperties, getProperty, getProperty, getPropertyNames
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.officefloor.frame.api.source.SourceProperties
getProperties, getProperty, getProperty, getPropertyNames
-
-
-
-
Constructor Detail
-
ConfigurationSourceContextImpl
public ConfigurationSourceContextImpl(java.lang.String sourceName, boolean isLoadingType, SourceContext delegate, java.lang.String[] additionalProfiles, SourceProperties sourceProperties)
Instantiate.- Parameters:
sourceName
- Name of source.isLoadingType
- Indicates if loading type.delegate
- DelegateSourceContext
.additionalProfiles
- Additional profiles.sourceProperties
-SourceProperties
.
-
-
Method Detail
-
getConfigurationItem
public ConfigurationItem getConfigurationItem(java.lang.String location, PropertyList properties) throws UnknownResourceError, ConfigurationError
Description copied from interface:ConfigurationContext
Obtains the
ConfigurationItem
at the location.Tags within the configuration are replaced by the
PropertyList
following naming convention${PropertyName}
.- Specified by:
getConfigurationItem
in interfaceConfigurationContext
- Parameters:
location
- Location of theConfigurationItem
to obtain.properties
- OverridePropertyList
for tag replacement. May benull
.- Returns:
ConfigurationItem
.- Throws:
UnknownResourceError
- Let this propagate to let OfficeFloor handle theConfigurationItem
not available at the location.ConfigurationError
- Let this propagate to let OfficeFloor handle failure in loadingConfigurationItem
.
-
getOptionalConfigurationItem
public ConfigurationItem getOptionalConfigurationItem(java.lang.String location, PropertyList properties) throws ConfigurationError
Description copied from interface:ConfigurationContext
Obtains the optional
ConfigurationItem
at the location. May returnnull
if notConfigurationItem
at the location.Also, undertakes tag replacement from the
PropertyList
.- Specified by:
getOptionalConfigurationItem
in interfaceConfigurationContext
- Parameters:
location
- Location of theConfigurationItem
to obtain.properties
- OverridePropertyList
for tag replacement. May benull
.- Returns:
ConfigurationItem
ornull
if no configuration at location.- Throws:
ConfigurationError
- Let this propagate to let OfficeFloor handle failure in loadingConfigurationItem
.
-
-