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,ProjectConfigurationContext,SectionSourceContextImpl,XmlFileConfigurationContext
public interface ConfigurationContextContext of theConfigurationIteminstances.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_TAG_PREFIXDefault tag prefix.static java.lang.StringDEFAULT_TAG_SUFFIXDefault tag suffix.static java.lang.StringPROPERTY_CONFIGURATION_INPUT_CHARSETstatic java.lang.StringPROPERTY_CONFIGURATION_INPUT_TAG_PREFIXName ofPropertycontaining the prefix of the tag name.static java.lang.StringPROPERTY_CONFIGURATION_INPUT_TAG_SUFFIXName ofPropertycontaining the suffix of the tag name.static java.lang.StringPROPERTY_CONFIGURATION_OUTPUT_CHARSET
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConfigurationItemgetConfigurationItem(java.lang.String location, PropertyList overrideProperties)Obtains theConfigurationItemat the location.ConfigurationItemgetOptionalConfigurationItem(java.lang.String location, PropertyList overrideProperties)Obtains the optionalConfigurationItemat the location.
-
-
-
Field Detail
-
PROPERTY_CONFIGURATION_INPUT_CHARSET
static final java.lang.String PROPERTY_CONFIGURATION_INPUT_CHARSET
Name of thePropertycontaining theCharsetto use for theConfigurationItemReader. Should this not be specified, theCharset.defaultCharset()will be used.- See Also:
- Constant Field Values
-
PROPERTY_CONFIGURATION_INPUT_TAG_PREFIX
static final java.lang.String PROPERTY_CONFIGURATION_INPUT_TAG_PREFIX
Name ofPropertycontaining the prefix of the tag name.- See Also:
- Constant Field Values
-
DEFAULT_TAG_PREFIX
static final java.lang.String DEFAULT_TAG_PREFIX
Default tag prefix.- See Also:
- Constant Field Values
-
PROPERTY_CONFIGURATION_INPUT_TAG_SUFFIX
static final java.lang.String PROPERTY_CONFIGURATION_INPUT_TAG_SUFFIX
Name ofPropertycontaining the suffix of the tag name.- See Also:
- Constant Field Values
-
DEFAULT_TAG_SUFFIX
static final java.lang.String DEFAULT_TAG_SUFFIX
Default tag suffix.- See Also:
- Constant Field Values
-
PROPERTY_CONFIGURATION_OUTPUT_CHARSET
static final java.lang.String 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:
- Constant Field Values
-
-
Method Detail
-
getConfigurationItem
ConfigurationItem getConfigurationItem(java.lang.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(java.lang.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.
-
-