Package de.fzi.power.ui.adapters
Class NestedPropertyConfigurableConfiguration
- java.lang.Object
-
- org.palladiosimulator.commons.designpatterns.AbstractObservable<org.palladiosimulator.edp2.datastream.configurable.IPropertyListener>
-
- org.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
- de.fzi.power.ui.adapters.NestedPropertyConfigurableConfiguration
-
- All Implemented Interfaces:
IAdaptable
,org.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.edp2.datastream.configurable.IPropertyListener>
,org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
,org.palladiosimulator.edp2.datastream.configurable.IPropertyListener
public class NestedPropertyConfigurableConfiguration extends org.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable implements org.palladiosimulator.edp2.datastream.configurable.IPropertyListener
This class allows to combine the setting of multipleIPropertyConfigurable
using one dynamic properties map. Currently it is not supported for two nestedPropertyConfigurable
to declare properties if the same name.
-
-
Constructor Summary
Constructors Constructor Description NestedPropertyConfigurableConfiguration(Set<? extends org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable> configurables)
Instantiates a new nested property configurable configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addObserver(org.palladiosimulator.edp2.datastream.configurable.IPropertyListener observer)
With the current implementation of this PropertyConfigurable it is only possible to be notified on changes applied to this nested configurable.Object
getAdapter(Class adapter)
Map<String,Object>
getDefaultConfiguration()
Set<String>
getKeys()
Map<String,Object>
getProperties()
Class<?>
getPropertyType(String key)
boolean
isPropertyNotSet(String key)
void
propertyChangeCompleted()
void
propertyChanged(String key, Object oldValue, Object newValue)
void
setProperties(Map<String,Object> properties)
void
unsetProperty(String key)
-
Methods inherited from class org.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
getNotSetConstant
-
-
-
-
Constructor Detail
-
NestedPropertyConfigurableConfiguration
public NestedPropertyConfigurableConfiguration(Set<? extends org.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable> configurables)
Instantiates a new nested property configurable configuration.- Parameters:
the
- set of nestedIPropertyConfigurable
-
-
Method Detail
-
getPropertyType
public Class<?> getPropertyType(String key)
- Specified by:
getPropertyType
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
-
getDefaultConfiguration
public Map<String,Object> getDefaultConfiguration()
- Specified by:
getDefaultConfiguration
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Specified by:
getDefaultConfiguration
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
getKeys
public Set<String> getKeys()
- Specified by:
getKeys
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Specified by:
getKeys
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
getProperties
public Map<String,Object> getProperties()
- Specified by:
getProperties
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Overrides:
getProperties
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
setProperties
public void setProperties(Map<String,Object> properties)
- Specified by:
setProperties
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Overrides:
setProperties
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
isPropertyNotSet
public boolean isPropertyNotSet(String key)
- Specified by:
isPropertyNotSet
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Overrides:
isPropertyNotSet
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
unsetProperty
public void unsetProperty(String key)
- Specified by:
unsetProperty
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyConfigurable
- Overrides:
unsetProperty
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
getAdapter
public Object getAdapter(Class adapter)
- Specified by:
getAdapter
in interfaceIAdaptable
- Overrides:
getAdapter
in classorg.palladiosimulator.edp2.datastream.configurable.PropertyConfigurable
-
addObserver
public void addObserver(org.palladiosimulator.edp2.datastream.configurable.IPropertyListener observer)
With the current implementation of this PropertyConfigurable it is only possible to be notified on changes applied to this nested configurable. To be notified upon changes made to the nested properties direclty a listener has to be attached to the nestedPropertyConfigurable
.- Specified by:
addObserver
in interfaceorg.palladiosimulator.commons.designpatterns.IAbstractObservable<org.palladiosimulator.edp2.datastream.configurable.IPropertyListener>
- Overrides:
addObserver
in classorg.palladiosimulator.commons.designpatterns.AbstractObservable<org.palladiosimulator.edp2.datastream.configurable.IPropertyListener>
-
propertyChanged
public void propertyChanged(String key, Object oldValue, Object newValue)
- Specified by:
propertyChanged
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyListener
-
propertyChangeCompleted
public void propertyChangeCompleted()
- Specified by:
propertyChangeCompleted
in interfaceorg.palladiosimulator.edp2.datastream.configurable.IPropertyListener
-
-