|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.deduced.AbstractPropertyCollection<K,V>
org.deduced.FixedPropertyInstanceCollection<java.lang.Object,java.lang.Object>
org.deduced.controller.implementation.PropertyControllerModelImplementation
org.deduced.controller.implementation.DirectPropertyController
public class DirectPropertyController
Title: DirectPropertyController
Description: DirectPropertyController is used to control a property directly in memory.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.deduced.AbstractPropertyCollection |
---|
AbstractPropertyCollection.CollectionToDeleteMonitor |
Field Summary | |
---|---|
private DeducedControllerLayerExtension |
controlLayer
control layer |
private static long |
serialVersionUID
serial ID |
Fields inherited from class org.deduced.controller.implementation.PropertyControllerModelImplementation |
---|
KEY_SET |
Fields inherited from class org.deduced.AbstractPropertyCollection |
---|
CHECK_DELETE_MODE_AUTOMATIC, CHECK_DELETE_MODE_MANUAL, COLLECTION_TO_DELETE |
Fields inherited from interface org.deduced.controller.PropertyControllerModel |
---|
CONTROLLED_COLLECTION_INSTANCE, CONTROLLED_PROPERTY_INSTANCE_INSTANCE, CONTROLLED_PROPERTY_VALUE_TYPE_INSTANCE, IS_CHANGEABLE_INSTANCE, IS_REMOVABLE_INSTANCE, PROPERTY_CONTROLLER_MODEL_TYPE, PROPERTY_KEY_INSTANCE, PROPERTY_VALUE_INSTANCE |
Fields inherited from interface org.deduced.NamedPropertyCollection |
---|
NAME_INSTANCE, NAMED_PROPERTY_COLLECTION_TYPE |
Fields inherited from interface org.deduced.PropertyCollection |
---|
PROPERTY_COLLECTION_TYPE |
Constructor Summary | |
---|---|
DirectPropertyController(DeducedControllerLayerExtension setControlLayer)
DirectPropertyController Constructor |
Method Summary | |
---|---|
private void |
addControlledCollectionListener()
add Controlled Collection Listener |
static Task |
baseCreateAndSetControlledProperty(PropertyCollection<?,?> createType,
boolean deletePreviousValue,
PropertyController controller)
base Create And Set Controlled Property |
static Task |
baseRemoveControlledProperty(boolean deletePreviousValue,
PropertyController controller)
base Remove Controlled Property |
static Task |
baseSetControlledProperty(java.lang.Object value,
boolean deletePreviousValue,
PropertyController controller,
ModelFactory validatorFactory)
base Set Controlled Property |
static void |
baseUpdateValue(PropertyController controller)
base Update Value of the monitored property |
Task |
createAndSetControlledProperty(PropertyCollection<?,?> createType,
boolean deletePreviousValue)
(non-Javadoc) |
void |
delete()
(non-Javadoc) |
DeducedControllerLayerExtension |
getControlLayer()
getControlLayer |
boolean |
isNewValueValid(java.lang.Object newValue,
boolean validateParent)
(non-Javadoc) |
void |
propertyChanged(PropertyChangeEvent<?,?> event)
(non-Javadoc) |
private void |
removeControlledCollectionListener()
remove Controlled Collection Listener |
Task |
removeControlledProperty(boolean deletePreviousValue)
(non-Javadoc) |
PropertyCollection |
setControlledCollection(PropertyCollection setControlledCollection)
(non-Javadoc) |
Task |
setControlledProperty(java.lang.Object value,
boolean deletePreviousValue)
(non-Javadoc) |
java.lang.Object |
setPropertyKey(java.lang.Object setPropertyKey)
(non-Javadoc) |
private void |
updateValue()
update the Value of the monitored property |
static void |
validatePropertyUpdate(PropertyCollection<?,?> changedCollection,
java.lang.Object newValue,
ModelFactory modelFactory,
PropertyCollection<?,?> controlledPropertyInstance,
boolean validateParent)
validate Property Update |
Methods inherited from class org.deduced.FixedPropertyInstanceCollection |
---|
addProperty, areKeysAssignedAutomatically, containsKey, getProperty, iterator, iteratorByValue, removeProperty, removePropertyInstance, removePropertyValue, size |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.deduced.controller.PropertyControllerModel |
---|
getControlledCollection, getControlledPropertyInstance, getControlledPropertyValueType, getPropertyKey, getPropertyValue, isChangeable, isRemovable, setControlledPropertyInstance, setControlledPropertyValueType, setIsChangeable, setIsRemovable, setPropertyValue |
Methods inherited from interface org.deduced.NamedPropertyCollection |
---|
getName, setName |
Methods inherited from interface org.deduced.PropertyCollection |
---|
activate, addListener, addProperty, areKeysAssignedAutomatically, asKeySet, asPropertyList, asPropertyMap, asValueList, asValueMap, clear, clone, containsInstance, containsKey, containsValue, getFixedInstance, getProperty, getPropertyValue, id, instanceKey, invokeAction, isActivated, isEmpty, isListenerRegistered, iterator, iteratorByValue, keyOnParent, parent, removeListener, removeProperty, removePropertyInstance, removePropertyValue, setFixedInstance, setParent, setProperty, size, type, valueKey |
Field Detail |
---|
private DeducedControllerLayerExtension controlLayer
private static final long serialVersionUID
Constructor Detail |
---|
public DirectPropertyController(DeducedControllerLayerExtension setControlLayer)
setControlLayer
- control layer to useMethod Detail |
---|
public DeducedControllerLayerExtension getControlLayer()
public Task setControlledProperty(java.lang.Object value, boolean deletePreviousValue)
setControlledProperty
in interface PropertyController
value
- the new valuedeletePreviousValue
- option to delete the previous value in the
property. This option only has effect if the property contains
a property collection and the property isn't a reference. It
will call delete on the previous value.
PropertyController.setControlledProperty(java.lang.Object,
boolean)
public static Task baseSetControlledProperty(java.lang.Object value, boolean deletePreviousValue, PropertyController controller, ModelFactory validatorFactory)
value
- new value for the propertydeletePreviousValue
- option to delete the previous value. Only
applies to values of the property collection type that are
owned by value.controller
- the property controllervalidatorFactory
- the model factory for validation
public Task removeControlledProperty(boolean deletePreviousValue)
removeControlledProperty
in interface PropertyController
deletePreviousValue
- option to delete the value in the property. This
option only has effect if the property contains a property
collection and the property isn't a reference. It will call
delete on the previous value.
PropertyController.removeControlledProperty(boolean)
public static Task baseRemoveControlledProperty(boolean deletePreviousValue, PropertyController controller)
deletePreviousValue
- option to delete the previous valuecontroller
- the controller of the property to remove
public PropertyCollection setControlledCollection(PropertyCollection setControlledCollection)
setControlledCollection
in interface PropertyControllerModel
setControlledCollection
in class PropertyControllerModelImplementation
setControlledCollection
- new controlled collection
PropertyControllerModel.setControlledCollection(org.deduced.PropertyCollection)
private void updateValue()
public static void baseUpdateValue(PropertyController controller)
controller
- the controller to updateprivate void addControlledCollectionListener()
private void removeControlledCollectionListener()
public void delete()
delete
in interface PropertyCollection<java.lang.Object,java.lang.Object>
delete
in class AbstractPropertyCollection<java.lang.Object,java.lang.Object>
AbstractPropertyCollection.delete()
public java.lang.Object setPropertyKey(java.lang.Object setPropertyKey)
setPropertyKey
in interface PropertyControllerModel
setPropertyKey
in class PropertyControllerModelImplementation
setPropertyKey
- new property key
PropertyControllerModel.setPropertyKey(java.lang.Object)
public void propertyChanged(PropertyChangeEvent<?,?> event)
propertyChanged
in interface PropertyListener<java.lang.Object,java.lang.Object>
event
- the event that was generatedPropertyListener.propertyChanged(org.deduced.PropertyChangeEvent)
public Task createAndSetControlledProperty(PropertyCollection<?,?> createType, boolean deletePreviousValue)
createAndSetControlledProperty
in interface PropertyController
createType
- the created object typedeletePreviousValue
- option to delete the previous value in the
property. This option only has effect if the property contains
a property collection and the property isn't a reference. It
will call delete on the previous value.
PropertyController.createAndSetControlledProperty(org.deduced.PropertyCollection,
boolean)
public static Task baseCreateAndSetControlledProperty(PropertyCollection<?,?> createType, boolean deletePreviousValue, PropertyController controller)
createType
- the type to createdeletePreviousValue
- option to delete the previous value. Only
valid if the value is a property collection held by value.controller
- the property controller to modify
public boolean isNewValueValid(java.lang.Object newValue, boolean validateParent)
isNewValueValid
in interface PropertyController
newValue
- the new valuevalidateParent
- option to validate the parent of the value as well.
If true, then the parent must be null for all properties by
value to be valid. If false, then the parent isn't validated.
PropertyController.isNewValueValid(java.lang.Object,
boolean)
public static void validatePropertyUpdate(PropertyCollection<?,?> changedCollection, java.lang.Object newValue, ModelFactory modelFactory, PropertyCollection<?,?> controlledPropertyInstance, boolean validateParent)
changedCollection
- the collection being changednewValue
- the new valuemodelFactory
- the model factory to used to create validation modelscontrolledPropertyInstance
- the property instance being changedvalidateParent
- option to validate the parent of the new value or
not.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |