public class BasicConfigurationPropertyModel extends java.lang.Object implements ConfigurationPropertyModel
| Modifier and Type | Class and Description |
|---|---|
protected class |
BasicConfigurationPropertyModel.DefaultRankedProperty |
protected class |
BasicConfigurationPropertyModel.InternalProperty<T> |
protected static interface |
BasicConfigurationPropertyModel.RankedProperty |
EMPTY_MODEL| Modifier | Constructor and Description |
|---|---|
|
BasicConfigurationPropertyModel(long version) |
protected |
BasicConfigurationPropertyModel(long version,
java.util.Map<Property<?>,BasicConfigurationPropertyModel.InternalProperty> properties)
Used for cloning
|
|
BasicConfigurationPropertyModel(PropertySet propertySet)
Creates a simple model off of the properties contained in the propertyset.
|
| Modifier and Type | Method and Description |
|---|---|
protected int |
compareRankedProperties(BasicConfigurationPropertyModel.RankedProperty a,
BasicConfigurationPropertyModel.RankedProperty b) |
protected <T> void |
connectDependency(BasicConfigurationPropertyModel.InternalProperty<T> owner,
T value,
BasicConfigurationPropertyModel.InternalProperty<?> child) |
boolean |
contains(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.
|
long |
getCurrentModelVersion()
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.
|
boolean |
isApplicable(PropertySet config,
Property<?> property)
Returns whether a property is relevant given the current configuration.
|
boolean |
isModelProperty(Property<?> property)
Returns true if this is a property that is contained in the Model Properties.
|
void |
mergeTo(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.
|
public BasicConfigurationPropertyModel(long version)
public BasicConfigurationPropertyModel(PropertySet propertySet)
propertySet - the collection of properties to register.protected BasicConfigurationPropertyModel(long version,
java.util.Map<Property<?>,BasicConfigurationPropertyModel.InternalProperty> properties)
public long getCurrentModelVersion()
ConfigurationPropertyModelgetCurrentModelVersion in interface ConfigurationPropertyModelprotected <T> BasicConfigurationPropertyModel.InternalProperty<T> p(Property<T> prop)
public java.util.List<Property<?>> getApplicableProperties(PropertySet config)
ConfigurationPropertyModelgetApplicableProperties in interface ConfigurationPropertyModelpublic boolean isApplicable(PropertySet config, Property<?> property)
ConfigurationPropertyModelisApplicable in interface ConfigurationPropertyModelpublic java.util.Set<Property<?>> getAffectedProperties(Property<?> p)
ConfigurationPropertyModelgetAffectedProperties in interface ConfigurationPropertyModelpublic <T> java.util.Optional<java.util.Collection<T>> getAllowedValues(Property<T> p)
ConfigurationPropertyModelgetAllowedValues in interface ConfigurationPropertyModelpublic Property<?> resolve(java.lang.String id)
PropertyResolverresolve in interface PropertyResolverpublic boolean contains(Property<?> property)
ConfigurationPropertyModelcontains in interface ConfigurationPropertyModelpublic java.util.Set<Property<?>> getModelProperties()
ConfigurationPropertyModelgetModelProperties in interface ConfigurationPropertyModelpublic boolean isModelProperty(Property<?> property)
ConfigurationPropertyModelisModelProperty in interface ConfigurationPropertyModelpublic void mergeTo(MutableConfigurationPropertyModel target)
ConfigurationPropertyModelmergeTo in interface ConfigurationPropertyModelprotected <T> void connectDependency(BasicConfigurationPropertyModel.InternalProperty<T> owner, T value, BasicConfigurationPropertyModel.InternalProperty<?> child)
protected int compareRankedProperties(BasicConfigurationPropertyModel.RankedProperty a, BasicConfigurationPropertyModel.RankedProperty b)