public interface ConfigurationParameterDeclarations extends MetaDataObject
ConfigurationParameter
s or a list of ConfigurationGroup
s, where
each group can contain a list of parameters. When groups are used, the Resource can also declare
a list of common parameters
shared by all groups.Modifier and Type | Field and Description |
---|---|
static String |
SEARCH_STRATEGY_DEFAULT_FALLBACK
A value for the
searchStrategy property indicating that if there is no value
declared in a group, look in the default group . |
static String |
SEARCH_STRATEGY_LANGUAGE_FALLBACK
A value for the
searchStrategy property that is useful when ISO language and
country codes are used as configuration group names. |
static String |
SEARCH_STRATEGY_NONE
A value for the
searchStrategy property indicating that there is no fallback. |
Modifier and Type | Method and Description |
---|---|
void |
addCommonParameter(ConfigurationParameter aConfigurationParameter)
Adds a Configuration Parameter that is common to all groups.
|
void |
addConfigurationGroup(ConfigurationGroup aConfigurationGroup)
Adds a Configuration Group.
|
void |
addConfigurationParameter(ConfigurationParameter aConfigurationParameter)
Adds a Configuration Parameter that is not in any group.
|
ConfigurationParameter[] |
getCommonParameters()
Gets the configuration parameters that are common to all groups.
|
ConfigurationGroup[] |
getConfigurationGroupDeclarations(String aGroupName)
Gets the declarations of a named configuration group.
|
ConfigurationGroup[] |
getConfigurationGroups()
Gets the configuration parameter groups for this Resource.
|
ConfigurationParameter |
getConfigurationParameter(String aGroupName,
String aParamName)
Gets a configuration parameter.
|
ConfigurationParameter[] |
getConfigurationParameters()
Gets the configuration parameters for this Resource.
|
String |
getDefaultGroupName()
Gets the name of the default configuration group.
|
String |
getSearchStrategy()
Gets the configuration parameter search strategy.
|
void |
removeCommonParameter(ConfigurationParameter aConfigurationParameter)
Removes an Configuration Parameter that is common to all groups.
|
void |
removeConfigurationGroup(ConfigurationGroup aConfigurationGroup)
Removes an Configuration Group
|
void |
removeConfigurationParameter(ConfigurationParameter aConfigurationParameter)
Removes an Configuration Parameter that is not in any group.
|
void |
setCommonParameters(ConfigurationParameter[] aParams)
Sets the configuration parameters that are common to all groups.
|
void |
setConfigurationGroups(ConfigurationGroup[] aGroups)
Sets the configuration parameter groups for this Resource.
|
void |
setConfigurationParameters(ConfigurationParameter[] aParams)
Sets the configuration parameters for this Resource.
|
void |
setDefaultGroupName(String aGroupName)
Sets the name of the default configuration group.
|
void |
setSearchStrategy(String aStrategy)
Sets the configuration parameter search strategy.
|
clone, equals, getAttributeValue, getSourceUrl, getSourceUrlString, isModifiable, listAttributes, setAttributeValue, setSourceUrl
buildFromXMLElement, buildFromXMLElement, toXML, toXML, toXML, toXML
static final String SEARCH_STRATEGY_NONE
searchStrategy
property indicating that there is no fallback. If
a request is made for the value of a parameter in a group and there is no such value in that
exact group, null
will be returned.static final String SEARCH_STRATEGY_DEFAULT_FALLBACK
searchStrategy
property indicating that if there is no value
declared in a group, look in the default group
.static final String SEARCH_STRATEGY_LANGUAGE_FALLBACK
searchStrategy
property that is useful when ISO language and
country codes are used as configuration group names. If there is no value declared in a group,
look in more general groups. The fallback sequence is
lang-country-region -%gt; lang-country -%gt;
lang -%gt; default
. For example, if a
request is made for the value of a parameter in the "en-GB" group and no such group exists, the
value from the "en" group will be used instead.ConfigurationParameter[] getConfigurationParameters()
getConfigurationGroups()
.ConfigurationParameter
objects, each of which describes a
configuration parameter for this Resource.void setConfigurationParameters(ConfigurationParameter[] aParams)
setConfigurationGroups(ConfigurationGroup[])
.aParams
- an array containing ConfigurationParameter
objects, each of which describes a
configuration parameter for this Resource.UIMA_UnsupportedOperationException
- if this object is not modifiablevoid addConfigurationParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter
- the Configuration Parameter to addUIMA_UnsupportedOperationException
- if this object is not modifiablevoid removeConfigurationParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter
- the Configuration Parameter to remove (must be == with an ConfigurationParameter in
this collection, or this method will do nothing).UIMA_UnsupportedOperationException
- if this object is not modifiableConfigurationGroup[] getConfigurationGroups()
ConfigurationGroup
objects, each of which describes a
configuration parameter group for this Resource.void setConfigurationGroups(ConfigurationGroup[] aGroups)
aGroups
- an array containing ConfigurationGroup
objects, each of which describes a
configuration parameter group for this Resource.UIMA_UnsupportedOperationException
- if this object is not modifiablevoid addConfigurationGroup(ConfigurationGroup aConfigurationGroup)
aConfigurationGroup
- the Configuration Group to addUIMA_UnsupportedOperationException
- if this object is not modifiablevoid removeConfigurationGroup(ConfigurationGroup aConfigurationGroup)
aConfigurationGroup
- the Configuration Group to remove (must be == with an ConfigurationGroup defined on
this resource, or this method will do nothing).UIMA_UnsupportedOperationException
- if this object is not modifiableConfigurationParameter[] getCommonParameters()
ConfigurationParameter
objects, each of which describes a
parameter common to all groups.void setCommonParameters(ConfigurationParameter[] aParams)
aParams
- an array containing ConfigurationParameter
objects, each of which describes a
parameter common to all groups.void addCommonParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter
- the Configuration Parameter to addUIMA_UnsupportedOperationException
- if this object is not modifiablevoid removeCommonParameter(ConfigurationParameter aConfigurationParameter)
aConfigurationParameter
- the Configuration Parameter to remove (must be == with an ConfigurationParameter in
this collection, or this method will do nothing).UIMA_UnsupportedOperationException
- if this object is not modifiableString getDefaultGroupName()
configuration groups
.void setDefaultGroupName(String aGroupName)
configuration groups
.aGroupName
- the name of the default configuration groupString getSearchStrategy()
void setSearchStrategy(String aStrategy)
aStrategy
- the configuration parameter search strategyConfigurationParameter getConfigurationParameter(String aGroupName, String aParamName)
aGroupName
- the name of a group, or null
for no groupaParamName
- the name of the parameternull
if it does not existConfigurationGroup[] getConfigurationGroupDeclarations(String aGroupName)
aGroupName
- the name of a groupaGroupName
.
If there are no such groups, an empty array is returned.Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.