Package net.officefloor.configuration
Interface ConfigurationContext
- All Known Subinterfaces:
OfficeExtensionContext,OfficeFloorExtensionContext,OfficeFloorSourceContext,OfficeSourceContext,SectionSourceContext,WoofTemplateExtensionSourceContext,WritableConfigurationContext
- All Known Implementing Classes:
AbstractWritableConfigurationContext,ClassLoaderConfigurationContext,ConfigurationContextImpl,ConfigurationSourceContextImpl,FileSystemConfigurationContext,MemoryConfigurationContext,OfficeFloorSourceContextImpl,OfficeSourceContextImpl,SectionSourceContextImpl,XmlFileConfigurationContext
public interface ConfigurationContext
Context of the
ConfigurationItem instances.- Author:
- Daniel Sagenschneider
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault tag prefix.static final StringDefault tag suffix.static final Stringstatic final StringName ofPropertycontaining the prefix of the tag name.static final StringName ofPropertycontaining the suffix of the tag name.static final String -
Method Summary
Modifier and TypeMethodDescriptiongetConfigurationItem(String location, PropertyList overrideProperties) Obtains theConfigurationItemat the location.getOptionalConfigurationItem(String location, PropertyList overrideProperties) Obtains the optionalConfigurationItemat the location.
-
Field Details
-
PROPERTY_CONFIGURATION_INPUT_CHARSET
Name of thePropertycontaining theCharsetto use for theConfigurationItemReader. Should this not be specified, theCharset.defaultCharset()will be used.- See Also:
-
PROPERTY_CONFIGURATION_INPUT_TAG_PREFIX
Name ofPropertycontaining the prefix of the tag name.- See Also:
-
DEFAULT_TAG_PREFIX
Default tag prefix.- See Also:
-
PROPERTY_CONFIGURATION_INPUT_TAG_SUFFIX
Name ofPropertycontaining the suffix of the tag name.- See Also:
-
DEFAULT_TAG_SUFFIX
Default tag suffix.- See Also:
-
PROPERTY_CONFIGURATION_OUTPUT_CHARSET
Charsetto use for theInputStreamfor theConfigurationItem. Should this not be specified, thePROPERTY_CONFIGURATION_INPUT_CHARSETwill be used (followed by its defaults).- See Also:
-
-
Method Details
-
getConfigurationItem
ConfigurationItem getConfigurationItem(String location, PropertyList overrideProperties) throws UnknownResourceError, ConfigurationError Obtains the
ConfigurationItemat the location.Tags within the configuration are replaced by the
PropertyListfollowing naming convention${PropertyName}.- Parameters:
location- Location of theConfigurationItemto obtain.overrideProperties- 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
ConfigurationItem getOptionalConfigurationItem(String location, PropertyList overrideProperties) throws ConfigurationError Obtains the optional
ConfigurationItemat the location. May returnnullif notConfigurationItemat the location.Also, undertakes tag replacement from the
PropertyList.- Parameters:
location- Location of theConfigurationItemto obtain.overrideProperties- OverridePropertyListfor tag replacement. May benull.- Returns:
ConfigurationItemornullif no configuration at location.- Throws:
ConfigurationError- Let this propagate to let OfficeFloor handle failure in loadingConfigurationItem.
-