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
SourceContextandConfigurationContextimplementation.- 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 ConfigurationItemgetConfigurationItem(java.lang.String location, PropertyList properties)Obtains theConfigurationItemat the location.ConfigurationItemgetOptionalConfigurationItem(java.lang.String location, PropertyList properties)Obtains the optionalConfigurationItemat 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: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.- Throws:
UnknownResourceError- Let this propagate to let OfficeFloor handle theConfigurationItemnot 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: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.- Throws:
ConfigurationError- Let this propagate to let OfficeFloor handle failure in loadingConfigurationItem.
-
-