Class PropertyConfigurationController
- java.lang.Object
-
- com.inductiveautomation.ignition.common.config.PropertyConfigurationController
-
- Direct Known Subclasses:
TagEditController
public class PropertyConfigurationController extends java.lang.Object
This class combines a mutable property set (the "target"), with a ConfigurationPropertyModel (which dictates what changes are allowed to be made) along with particular information about the state of editing- is this an intersection? A new propertyset? An inherited property set? All of these things have implications for the editing UI that we show, but we don't want to try to figure them out based on the nature of the target. Also, the target is expected to be a PropertySetConfig. This is a structure that combines the source and an edit, that can be applied or not. It supports rolling back edits of single properties, which is necessary for intersection.
-
-
Constructor Summary
Constructors Constructor Description PropertyConfigurationController(PropertySet target)
PropertyConfigurationController(PropertySet target, ConfigurationPropertyModel model)
PropertyConfigurationController(PropertySet target, ConfigurationPropertyModel model, boolean isIntersection, boolean isExtension)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
commitChanges()
Applies any outstanding changes to the underlying source.void
discardChanges()
java.lang.String[]
getBindables()
PropertySet
getContextProperties()
Context properties are those that depend on the type of object being edited.ConfigurationPropertyModel
getModel()
PropertySet
getTarget()
boolean
isInherited()
Returns whether this tag is inherited from a parent type.boolean
isIntersection()
Indicates the target is an intersection of multiple tags.boolean
isPropertyExtended(Property<?> prop)
boolean
isPropertyInherited(Property<?> prop)
boolean
isPropertyModified(Property<?> prop)
Returns whether the property has been modified.void
revertProperty(Property<?> prop)
Reverts the property value.boolean
supportsBindings()
-
-
-
Constructor Detail
-
PropertyConfigurationController
public PropertyConfigurationController(PropertySet target)
-
PropertyConfigurationController
public PropertyConfigurationController(PropertySet target, ConfigurationPropertyModel model)
-
PropertyConfigurationController
public PropertyConfigurationController(PropertySet target, ConfigurationPropertyModel model, boolean isIntersection, boolean isExtension)
-
-
Method Detail
-
getModel
public ConfigurationPropertyModel getModel()
-
getTarget
public PropertySet getTarget()
-
isIntersection
public boolean isIntersection()
Indicates the target is an intersection of multiple tags.
-
isInherited
public boolean isInherited()
Returns whether this tag is inherited from a parent type. This indicates that any settings would be considered overrides, not source values.
-
isPropertyInherited
public boolean isPropertyInherited(Property<?> prop)
-
isPropertyExtended
public boolean isPropertyExtended(Property<?> prop)
-
isPropertyModified
public boolean isPropertyModified(Property<?> prop)
Returns whether the property has been modified. Currently only works if target is a PropertySetConfig.
-
revertProperty
public void revertProperty(Property<?> prop)
Reverts the property value. Currently only works if target is a PropertySetConfig.
-
commitChanges
public void commitChanges()
Applies any outstanding changes to the underlying source.
-
discardChanges
public void discardChanges()
-
supportsBindings
public boolean supportsBindings()
-
getBindables
public java.lang.String[] getBindables()
-
getContextProperties
public PropertySet getContextProperties()
Context properties are those that depend on the type of object being edited. For example, the path of the tag might be in this, or the UUID of the target object.
-
-