public class BasicMutableConfigurationPropertyModel extends BasicConfigurationPropertyModel implements MutableConfigurationPropertyModel
Modifier and Type | Class and Description |
---|---|
protected class |
BasicMutableConfigurationPropertyModel.ClassifiedProperties<T> |
BasicConfigurationPropertyModel.DefaultRankedProperty, BasicConfigurationPropertyModel.InternalProperty<T>, BasicConfigurationPropertyModel.RankedProperty
EMPTY_MODEL
Constructor and Description |
---|
BasicMutableConfigurationPropertyModel() |
Modifier and Type | Method and Description |
---|---|
void |
addClassifiedProperties(java.lang.String classification,
Property<?> prop,
java.util.Collection<Property<?>> properties)
Registers a set of properties that would be available for a given value of a certain classification.
|
<T> void |
addClassifiedValue(java.lang.String classification,
Property<T> keyProp,
T value)
This is where we associate a particular value with a certain classification.
|
<T> void |
addDependantProperties(Property<T> prop,
java.util.Collection<T> values,
java.util.Collection<Property<?>> properties)
Same as single-value registerDependentProperties, but when multiple values are valid.
|
<T> void |
addDependantProperties(Property<T> prop,
T value,
java.util.Collection<Property<?>> properties)
Registers properties that are only available if the specified property is equal to the given value.
|
void |
addProperties(java.util.Collection<Property<?>> properties)
Registers properties that are always editable.
|
long |
getCurrentModelVersion()
Returns the current model version, incremented when the model is changed.
|
ConfigurationPropertyModel |
getModelSnapshot()
Returns a serializable, non-mutable version of the model appropriate for sending to the designer or remote
gateways.
|
protected void |
incrementModelVersion() |
void |
markImmutable(Property<?> property)
This effectively excludes a property from ever being "applicable".
|
static BasicMutableConfigurationPropertyModel |
of(java.util.Collection<Property<?>> props) |
static BasicMutableConfigurationPropertyModel |
of(Property<?>... props) |
<T> void |
registerAllowedValues(Property<T> property,
java.util.List<T> values)
Registers a set of allowed values for the given property.
|
void |
removeClassifiedProperties(java.lang.String classification,
Property<?> keyProp) |
<T> void |
removeClassifiedValue(java.lang.String classification,
Property<T> keyProp,
T value) |
<T> void |
removeDependantProperties(Property<T> prop,
T value)
Removes all dependant properties for the given value.
|
void |
removeProperties(java.util.Collection<Property<?>> properties)
Unregisters tag properties.
|
<T> void |
setAllowedValues(Property<T> property,
java.util.List<T> values)
Registers a set of allowed values for the given property.
|
compareRankedProperties, connectDependency, contains, getAffectedProperties, getAllowedValues, getApplicableProperties, getModelProperties, isApplicable, isModelProperty, mergeTo, p, resolve
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addDependantProperties, addProperties, removeProperties
contains, getAffectedProperties, getAllowedValues, getApplicableProperties, getModelProperties, isApplicable, isModelProperty, mergeTo
resolve
public BasicMutableConfigurationPropertyModel()
public long getCurrentModelVersion()
ConfigurationPropertyModel
getCurrentModelVersion
in interface ConfigurationPropertyModel
getCurrentModelVersion
in class BasicConfigurationPropertyModel
protected void incrementModelVersion()
public ConfigurationPropertyModel getModelSnapshot()
MutableConfigurationPropertyModel
getModelSnapshot
in interface MutableConfigurationPropertyModel
public static BasicMutableConfigurationPropertyModel of(java.util.Collection<Property<?>> props)
public static BasicMutableConfigurationPropertyModel of(Property<?>... props)
public void markImmutable(Property<?> property)
MutableConfigurationPropertyModel
markImmutable
in interface MutableConfigurationPropertyModel
public void addProperties(java.util.Collection<Property<?>> properties)
MutableConfigurationPropertyModel
addProperties
in interface MutableConfigurationPropertyModel
public void removeProperties(java.util.Collection<Property<?>> properties)
MutableConfigurationPropertyModel
removeProperties
in interface MutableConfigurationPropertyModel
public <T> void registerAllowedValues(Property<T> property, java.util.List<T> values)
MutableConfigurationPropertyModel
registerAllowedValues
in interface MutableConfigurationPropertyModel
public <T> void setAllowedValues(Property<T> property, java.util.List<T> values)
MutableConfigurationPropertyModel
setAllowedValues
in interface MutableConfigurationPropertyModel
public <T> void addDependantProperties(Property<T> prop, T value, java.util.Collection<Property<?>> properties)
MutableConfigurationPropertyModel
addDependantProperties
in interface MutableConfigurationPropertyModel
public <T> void addDependantProperties(Property<T> prop, java.util.Collection<T> values, java.util.Collection<Property<?>> properties)
MutableConfigurationPropertyModel
addDependantProperties
in interface MutableConfigurationPropertyModel
public <T> void removeDependantProperties(Property<T> prop, T value)
MutableConfigurationPropertyModel
removeDependantProperties
in interface MutableConfigurationPropertyModel
public void addClassifiedProperties(java.lang.String classification, Property<?> prop, java.util.Collection<Property<?>> properties)
MutableConfigurationPropertyModel
addClassifiedProperties
in interface MutableConfigurationPropertyModel
public <T> void addClassifiedValue(java.lang.String classification, Property<T> keyProp, T value)
addClassifiedValue
in interface MutableConfigurationPropertyModel
public void removeClassifiedProperties(java.lang.String classification, Property<?> keyProp)
removeClassifiedProperties
in interface MutableConfigurationPropertyModel
public <T> void removeClassifiedValue(java.lang.String classification, Property<T> keyProp, T value)
removeClassifiedValue
in interface MutableConfigurationPropertyModel