org.deduced.controller.implementation
Class DirectPropertyCollectionController

java.lang.Object
  extended by org.deduced.AbstractPropertyCollection<K,V>
      extended by org.deduced.FixedPropertyInstanceCollection<java.lang.Object,java.lang.Object>
          extended by org.deduced.controller.implementation.PropertyCollectionControllerModelImplementation
              extended by org.deduced.controller.implementation.AbstractPropertyCollectionController
                  extended by org.deduced.controller.implementation.DirectPropertyCollectionController
All Implemented Interfaces:
java.lang.Cloneable, java.util.EventListener, PropertyCollectionController, PropertyCollectionControllerModel, NamedPropertyCollection, PropertyCollection<java.lang.Object,java.lang.Object>, PropertyListener<java.lang.Object,java.lang.Object>

public class DirectPropertyCollectionController
extends AbstractPropertyCollectionController
implements PropertyCollectionController, PropertyListener<java.lang.Object,java.lang.Object>

Title: DirectPropertyController

Description: DirectPropertyController is used to control a property directly making changes in memory.

Author:
Steve McDuff

Nested Class Summary
 
Nested classes/interfaces inherited from class org.deduced.AbstractPropertyCollection
AbstractPropertyCollection.CollectionToDeleteMonitor
 
Field Summary
private static long serialVersionUID
          the actual iterator used to browse the list
 
Fields inherited from class org.deduced.controller.implementation.PropertyCollectionControllerModelImplementation
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.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
 
Constructor Summary
DirectPropertyCollectionController(DeducedControllerLayerExtension setControlLayer)
          DirectPropertyCollectionController Constructor
 
Method Summary
private  void addCollectionListener()
          addCollectionListener
private  void buildAllChildControllers()
          build All Child Controllers
private  void clearChildControllers()
          clear all the child controllers
protected  PropertyCollectionController createCollectionController(PropertyCollection<?,?> model)
          create Collection Controller
protected  PropertyController createPropertyController(PropertyCollectionController parentController, java.lang.Object key)
          create Property Controller
private  void deleteExistingChildCollectionController(java.lang.Object oldValue)
          attempt to delete an Existing Child Collection Controller
private  PropertyCollectionController findChildCollectionController(java.lang.Object propertyValue)
          find Child Collection Controller
private  PropertyController findChildPropertyController(java.lang.Object propertyKey)
          find an existing Child Property Controller
private  PropertyCollectionController getChildControllerInternal(java.lang.Object key)
          get Child Controller Internal
private  ControllerFactory getControllerFactory()
          get Controller Factory
protected  PropertyController getPropertyControllerInternal(java.lang.Object key)
          get Property Controller internally.
 void propertyChanged(PropertyChangeEvent<?,?> event)
          (non-Javadoc)
private  void removeChildPropertyController(java.lang.Object key)
          remove Child property Controller
private  void removeCollectionListener()
          removeCollectionListener
 PropertyCollection setControlledCollection(PropertyCollection collection)
          (non-Javadoc)
 
Methods inherited from class org.deduced.controller.implementation.AbstractPropertyCollectionController
addPropertyToControlledCollection, baseAddPropertyToControlledCollection, baseCreateAndAddProperty, baseDeleteControlledCollection, baseIsAddValueValid, createAndAddProperty, deleteControlledCollection, getControlLayer, getModelFactoryFromCollection, handleException, internalAddPropertyToControlledCollection, isAddValueValid, setControlLayer, validateAddToCollection
 
Methods inherited from class org.deduced.controller.implementation.PropertyCollectionControllerModelImplementation
asKeySet, clone, createInstancesAndTypes, createKeyList, equals, fillInstancesAndTypes, fillInstancesAndTypesFromSchema, fillTypeLists, getChildCollectionControllerList, getChildCollectionControllerList, getChildPropertyControllerList, getChildPropertyControllerList, getControlledCollection, getControlledCollection, getName, getName, getPropertyValue, isAddAvailable, isAddAvailable, isDeleteAvailable, isDeleteAvailable, resetListFixedInstances, setChildCollectionControllerList, setChildCollectionControllerList, setChildPropertyControllerList, setChildPropertyControllerList, setControlledCollection, setIsAddAvailable, setIsAddAvailable, setIsDeleteAvailable, setIsDeleteAvailable, setName, setName, setProperty, type
 
Methods inherited from class org.deduced.FixedPropertyInstanceCollection
addProperty, areKeysAssignedAutomatically, containsKey, getProperty, iterator, iteratorByValue, removeProperty, removePropertyInstance, removePropertyValue, size
 
