Package org.onosproject.cfg
Interface ComponentConfigService
-
public interface ComponentConfigService
Service for tracking system-wide configurations for various software components.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.Set<java.lang.String>
getComponentNames()
Returns names of all components that have registered their configuration properties.java.util.Set<ConfigProperty>
getProperties(java.lang.String componentName)
Returns configuration properties of the named components.ConfigProperty
getProperty(java.lang.String componentName, java.lang.String attribute)
Returns configuration property of the named components.void
preSetProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)
Presets the value of the specified configuration property, regardless of the component's state.void
preSetProperty(java.lang.String componentName, java.lang.String name, java.lang.String value, boolean override)
Presets the value of the specified configuration property, regardless of the component's state.void
registerProperties(java.lang.Class<?> componentClass)
Registers configuration properties for the specified component.void
setProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)
Sets the value of the specified configuration property.void
unregisterProperties(java.lang.Class<?> componentClass, boolean clear)
Unregisters configuration properties for the specified component.void
unsetProperty(java.lang.String componentName, java.lang.String name)
Clears the value of the specified configuration property thus making the property take on its default value.
-
-
-
Method Detail
-
getComponentNames
java.util.Set<java.lang.String> getComponentNames()
Returns names of all components that have registered their configuration properties.- Returns:
- set of component names
-
registerProperties
void registerProperties(java.lang.Class<?> componentClass)
Registers configuration properties for the specified component.- Parameters:
componentClass
- class of configurable component
-
unregisterProperties
void unregisterProperties(java.lang.Class<?> componentClass, boolean clear)
Unregisters configuration properties for the specified component.- Parameters:
componentClass
- class of configurable componentclear
- true indicates any settings should be cleared
-
getProperties
java.util.Set<ConfigProperty> getProperties(java.lang.String componentName)
Returns configuration properties of the named components.- Parameters:
componentName
- component name- Returns:
- set of configuration properties
-
setProperty
void setProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)
Sets the value of the specified configuration property.- Parameters:
componentName
- component namename
- property namevalue
- new property value
-
preSetProperty
void preSetProperty(java.lang.String componentName, java.lang.String name, java.lang.String value)
Presets the value of the specified configuration property, regardless of the component's state.- Parameters:
componentName
- component namename
- property namevalue
- new property value
-
preSetProperty
void preSetProperty(java.lang.String componentName, java.lang.String name, java.lang.String value, boolean override)
Presets the value of the specified configuration property, regardless of the component's state.- Parameters:
componentName
- component namename
- property namevalue
- new property valueoverride
- true to override even if the property has been set to other value
-
unsetProperty
void unsetProperty(java.lang.String componentName, java.lang.String name)
Clears the value of the specified configuration property thus making the property take on its default value.- Parameters:
componentName
- component namename
- property name
-
getProperty
ConfigProperty getProperty(java.lang.String componentName, java.lang.String attribute)
Returns configuration property of the named components.- Parameters:
componentName
- component nameattribute
- component attribute- Returns:
- configuration property
-
-