Class BasicConfigurationPropertyModel
java.lang.Object
com.inductiveautomation.ignition.common.config.BasicConfigurationPropertyModel
- All Implemented Interfaces:
ConfigurationPropertyModel
,PropertyResolver
,Serializable
- Direct Known Subclasses:
BasicMutableConfigurationPropertyModel
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
protected class
protected static interface
-
Field Summary
FieldsFields inherited from interface com.inductiveautomation.ignition.common.config.ConfigurationPropertyModel
EMPTY_MODEL
-
Constructor Summary
ConstructorsModifierConstructorDescriptionBasicConfigurationPropertyModel
(long version) protected
BasicConfigurationPropertyModel
(long version, Map<Property<?>, BasicConfigurationPropertyModel.InternalProperty> properties) Used for cloningBasicConfigurationPropertyModel
(PropertySet propertySet) Creates a simple model off of the properties contained in the propertyset. -
Method Summary
Modifier and TypeMethodDescriptionprotected int
compareRankedProperties
(BasicConfigurationPropertyModel.RankedProperty a, BasicConfigurationPropertyModel.RankedProperty b) protected <T> void
connectDependency
(BasicConfigurationPropertyModel.InternalProperty<T> owner, T value, BasicConfigurationPropertyModel.InternalProperty<?> child) boolean
Returns whether this property is contained in the model at all.boolean
True if the ConfigurationPropertyModel contains all the properties and allowed values of the targetCalled after editing the given property, this returns the props whose isRelevant/isEditable should be called.<T> Optional<Collection<T>>
getAllowedValues
(Property<T> p) If the range of allowed properties is restricted, this will return the valid values.getApplicableProperties
(PropertySet config) Given the current config, returns the properties that should be displayed.long
Returns the current model version, incremented when the model is changed.Returns properties that are in some way registered with the model.protected Set
boolean
isApplicable
(PropertySet config, Property<?> property) Returns whether a property is relevant given the current configuration.boolean
isCustomizable
(Property<?> property) Returns whether a property that has allowed values defined also allows custom values.boolean
isModelProperty
(Property<?> property) Returns true if this is a property that is contained in the Model Properties.void
Takes the traits of this configuration prop model and puts them in the target model.protected <T> BasicConfigurationPropertyModel.InternalProperty<T>
Property<?>
Returns the property represented by the id, or null if the property cannot be found.
-
Field Details
-
resources
-
-
Constructor Details
-
BasicConfigurationPropertyModel
public BasicConfigurationPropertyModel(long version) -
BasicConfigurationPropertyModel
Creates a simple model off of the properties contained in the propertyset.- Parameters:
propertySet
- the collection of properties to register.
-
BasicConfigurationPropertyModel
protected BasicConfigurationPropertyModel(long version, Map<Property<?>, BasicConfigurationPropertyModel.InternalProperty> properties) Used for cloning
-
-
Method Details
-
getCurrentModelVersion
public long getCurrentModelVersion()Description copied from interface:ConfigurationPropertyModel
Returns the current model version, incremented when the model is changed.- Specified by:
getCurrentModelVersion
in interfaceConfigurationPropertyModel
-
p
-
getApplicableProperties
Description copied from interface:ConfigurationPropertyModel
Given the current config, returns the properties that should be displayed. There is no need to call isApplicable for each, as that would be true. The properties are returned in desired display order.- Specified by:
getApplicableProperties
in interfaceConfigurationPropertyModel
-
isApplicable
Description copied from interface:ConfigurationPropertyModel
Returns whether a property is relevant given the current configuration.- Specified by:
isApplicable
in interfaceConfigurationPropertyModel
-
getAffectedProperties
Description copied from interface:ConfigurationPropertyModel
Called after editing the given property, this returns the props whose isRelevant/isEditable should be called. The result of those calls means that properties might be added or removed to the editable property list.- Specified by:
getAffectedProperties
in interfaceConfigurationPropertyModel
-
getAllowedValues
Description copied from interface:ConfigurationPropertyModel
If the range of allowed properties is restricted, this will return the valid values. Otherwise it will return Optional.empty, in which case the editor should be built based on the property type.- Specified by:
getAllowedValues
in interfaceConfigurationPropertyModel
-
resolve
Description copied from interface:PropertyResolver
Returns the property represented by the id, or null if the property cannot be found.- Specified by:
resolve
in interfacePropertyResolver
-
contains
Description copied from interface:ConfigurationPropertyModel
Returns whether this property is contained in the model at all. Does not indicate whether it would be applicable to the current config or not.- Specified by:
contains
in interfaceConfigurationPropertyModel
-
getModelProperties
Description copied from interface:ConfigurationPropertyModel
Returns properties that are in some way registered with the model. Any property in a PropertySet that is not in this Set is a custom property.- Specified by:
getModelProperties
in interfaceConfigurationPropertyModel
-
isModelProperty
Description copied from interface:ConfigurationPropertyModel
Returns true if this is a property that is contained in the Model Properties.- Specified by:
isModelProperty
in interfaceConfigurationPropertyModel
-
isCustomizable
Description copied from interface:ConfigurationPropertyModel
Returns whether a property that has allowed values defined also allows custom values.- Specified by:
isCustomizable
in interfaceConfigurationPropertyModel
-
mergeTo
Description copied from interface:ConfigurationPropertyModel
Takes the traits of this configuration prop model and puts them in the target model.- Specified by:
mergeTo
in interfaceConfigurationPropertyModel
-
containsAll
Description copied from interface:ConfigurationPropertyModel
True if the ConfigurationPropertyModel contains all the properties and allowed values of the target- Specified by:
containsAll
in interfaceConfigurationPropertyModel
-
connectDependency
protected <T> void connectDependency(BasicConfigurationPropertyModel.InternalProperty<T> owner, T value, BasicConfigurationPropertyModel.InternalProperty<?> child) -
getResourceValues
-
compareRankedProperties
protected int compareRankedProperties(BasicConfigurationPropertyModel.RankedProperty a, BasicConfigurationPropertyModel.RankedProperty b)
-