Class BasicConfigurationPropertyModel
- java.lang.Object
- 
- com.inductiveautomation.ignition.common.config.BasicConfigurationPropertyModel
 
- 
- All Implemented Interfaces:
- ConfigurationPropertyModel,- PropertyResolver,- java.io.Serializable
 - Direct Known Subclasses:
- BasicMutableConfigurationPropertyModel
 
 public class BasicConfigurationPropertyModel extends java.lang.Object implements ConfigurationPropertyModel - See Also:
- Serialized Form
 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description protected classBasicConfigurationPropertyModel.DefaultRankedPropertyprotected classBasicConfigurationPropertyModel.InternalProperty<T>protected static interfaceBasicConfigurationPropertyModel.RankedProperty
 - 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.util.Set>resources- 
Fields inherited from interface com.inductiveautomation.ignition.common.config.ConfigurationPropertyModelEMPTY_MODEL
 
- 
 - 
Constructor SummaryConstructors Modifier Constructor Description BasicConfigurationPropertyModel(long version)protectedBasicConfigurationPropertyModel(long version, java.util.Map<Property<?>,BasicConfigurationPropertyModel.InternalProperty> properties)Used for cloningBasicConfigurationPropertyModel(PropertySet propertySet)Creates a simple model off of the properties contained in the propertyset.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intcompareRankedProperties(BasicConfigurationPropertyModel.RankedProperty a, BasicConfigurationPropertyModel.RankedProperty b)protected <T> voidconnectDependency(BasicConfigurationPropertyModel.InternalProperty<T> owner, T value, BasicConfigurationPropertyModel.InternalProperty<?> child)booleancontains(Property<?> property)Returns whether this property is contained in the model at all.java.util.Set<Property<?>>getAffectedProperties(Property<?> p)Called after editing the given property, this returns the props whose isRelevant/isEditable should be called.<T> java.util.Optional<java.util.Collection<T>>getAllowedValues(Property<T> p)If the range of allowed properties is restricted, this will return the valid values.java.util.List<Property<?>>getApplicableProperties(PropertySet config)Given the current config, returns the properties that should be displayed.longgetCurrentModelVersion()Returns the current model version, incremented when the model is changed.java.util.Set<Property<?>>getModelProperties()Returns properties that are in some way registered with the model.protected java.util.SetgetResourceValues(java.lang.String id)booleanisApplicable(PropertySet config, Property<?> property)Returns whether a property is relevant given the current configuration.booleanisCustomizable(Property<?> property)Returns whether a property that has allowed values defined also allows custom values.booleanisModelProperty(Property<?> property)Returns true if this is a property that is contained in the Model Properties.voidmergeTo(MutableConfigurationPropertyModel target)Takes the traits of this configuration prop model and puts them in the target model.protected <T> BasicConfigurationPropertyModel.InternalProperty<T>p(Property<T> prop)Property<?>resolve(java.lang.String id)Returns the property represented by the id, or null if the property cannot be found.
 
- 
- 
- 
Constructor Detail- 
BasicConfigurationPropertyModelpublic BasicConfigurationPropertyModel(long version) 
 - 
BasicConfigurationPropertyModelpublic BasicConfigurationPropertyModel(PropertySet propertySet) Creates a simple model off of the properties contained in the propertyset.- Parameters:
- propertySet- the collection of properties to register.
 
 - 
BasicConfigurationPropertyModelprotected BasicConfigurationPropertyModel(long version, java.util.Map<Property<?>,BasicConfigurationPropertyModel.InternalProperty> properties)Used for cloning
 
- 
 - 
Method Detail- 
getCurrentModelVersionpublic long getCurrentModelVersion() Description copied from interface:ConfigurationPropertyModelReturns the current model version, incremented when the model is changed.- Specified by:
- getCurrentModelVersionin interface- ConfigurationPropertyModel
 
 - 
pprotected <T> BasicConfigurationPropertyModel.InternalProperty<T> p(Property<T> prop) 
 - 
getApplicablePropertiespublic java.util.List<Property<?>> getApplicableProperties(PropertySet config) Description copied from interface:ConfigurationPropertyModelGiven 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:
- getApplicablePropertiesin interface- ConfigurationPropertyModel
 
 - 
isApplicablepublic boolean isApplicable(PropertySet config, Property<?> property) Description copied from interface:ConfigurationPropertyModelReturns whether a property is relevant given the current configuration.- Specified by:
- isApplicablein interface- ConfigurationPropertyModel
 
 - 
getAffectedPropertiespublic java.util.Set<Property<?>> getAffectedProperties(Property<?> p) Description copied from interface:ConfigurationPropertyModelCalled 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:
- getAffectedPropertiesin interface- ConfigurationPropertyModel
 
 - 
getAllowedValuespublic <T> java.util.Optional<java.util.Collection<T>> getAllowedValues(Property<T> p) Description copied from interface:ConfigurationPropertyModelIf 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:
- getAllowedValuesin interface- ConfigurationPropertyModel
 
 - 
resolvepublic Property<?> resolve(java.lang.String id) Description copied from interface:PropertyResolverReturns the property represented by the id, or null if the property cannot be found.- Specified by:
- resolvein interface- PropertyResolver
 
 - 
containspublic boolean contains(Property<?> property) Description copied from interface:ConfigurationPropertyModelReturns 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:
- containsin interface- ConfigurationPropertyModel
 
 - 
getModelPropertiespublic java.util.Set<Property<?>> getModelProperties() Description copied from interface:ConfigurationPropertyModelReturns 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:
- getModelPropertiesin interface- ConfigurationPropertyModel
 
 - 
isModelPropertypublic boolean isModelProperty(Property<?> property) Description copied from interface:ConfigurationPropertyModelReturns true if this is a property that is contained in the Model Properties.- Specified by:
- isModelPropertyin interface- ConfigurationPropertyModel
 
 - 
isCustomizablepublic boolean isCustomizable(Property<?> property) Description copied from interface:ConfigurationPropertyModelReturns whether a property that has allowed values defined also allows custom values.- Specified by:
- isCustomizablein interface- ConfigurationPropertyModel
 
 - 
mergeTopublic void mergeTo(MutableConfigurationPropertyModel target) Description copied from interface:ConfigurationPropertyModelTakes the traits of this configuration prop model and puts them in the target model.- Specified by:
- mergeToin interface- ConfigurationPropertyModel
 
 - 
connectDependencyprotected <T> void connectDependency(BasicConfigurationPropertyModel.InternalProperty<T> owner, T value, BasicConfigurationPropertyModel.InternalProperty<?> child) 
 - 
getResourceValuesprotected java.util.Set getResourceValues(java.lang.String id) 
 - 
compareRankedPropertiesprotected int compareRankedProperties(BasicConfigurationPropertyModel.RankedProperty a, BasicConfigurationPropertyModel.RankedProperty b) 
 
- 
 
-