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 ConfigurationContext
Context of theConfigurationItem
instances.- Author:
- Daniel Sagenschneider
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
DEFAULT_TAG_PREFIX
Default tag prefix.static java.lang.String
DEFAULT_TAG_SUFFIX
Default tag suffix.static java.lang.String
PROPERTY_CONFIGURATION_INPUT_CHARSET
static java.lang.String
PROPERTY_CONFIGURATION_INPUT_TAG_PREFIX
Name ofProperty
containing the prefix of the tag name.static java.lang.String
PROPERTY_CONFIGURATION_INPUT_TAG_SUFFIX
Name ofProperty
containing the suffix of the tag name.static java.lang.String
PROPERTY_CONFIGURATION_OUTPUT_CHARSET
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConfigurationItem
getConfigurationItem(java.lang.String location, PropertyList overrideProperties)
Obtains theConfigurationItem
at the location.ConfigurationItem
getOptionalConfigurationItem(java.lang.String location, PropertyList overrideProperties)
Obtains the optionalConfigurationItem
at the location.
-
-
-
Field Detail
-
PROPERTY_CONFIGURATION_INPUT_CHARSET
static final java.lang.String PROPERTY_CONFIGURATION_INPUT_CHARSET
Name of theProperty
containing theCharset
to use for theConfigurationItem
Reader
. 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 ofProperty
containing 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 ofProperty
containing 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
Charset
to use for theInputStream
for theConfigurationItem
. Should this not be specified, thePROPERTY_CONFIGURATION_INPUT_CHARSET
will 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
ConfigurationItem
at the location.Tags within the configuration are replaced by the
PropertyList
following naming convention${PropertyName}
.- Parameters:
location
- Location of theConfigurationItem
to obtain.overrideProperties
- 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
ConfigurationItem getOptionalConfigurationItem(java.lang.String location, PropertyList overrideProperties) throws ConfigurationError
Obtains the optional
ConfigurationItem
at the location. May returnnull
if notConfigurationItem
at the location.Also, undertakes tag replacement from the
PropertyList
.- Parameters:
location
- Location of theConfigurationItem
to obtain.overrideProperties
- 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
.
-
-