org.deduced.controller
Interface PropertyCollectionController

All Superinterfaces:
java.lang.Cloneable, NamedPropertyCollection, PropertyCollection<java.lang.Object,java.lang.Object>, PropertyCollectionControllerModel
All Known Implementing Classes:
AbstractPropertyCollectionController, DirectPropertyCollectionController, FlyWheelDynamicPropertyCollectionController, FlyWheelPropertyCollectionController, SimplePropertyCollectionController

public interface PropertyCollectionController
extends PropertyCollectionControllerModel

Title: PropertyController

Description: PropertyController is the interface used to control a single property in a property collection.

Author:
Steve McDuff

Field Summary
 
Fields inherited from interface org.deduced.controller.PropertyCollectionControllerModel
CHILD_COLLECTION_CONTROLLER_LIST_INSTANCE, CHILD_PROPERTY_CONTROLLER_LIST_INSTANCE, CONTROLLED_COLLECTION_INSTANCE, IS_ADD_AVAILABLE_INSTANCE, IS_DELETE_AVAILABLE_INSTANCE, PROPERTY_COLLECTION_CONTROLLER_MODEL_TYPE
 
Fields inherited from interface org.deduced.NamedPropertyCollection
NAME_INSTANCE, NAMED_PROPERTY_COLLECTION_TYPE
 
Fields inherited from interface org.deduced.PropertyCollection
PROPERTY_COLLECTION_TYPE
 
Method Summary
 Task addPropertyToControlledCollection(java.lang.Object propertyKey, PropertyCollection<?,?> instance, java.lang.Object propertyValue)
          add a property to the controlled collection
 Task createAndAddProperty(java.lang.Object key, PropertyCollection<?,?> instance, PropertyCollection<?,?> createType)
          add a created property
 Task deleteControlledCollection()
          delete the controlled collection
 boolean isAddValueValid(PropertyCollection<?,?> instance, PropertyCollection<?,?> value, boolean validateParent)
          test to see if add is valid
 
Methods inherited from interface org.deduced.controller.PropertyCollectionControllerModel
getChildCollectionControllerList, getChildPropertyControllerList, getControlledCollection, isAddAvailable, isDeleteAvailable, setChildCollectionControllerList, setChildPropertyControllerList, setControlledCollection, setIsAddAvailable, setIsDeleteAvailable
 
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, delete, getFixedInstance, getProperty, getPropertyValue, id, instanceKey, invokeAction, isActivated, isEmpty, isListenerRegistered, iterator, iteratorByValue, keyOnParent, parent, removeListener, removeProperty, removePropertyInstance, removePropertyValue, setFixedInstance, setParent, setProperty, size, type, valueKey
 

Method Detail

addPropertyToControlledCollection

Task addPropertyToControlledCollection(java.lang.Object propertyKey,
                                       PropertyCollection<?,?> instance,
                                       java.lang.Object propertyValue)
add a property to the controlled collection

Parameters:
propertyKey - the property key
instance - the property instance
propertyValue - the property value
Returns:
a task used to monitor the creation process. If the task is successful, the added property key will be set as the result of the task.

createAndAddProperty

Task createAndAddProperty(java.lang.Object key,
                          PropertyCollection<?,?> instance,
                          PropertyCollection<?,?> createType)
add a created property

Parameters:
key - the key of the created type
instance - the instance of the created type
createType - the type of object to create
Returns:
a task used to monitor the creation process. If the task is successful, the added property key will be set as the result of the task.

deleteControlledCollection

Task deleteControlledCollection()
delete the controlled collection

Returns:
the task monitoring the delete operation

isAddValueValid

boolean isAddValueValid(PropertyCollection<?,?> instance,
                        PropertyCollection<?,?> value,
                        boolean validateParent)
test to see if add is valid

Parameters:
instance - the property instance to use while adding. If null, the fixed instance on the collection will be used.
value - the value to add to the collection
validateParent - 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.
Returns:
true if add is valid