Methods inherited from class org.deduced.AbstractPropertyCollection
activate, addListener, asPropertyList, asPropertyMap, asValueList, asValueMap, callObjectClone, classLogger, cleanNewlyClonedValue, clear, clearCollectionMonitoredForDelete, cloneCollection, containsInstance, containsValue, createUniqueID, delete, deleteClearAllProperties, deleteClearListenerList, deleteFireDeleteEvent, deleteProcessCompletedValidation, deleteRemoveLocalObjectFromParent, deleteValidateEmptyListenerList, deleteValidateNoPendingReferences, firePropertyChangeEvent, flushCollectionsWithNewParent, flushCollectionsWithNewParent, getActionInvoker, getCheckDeleteMode, getCheckDeleteRunner, getFixedInstance, getInstanceIdentityKey, hashCode, id, instanceKey, internalFirePropertyChangeEvent, invokeAction, isActivated, isDeleteCheckedOnClearParent, isEmpty, isListenerRegistered, isParentOrKeyNull, keyOnParent, parent, removeListener, requiresChangeEvent, setActionInvoker, setCheckDeleteMode, setCheckDeleteRunner, setDeleteCheckedOnClearParent, setFixedInstance, setParent, toString, updateReference, updateReferenceWithReferenceFlag, validateAllPropertyInstances, validateNoListener, validateNoParentRecursion, validateParentIsNull, validateParentIsNull, valueKey
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.deduced.controller.PropertyCollectionController
addPropertyToControlledCollection, createAndAddProperty, deleteControlledCollection, isAddValueValid
 
Methods inherited from interface org.deduced.controller.PropertyCollectionControllerModel
getChildCollectionControllerList, getChildPropertyControllerList, getControlledCollection, isAddAvailable, isDeleteAvailable, setChildCollectionControllerList, setChildPropertyControllerList, 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
 

Field Detail

serialVersionUID

private static final long serialVersionUID
the actual iterator used to browse the list

See Also:
Constant Field Values
Constructor Detail

DirectPropertyCollectionController

public DirectPropertyCollectionController(DeducedControllerLayerExtension setControlLayer)
DirectPropertyCollectionController Constructor

Parameters:
setControlLayer - the control layer
Method Detail

createCollectionController

protected PropertyCollectionController createCollectionController(PropertyCollection<?,?> model)
create Collection Controller

Parameters:
model - the model to control
Returns:
the created controller

createPropertyController

protected PropertyController createPropertyController(PropertyCollectionController parentController,
                                                      java.lang.Object key)
create Property Controller

Parameters:
parentController - the parent controller
key - the key to control
Returns:
the created controller

getControllerFactory

private ControllerFactory getControllerFactory()
get Controller Factory

Returns:
the controller factory associated with this controller.

clearChildControllers

private void clearChildControllers()
clear all the child controllers


setControlledCollection

public PropertyCollection setControlledCollection(PropertyCollection collection)
(non-Javadoc)

Specified by:
setControlledCollection in interface PropertyCollectionControllerModel
Overrides:
setControlledCollection in class PropertyCollectionControllerModelImplementation
Parameters:
collection - new controlled collection
Returns:
controlled collection value after the change
See Also:
PropertyCollectionControllerModel.setControlledCollection(org.deduced.PropertyCollection)

removeCollectionListener

private void removeCollectionListener()
removeCollectionListener


addCollectionListener

private void addCollectionListener()
addCollectionListener


getChildControllerInternal

private PropertyCollectionController getChildControllerInternal(java.lang.Object key)
get Child Controller Internal

Parameters:
key - the key to control
Returns:
the controller

findChildCollectionController

private PropertyCollectionController findChildCollectionController(java.lang.Object propertyValue)
find Child Collection Controller

Parameters:
propertyValue - the controlled collection
Returns:
the matching controller

findChildPropertyController

private PropertyController findChildPropertyController(java.lang.Object propertyKey)
find an existing Child Property Controller

Parameters:
propertyKey - the controlled property key
Returns:
the matching property controller

buildAllChildControllers

private void buildAllChildControllers()
build All Child Controllers


propertyChanged

public void propertyChanged(PropertyChangeEvent<?,?> event)
(non-Javadoc)

Specified by:
propertyChanged in interface PropertyListener<java.lang.Object,java.lang.Object>
Parameters:
event - the event that was generated
See Also:
PropertyListener.propertyChanged(org.deduced.PropertyChangeEvent)

deleteExistingChildCollectionController

private void deleteExistingChildCollectionController(java.lang.Object oldValue)
attempt to delete an Existing Child Collection Controller

Parameters:
oldValue - the previous child collection

removeChildPropertyController

private void removeChildPropertyController(java.lang.Object key)
remove Child property Controller

Parameters:
key - the child key to remove

getPropertyControllerInternal

protected PropertyController getPropertyControllerInternal(java.lang.Object key)
get Property Controller internally. build it if necessary.

Parameters:
key - key being controlled
Returns:
the property controller