|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
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.PropertyCollectionControllerModelImplementation
org.deduced.controller.implementation.AbstractPropertyCollectionController
public abstract class AbstractPropertyCollectionController
Title: AbstractPropertyCollectionController
Description: AbstractPropertyCollectionController implements the base methods required by a property collection controller.
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
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 | |
---|---|
AbstractPropertyCollectionController(DeducedControllerLayerExtension setControlLayer)
AbstractPropertyCollectionController Constructor |
Method Summary | ||
---|---|---|
Task |
addPropertyToControlledCollection(java.lang.Object propertyKey,
PropertyCollection<?,?> instance,
java.lang.Object propertyValue)
(non-Javadoc) |
|
static Task |
baseAddPropertyToControlledCollection(java.lang.Object propertyKey,
PropertyCollection<?,?> instance,
java.lang.Object propertyValue,
PropertyCollectionController controller,
DeducedControllerLayerExtension controlLayer)
base Add Property To Controlled Collection |
|
static Task |
baseCreateAndAddProperty(PropertyCollection<?,?> createType,
PropertyCollection<?,?> instance,
java.lang.Object key,
PropertyCollectionController controller)
base method to create and add a property |
|
static Task |
baseDeleteControlledCollection(PropertyCollectionController controller)
base Delete Controlled Collection |
|
static boolean |
baseIsAddValueValid(PropertyCollection<?,?> instance,
PropertyCollection<?,?> value,
ModelFactory modelFactory,
PropertyCollectionController controller,
boolean validateParent)
base method to verify if a value to add is valid or not |
|
Task |
createAndAddProperty(java.lang.Object key,
PropertyCollection<?,?> instance,
PropertyCollection<?,?> createType)
(non-Javadoc) |
|
Task |
deleteControlledCollection()
(non-Javadoc) |
|
DeducedControllerLayerExtension |
getControlLayer()
get Control Layer |
|
private static PropertyCollection<?,?> |
getInstanceForAdditionThrowIfInvalid(PropertyCollection<?,?> addInstance,
PropertyCollection<?,?> controlledCollection)
get Instance For Addition and Throw an exception if the instance is invalid |
|
static ModelFactory |
getModelFactoryFromCollection(PropertyCollection<?,?> collection)
the model factory associated with the specified collection |
|
static Task |
handleException(Task currentTask,
java.lang.Exception e)
handle Exception by registering them on the task |
|
protected static
|
internalAddPropertyToControlledCollection(K propertyKey,
PropertyCollection<?,?> instance,
V propertyValue,
PropertyCollectionController controller,
DeducedControllerLayerExtension controlLayer)
internalAddPropertyToControlledCollection |
|
boolean |
isAddValueValid(PropertyCollection<?,?> instance,
PropertyCollection<?,?> value,
boolean validateParent)
(non-Javadoc) |
|
void |
setControlLayer(DeducedControllerLayerExtension setControlLayer)
set Control Layer |
|
static void |
validateAddToCollection(java.lang.Object propertyValue,
PropertyCollection<?,?> addInstance,
ModelFactory modelFactory,
PropertyCollection<?,?> controlledCollection,
boolean validateParent)
validate if a value is valid to be added to a collection |
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.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 |
Field Detail |
---|
private static final long serialVersionUID
private DeducedControllerLayerExtension controlLayer
Constructor Detail |
---|
public AbstractPropertyCollectionController(DeducedControllerLayerExtension setControlLayer)
setControlLayer
- the control layer to use.Method Detail |
---|
public DeducedControllerLayerExtension getControlLayer()
public void setControlLayer(DeducedControllerLayerExtension setControlLayer)
setControlLayer
- the control layer to usepublic Task createAndAddProperty(java.lang.Object key, PropertyCollection<?,?> instance, PropertyCollection<?,?> createType)
createAndAddProperty
in interface PropertyCollectionController
key
- the key of the created typeinstance
- the instance of the created typecreateType
- the type of object to create
PropertyCollectionController.createAndAddProperty(java.lang.Object,
org.deduced.PropertyCollection, org.deduced.PropertyCollection)
public static Task baseCreateAndAddProperty(PropertyCollection<?,?> createType, PropertyCollection<?,?> instance, java.lang.Object key, PropertyCollectionController controller)
createType
- the type to createinstance
- the instance of the created propertykey
- the property keycontroller
- the property collection controller
public static ModelFactory getModelFactoryFromCollection(PropertyCollection<?,?> collection)
collection
- the collection to use
public static Task handleException(Task currentTask, java.lang.Exception e)
currentTask
- the current taske
- the exception to handle
public Task addPropertyToControlledCollection(java.lang.Object propertyKey, PropertyCollection<?,?> instance, java.lang.Object propertyValue)
addPropertyToControlledCollection
in interface PropertyCollectionController
propertyKey
- the property keyinstance
- the property instancepropertyValue
- the property value
PropertyCollectionController.addPropertyToControlledCollection(java.lang.Object,
org.deduced.PropertyCollection, java.lang.Object)
public static Task baseAddPropertyToControlledCollection(java.lang.Object propertyKey, PropertyCollection<?,?> instance, java.lang.Object propertyValue, PropertyCollectionController controller, DeducedControllerLayerExtension controlLayer)
propertyKey
- the key to use while addinginstance
- the instance to use while addingpropertyValue
- the new property valuecontroller
- the controller to use while addingcontrolLayer
- the control layer used by the controller
protected static <K,V> K internalAddPropertyToControlledCollection(K propertyKey, PropertyCollection<?,?> instance, V propertyValue, PropertyCollectionController controller, DeducedControllerLayerExtension controlLayer)
K
- the type of key to addV
- the type of value to addpropertyKey
- the key to use while addinginstance
- the instance to use while addingpropertyValue
- the new property valuecontroller
- the controller to use while addingcontrolLayer
- the control layer used by the controller
public static void validateAddToCollection(java.lang.Object propertyValue, PropertyCollection<?,?> addInstance, ModelFactory modelFactory, PropertyCollection<?,?> controlledCollection, boolean validateParent)
propertyValue
- the value to addaddInstance
- the instance specified during addition. If null, the
collection fixed instance is used.modelFactory
- the model factory used to generate a validation modelcontrolledCollection
- the controlled collection to receive the add
operation.validateParent
- option to validate the parent while adding the
collection
java.lang.IllegalArgumentException
- when the value isn't valid.private static PropertyCollection<?,?> getInstanceForAdditionThrowIfInvalid(PropertyCollection<?,?> addInstance, PropertyCollection<?,?> controlledCollection)
addInstance
- the instance to add. If null, then the fixed instance
of the collection will be used.controlledCollection
- the controlled collection
public Task deleteControlledCollection()
deleteControlledCollection
in interface PropertyCollectionController
PropertyCollectionController.deleteControlledCollection()
public static Task baseDeleteControlledCollection(PropertyCollectionController controller)
controller
- the controller on which to delete the controlled
collection
public boolean isAddValueValid(PropertyCollection<?,?> instance, PropertyCollection<?,?> value, boolean validateParent)
isAddValueValid
in interface PropertyCollectionController
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 collectionvalidateParent
- 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.
PropertyCollectionController.isAddValueValid(org.deduced.PropertyCollection,
org.deduced.PropertyCollection, boolean)
public static boolean baseIsAddValueValid(PropertyCollection<?,?> instance, PropertyCollection<?,?> value, ModelFactory modelFactory, PropertyCollectionController controller, boolean validateParent)
instance
- the instance to use while adding. If null, the collection
fixed instance will be used.value
- the value to addmodelFactory
- the model factory to use to create validation modelscontroller
- the controller where the add will be performedvalidateParent
- option to validate the parent of the added value or
not. If set to true, then the added value must have a null
parent.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |