|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deduced.dynamic.DynamicModelFactory
public class DynamicModelFactory
DynamicModelFactory is a model factory that listens to a schema and dynamically modifies the objects it created to keep them synchronized with the schema.
Nested Class Summary | |
---|---|
protected class |
DynamicModelFactory.ModelDeleteListener
Model Delete Listener |
protected class |
DynamicModelFactory.SchemaListener
Schema Listener |
protected class |
DynamicModelFactory.TypeExistenceCheck
Type Existence Check |
Field Summary | |
---|---|
private DynamicModelFactory.TypeExistenceCheck |
check
type existence check runnable |
private RuleExecutionContextImplementation |
context
deduction rule execution context |
private java.util.Map<PropertyCollection<?,?>,java.util.Set<PropertyCollection<?,?>>> |
createdModelMap
map between the property collection type and all the models that were created from that type. |
private java.util.Map<PropertyCollection<?,?>,RecursiveModelListener> |
fullSchemaMap
map between the list of schema in use and the recursive model listeners that listen to them |
private DynamicModelFactory.ModelDeleteListener |
modelDeleteListener
instance of the model listener |
private java.util.Map<PropertyCollection<?,?>,java.util.List<PropertyCollection<?,?>>> |
reverseDerivedMap
map containing a list of all the types that have the key-type as a parent. |
private boolean |
runCheckForTypeExistence
flag used to indicate if a check for type existence is required |
private PropertyCollection<?,?> |
schemaBasedApplicationLayer
collection of type SchemaBasedApplicationLayer. |
private PropertyCollection<?,?> |
schemaList
list of schema from the schemaBasedApplicationLayer property |
private DynamicModelFactory.SchemaListener |
schemaListener
instance of the schema listener |
private static Runner |
TYPE_EXISTENCE_RUNNER
runner used to run the check for model types that have been deleted. |
Constructor Summary | |
---|---|
DynamicModelFactory()
DynamicModelFactory Constructor |
Method Summary | |
---|---|
private void |
actionChanged(PropertyChangeEvent<?,?> event)
action Changed |
private void |
actionUpdated(PropertyCollection<?,?> action)
action Updated |
private void |
addDeductionRule(PropertyCollection<?,?> rule)
add Deduction Rule |
protected void |
addDeleteListener(PropertyCollection<?,?> createdCollection)
add model Delete Listener |
private void |
addMissingInstances(java.util.List<PropertyCollection<?,?>> affectedModelList,
java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> instanceList)
add Missing Instances |
private void |
addMissingRules(java.util.List<PropertyCollection<?,?>> affectedModelList,
java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> newRuleMap)
add Missing Rules |
private void |
addSchema(PropertyCollection<?,?> schema)
add a Schema |
private void |
buildCollectionReverseList(PropertyCollection<?,?> collectionType)
build a collection type reverse derived type list by browsing it's parent list |
private void |
checkAllTypesToDeleteIfNotInSchema()
check For All Type Existence |
protected void |
checkAllTypesToDeleteIfNotInSchemaIfNecessary()
check to delete all the types that aren't in the schema anymore if necessary |
private void |
cleanAllParentDerivedTypeList(PropertyCollection<?,?> typeToClean)
clean Parent Derived Type List recursively by verifying if all the known derived types are still valid to the type to clean, and all the parents it has. |
private void |
cleanDerivedTypeList(PropertyCollection<?,?> typeToClean)
clean the Derived Type List of a single property collection type by validating if the known derived types are still inherited. |
private void |
collectionTypeUpdated(PropertyCollection<?,?> changedType,
PropertyChangeEvent<?,?> event)
collection Type Updated |
private void |
configureReverseDerivedMap(PropertyCollection<?,?> packageToAdd)
configure the reverse derived object map by browsing through a package and building the list of derived types. |
static java.lang.Object |
convertValueIfNumericType(PropertyCollection<?,?> type,
java.lang.Number newValue)
create Object If it is a Basic Type |
private static java.lang.Object |
convertValueIfNumericTypePart2(PropertyCollection<?,?> type,
java.lang.Number newValue)
convert Value If Numeric Type Part2 |
protected DynamicPropertyMap |
createDynamicMap(PropertyCollection<?,?> type,
boolean activated)
create Dynamic property Map |
private PropertyCollection<?,?> |
createDynamicPropertyCollection(PropertyCollection<?,?> type,
boolean activated)
create Dynamic Property Collection |
private PropertyCollection<?,?> |
createDynamicPropertyList()
create Dynamic Property List |
private boolean |
createListIfValidDestroyOtherwise(PropertyCollection<?,?> changedInstance)
create List If Valid Destroy Otherwise |
PropertyCollection<?,?> |
createModel(PropertyCollection<?,?> type)
(non-Javadoc) |
PropertyCollection<?,?> |
createModel(PropertyCollection<?,?> type,
boolean activated)
(non-Javadoc) |
private void |
deductionRuleChanged(PropertyChangeEvent<?,?> event)
deduction rule Changed |
private void |
deductionRuleListChanged(PropertyChangeEvent<?,?> event)
deduction Rule List Changed |
private void |
deductionRuleUpdated(PropertyCollection<?,?> rule)
deduction rule updated |
private void |
deleteAllCreatedModelsInPackage(PropertyCollection<?,?> packageToRemove)
delete All Created Models In Package |
private void |
deleteAllCreatedModelsOfType(PropertyCollection<?,?> currentType)
delete All Created Models Of Type |
private void |
deleteInstance(PropertyCollection<?,?> changedType,
PropertyCollection<?,?> oldInstance)
delete Instance |
private void |
deleteTypeIfNotInSchema(PropertyCollection<?,?> type)
delete Type If Not In Schema |
private void |
enumerationTypeChanged(PropertyCollection<?,?> changedEnumerationType,
PropertyChangeEvent<?,?> event)
enumeration Type Changed |
private PropertyCollection<?,?> |
getActionFromModel(PropertyCollection<?,?> model)
get action From Model by iterating through the parent list until we hit an action |
private java.util.List<PropertyCollection<?,?>> |
getAllModelsOfType(PropertyCollection<?,?> changedType)
get a list of All the Models Of a specified Type, including those that are derived from the type. |
RuleExecutionContext |
getContext()
get the deduction rule execution context |
private java.lang.Object |
getConvertedBasicValue(PropertyCollection<?,?> changedInstance,
PropertyCollection<?,?> newValueType,
java.lang.Object propertyValue,
PropertyCollection<?,?> changedCollection)
get Converted Basic Value |
private java.util.Set<PropertyCollection<?,?>> |
getCreatedModelSet(PropertyCollection<?,?> type,
boolean createIfNecessary,
boolean canReturnNull)
get the list of all the created models of a specific type |
protected java.util.List<PropertyCollection<?,?>> |
getDerivedModelList(PropertyCollection<?,?> type)
get the list of all the derived types from the specified type. |
static java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> |
getInstanceListFromTypeList(java.util.Collection<PropertyCollection<?,?>> typeList)
get Instance List From Type List |
private PropertyCollection<?,?> |
getRuleFromModel(PropertyCollection<?,?> model)
get Rule From Model by iterating through the parent list until we hit a deduction rule |
static java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> |
getRuleListFromTypeList(java.util.Collection<PropertyCollection<?,?>> typeList)
get the rule List From Type List |
PropertyCollection<?,?> |
getSchemaBasedApplicationLayer()
get Schema Based Application Layer |
private PropertyCollection<?,?> |
getSchemaList()
get the Schema List |
static Runner |
getTypeExistenceRunner()
|
private static PropertyCollection<?,?> |
getTypeFromModel(PropertyCollection<?,?> collection)
get Type From Model by browsing the list of parents until we hit a property collection type |
protected void |
initializeCollection(PropertyCollection<?,?> createdCollection)
initialize Collection |
private void |
instanceChanged(PropertyCollection<?,?> changedInstance,
PropertyChangeEvent<?,?> event)
instance Changed |
private void |
instanceListChanged(PropertyChangeEvent<?,?> event)
property collection type instance List Changed |
private void |
instanceReferenceChanged(PropertyCollection<?,?> changedInstance,
PropertyChangeEvent<?,?> event,
PropertyCollection<?,?> changedType)
instance reference flag Changed |
private void |
instanceReferenceChangedOnCollection(boolean deleteValues,
java.lang.Object key,
DynamicPropertyMap dynamicMap,
PropertyCollection<?,?> changedInstance)
instance Reference Changed On Collection. |
private void |
instanceTypeChanged(PropertyCollection<?,?> changedInstance,
PropertyChangeEvent<?,?> event,
PropertyCollection<?,?> changedType)
instance Type Changed |
static boolean |
isPropertyCollectionListInstanceValid(PropertyCollection<?,?> instanceToValidate)
is Property Collection List Instance Valid |
static boolean |
isPropertyInstanceValid(PropertyCollection<?,?> changedInstance)
check if a property instance is valid |
private boolean |
isTypeInSchema(PropertyCollection<?,?> type)
is Type In Schema |
private void |
listFixedInstanceChanged(PropertyCollection<?,?> changedInstance,
PropertyChangeEvent<?,?> event)
list Fixed Instance Changed |
private void |
listInSchemaChanged(PropertyChangeEvent<?,?> event)
schema list Changed |
private void |
listInstanceChanged(PropertyCollection<?,?> changedInstance,
PropertyChangeEvent<?,?> event)
list Instance Changed |
protected void |
modelChanged(PropertyChangeEvent<?,?> event)
model changed |
private void |
parentListChanged(PropertyChangeEvent<?,?> event)
parent List Changed |
private void |
propertyInstanceChanged(PropertyChangeEvent<?,?> event)
property Instance Changed |
private void |
propertyPackageChanged(PropertyChangeEvent<?,?> event)
property Package Changed |
private void |
propertyPackageListChanged(PropertyChangeEvent<?,?> event)
property Package List Changed |
private void |
propertyTypeListChanged(PropertyChangeEvent<?,?> event)
property Type List Changed |
private void |
rebuildInstance(PropertyCollection<?,?> changedType,
PropertyCollection<?,?> newInstance)
rebuild a property instance |
private void |
recursiveAddAllParentList(PropertyCollection<?,?> childCollection,
PropertyCollection<?,?> currentParent)
browse all the parents of a parent collection and add a child collection to it's derived list |
private void |
recursiveAddToParentList(PropertyCollection<?,?> childCollection,
PropertyCollection<?,?> currentParent)
recursively add a type to it's parent derived model list |
protected void |
registerCreatedCollection(PropertyCollection<?,?> createdCollection)
register Created Collection |
void |
removeAllObsoleteInstancesAndRulesFromRemovedParent(PropertyCollection<?,?> changedType,
PropertyCollection<?,?> removedParent)
remove All Obsolete Instances and rules From Removed Parent |
private void |
removeDeductionRule(PropertyCollection<?,?> rule)
remove Deduction Rule |
private void |
removeDeductionRule(PropertyCollection<?,?> rule,
PropertyCollection<?,?> type)
remove Deduction Rule |
void |
removeObsoleteInstancesOnTypeFromRemovedParent(PropertyCollection<?,?> type,
java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> currentInstanceList,
java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> removedParentInstanceMap)
remove Obsolete Instances On Type From Removed Parent |
void |
removeObsoleteRulesOnTypeFromRemovedParent(PropertyCollection<?,?> type,
java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> currentRuleList,
java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> removedParentRuleMap)
remove Obsolete Rules On Type From Removed Parent |
private void |
removeSchema(PropertyCollection<?,?> schema)
remove a Schema |
private void |
removeSchemaIfNotInList(PropertyCollection<?,?> schema)
remove a Schema if it's not in the list anymore |
private void |
resetAllListFixedInstance(PropertyCollection<?,?> changedInstance)
reset All List Fixed Instance on the models that contain the instance |
private void |
resetListFixedInstance(PropertyCollection<?,?> changedInstance,
PropertyList<DynamicPropertyMap> currentList)
reset List Fixed Instance |
private void |
resetListMemberFixedInstance(PropertyList<DynamicPropertyMap> currentList,
PropertyCollection<?,?> listFixedInstanceType,
boolean fixedInstanceIsReference,
java.util.List<DynamicPropertyMap> objectAddList,
java.lang.Object currentKey)
reset List Member Fixed Instance |
private void |
revalidateAllInstancesOfType(PropertyCollection<?,?> previousParent)
after a property collection type isn't a parent of another type anymore, it is possible that some properties that pointed to a type in the parent hierarchy aren't valid anymore. |
private void |
runTypeExistenceCheckLater()
run Type Existence Check Later |
private void |
schemaAddParentLinkEvent(PropertyChangeEvent<?,?> event)
schema Add Parent Link Event |
private void |
schemaBasedApplicationLayerChanged(PropertyChangeEvent<?,?> event)
schema Based Application Layer Changed |
protected void |
schemaChanged(PropertyChangeEvent<?,?> event)
schema Changed |
private void |
schemaInstanceRemovedEvent(PropertyChangeEvent<?,?> event)
schema Instance Removed Event |
private void |
schemaLayerChanged(PropertyChangeEvent<?,?> event)
schema Layer Changed |
private void |
schemaListChanged(PropertyChangeEvent<?,?> event)
schema List Changed |
private void |
schemaNewInstanceAddedEvent(PropertyChangeEvent<?,?> event)
schema New Instance Added Event |
private void |
schemaObjectChanged(PropertyChangeEvent<?,?> event,
PropertyCollection<?,?> collection,
PropertyCollection<?,?> type)
schema Object Changed |
private void |
schemaObjectChanged2(PropertyChangeEvent<?,?> event,
PropertyCollection<?,?> type)
schema Object Changed2 used to breakdown the previous method to lower it's complexity. |
private void |
schemaRemoveParentLinkEvent(PropertyChangeEvent<?,?> event)
schema Remove Parent Link Event |
protected static void |
setPropertyValueOnDynamicMap(java.lang.Object key,
PropertyCollection<java.lang.Object,java.lang.Object> dynamicMap,
java.lang.Object newValue)
set Property Value On Dynamic Map |
void |
setSchemaBasedApplicationLayer(PropertyCollection<?,?> layer)
set Schema Based Application Layer |
static void |
setTypeExistenceRunner(Runner setTypeExistenceRunner)
|
private void |
typeChanged(PropertyCollection<?,?> changedType,
PropertyChangeEvent<?,?> event)
type Changed |
private void |
typeDeleted(PropertyCollection<?,?> deletedType)
collection Type deleted |
private void |
updateInstanceValueWithNewCollectionType(PropertyCollection<?,?> changedInstance,
PropertyCollection<?,?> changedType,
java.lang.Object key,
PropertyCollection<?,?> newValueType)
update Instance Value With New Collection Type |
private void |
updateInstanceWithNewTypeOnCollection(PropertyCollection<?,?> changedInstance,
java.lang.Object key,
PropertyCollection<?,?> newValueType,
DynamicPropertyMap dynamicMap)
update Instance With New Type On Collection |
private void |
updateSchemaList()
update Schema List |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Runner TYPE_EXISTENCE_RUNNER
private DynamicModelFactory.SchemaListener schemaListener
private DynamicModelFactory.ModelDeleteListener modelDeleteListener
private java.util.Map<PropertyCollection<?,?>,RecursiveModelListener> fullSchemaMap
private java.util.Map<PropertyCollection<?,?>,java.util.Set<PropertyCollection<?,?>>> createdModelMap
private java.util.Map<PropertyCollection<?,?>,java.util.List<PropertyCollection<?,?>>> reverseDerivedMap
private RuleExecutionContextImplementation context
private PropertyCollection<?,?> schemaBasedApplicationLayer
private PropertyCollection<?,?> schemaList
private boolean runCheckForTypeExistence
private DynamicModelFactory.TypeExistenceCheck check
Constructor Detail |
---|
public DynamicModelFactory()
Method Detail |
---|
private void runTypeExistenceCheckLater()
protected void checkAllTypesToDeleteIfNotInSchemaIfNecessary()
private void checkAllTypesToDeleteIfNotInSchema()
private void deleteTypeIfNotInSchema(PropertyCollection<?,?> type)
type
- the type to verifyprivate boolean isTypeInSchema(PropertyCollection<?,?> type)
type
- the type to search for
private void configureReverseDerivedMap(PropertyCollection<?,?> packageToAdd)
packageToAdd
- the package to addprivate void buildCollectionReverseList(PropertyCollection<?,?> collectionType)
collectionType
- the type to build.private void recursiveAddToParentList(PropertyCollection<?,?> childCollection, PropertyCollection<?,?> currentParent)
childCollection
- the type to addcurrentParent
- the current parent of the typeprivate void recursiveAddAllParentList(PropertyCollection<?,?> childCollection, PropertyCollection<?,?> currentParent)
childCollection
- the child collection type to add as a derived type
to all it's parents.currentParent
- the current parent on which to add the derived type.protected java.util.List<PropertyCollection<?,?>> getDerivedModelList(PropertyCollection<?,?> type)
type
- the type from which to get all the derived types
private void deleteAllCreatedModelsInPackage(PropertyCollection<?,?> packageToRemove)
packageToRemove
- the package to removeprivate void deleteAllCreatedModelsOfType(PropertyCollection<?,?> currentType)
currentType
- the type to deletepublic PropertyCollection<?,?> createModel(PropertyCollection<?,?> type)
createModel
in interface ModelFactory
type
- the type of model to create
ModelFactory.createModel(org.deduced.PropertyCollection)
public PropertyCollection<?,?> createModel(PropertyCollection<?,?> type, boolean activated)
createModel
in interface ModelFactory
type
- type of collection to createactivated
- is activated or not
ModelFactory.createModel(org.deduced.PropertyCollection,
boolean)
private PropertyCollection<?,?> createDynamicPropertyCollection(PropertyCollection<?,?> type, boolean activated)
type
- type to createactivated
- is the collection activated
protected final void initializeCollection(PropertyCollection<?,?> createdCollection)
createdCollection
- the collection to initializepublic RuleExecutionContext getContext()
protected final void registerCreatedCollection(PropertyCollection<?,?> createdCollection)
createdCollection
- the collection to registerprotected final void addDeleteListener(PropertyCollection<?,?> createdCollection)
createdCollection
- the model to listen toprotected DynamicPropertyMap createDynamicMap(PropertyCollection<?,?> type, boolean activated)
type
- the type to createactivated
- is the collection activated
private PropertyCollection<?,?> createDynamicPropertyList()
private java.util.Set<PropertyCollection<?,?>> getCreatedModelSet(PropertyCollection<?,?> type, boolean createIfNecessary, boolean canReturnNull)
type
- the type of model to look forcreateIfNecessary
- option to create the model list if it doesn't
exist yetcanReturnNull
- option to allow the return of a null value. If set
to false and the model list doesn't exist and the
createIfNecessary flag is set to false, this method will throw
an exception.
protected void modelChanged(PropertyChangeEvent<?,?> event)
event
- the event that changedprotected void schemaChanged(PropertyChangeEvent<?,?> event)
event
- the event that describes the changeprivate void schemaObjectChanged(PropertyChangeEvent<?,?> event, PropertyCollection<?,?> collection, PropertyCollection<?,?> type)
event
- the change eventcollection
- the collection that changedtype
- the collection type that changedprivate void schemaObjectChanged2(PropertyChangeEvent<?,?> event, PropertyCollection<?,?> type)
event
- change eventtype
- change typeprivate void propertyPackageChanged(PropertyChangeEvent<?,?> event)
event
- event that occurredprivate void propertyInstanceChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate void schemaListChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate void schemaBasedApplicationLayerChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate void schemaLayerChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate void deductionRuleChanged(PropertyChangeEvent<?,?> event)
event
- event describing the changeprivate void actionChanged(PropertyChangeEvent<?,?> event)
event
- event describing the changeprivate void deductionRuleUpdated(PropertyCollection<?,?> rule)
rule
- rule that was updatedprivate void actionUpdated(PropertyCollection<?,?> action)
action
- action that was updatedprivate void removeDeductionRule(PropertyCollection<?,?> rule)
rule
- rule to removeprivate void removeDeductionRule(PropertyCollection<?,?> rule, PropertyCollection<?,?> type)
rule
- rule to removetype
- type that contains the ruleprivate void addDeductionRule(PropertyCollection<?,?> rule)
rule
- rule to addprivate PropertyCollection<?,?> getRuleFromModel(PropertyCollection<?,?> model)
model
- the model from which to start searching
private PropertyCollection<?,?> getActionFromModel(PropertyCollection<?,?> model)
model
- the model from which to start searching
private void enumerationTypeChanged(PropertyCollection<?,?> changedEnumerationType, PropertyChangeEvent<?,?> event)
changedEnumerationType
- the type that changedevent
- description of the eventprivate void listInSchemaChanged(PropertyChangeEvent<?,?> event)
event
- description of the eventprivate void deductionRuleListChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate void propertyTypeListChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate void propertyPackageListChanged(PropertyChangeEvent<?,?> event)
event
- the change eventprivate static PropertyCollection<?,?> getTypeFromModel(PropertyCollection<?,?> collection)
collection
- the model to search from
private void parentListChanged(PropertyChangeEvent<?,?> event)
event
- description of the change eventprivate void schemaAddParentLinkEvent(PropertyChangeEvent<?,?> event)
event
- description of the change eventprivate void addMissingRules(java.util.List<PropertyCollection<?,?>> affectedModelList, java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> newRuleMap)
affectedModelList
- the list of affected modelsnewRuleMap
- the list of rules to createprivate void schemaRemoveParentLinkEvent(PropertyChangeEvent<?,?> event)
event
- description of the change eventpublic void removeAllObsoleteInstancesAndRulesFromRemovedParent(PropertyCollection<?,?> changedType, PropertyCollection<?,?> removedParent)
changedType
- the type that changedremovedParent
- the parent that was removedpublic void removeObsoleteInstancesOnTypeFromRemovedParent(PropertyCollection<?,?> type, java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> currentInstanceList, java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> removedParentInstanceMap)
type
- the type that changedcurrentInstanceList
- the current instance list on the typeremovedParentInstanceMap
- the potentially removed instancespublic void removeObsoleteRulesOnTypeFromRemovedParent(PropertyCollection<?,?> type, java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> currentRuleList, java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> removedParentRuleMap)
type
- the type that changedcurrentRuleList
- the current rule list on the typeremovedParentRuleMap
- the potentially removed rulesprivate void cleanAllParentDerivedTypeList(PropertyCollection<?,?> typeToClean)
typeToClean
- the collection type to cleanprivate void cleanDerivedTypeList(PropertyCollection<?,?> typeToClean)
typeToClean
- the type to clean.private void revalidateAllInstancesOfType(PropertyCollection<?,?> previousParent)
previousParent
- the parent that got removed from a hierarchyprivate java.util.List<PropertyCollection<?,?>> getAllModelsOfType(PropertyCollection<?,?> changedType)
changedType
- the type that changed
private void addMissingInstances(java.util.List<PropertyCollection<?,?>> affectedModelList, java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> instanceList)
affectedModelList
- the list of affected modelsinstanceList
- a map of all the property instances for both key and
valuesprivate void typeChanged(PropertyCollection<?,?> changedType, PropertyChangeEvent<?,?> event)
changedType
- the type that changedevent
- description of the change eventprivate void collectionTypeUpdated(PropertyCollection<?,?> changedType, PropertyChangeEvent<?,?> event)
changedType
- the type that changedevent
- description of the change eventprivate void typeDeleted(PropertyCollection<?,?> deletedType)
deletedType
- the type that was deletedpublic static java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> getInstanceListFromTypeList(java.util.Collection<PropertyCollection<?,?>> typeList)
typeList
- the type list
public static java.util.Map<PropertyCollection<?,?>,PropertyCollection<?,?>> getRuleListFromTypeList(java.util.Collection<PropertyCollection<?,?>> typeList)
typeList
- the type list
private void instanceListChanged(PropertyChangeEvent<?,?> event)
event
- description of the changeprivate void schemaInstanceRemovedEvent(PropertyChangeEvent<?,?> event)
event
- description of the changeprivate void deleteInstance(PropertyCollection<?,?> changedType, PropertyCollection<?,?> oldInstance)
changedType
- the type that changedoldInstance
- the instance that was removedprivate void schemaNewInstanceAddedEvent(PropertyChangeEvent<?,?> event)
event
- description of the changeprivate void rebuildInstance(PropertyCollection<?,?> changedType, PropertyCollection<?,?> newInstance)
changedType
- the type that changednewInstance
- the instance to rebuildprivate void instanceChanged(PropertyCollection<?,?> changedInstance, PropertyChangeEvent<?,?> event)
changedInstance
- the changed instanceevent
- description of the change eventprivate void instanceReferenceChanged(PropertyCollection<?,?> changedInstance, PropertyChangeEvent<?,?> event, PropertyCollection<?,?> changedType)
changedInstance
- the changed instanceevent
- description of the change eventchangedType
- the type that contains the changed instanceprivate void instanceReferenceChangedOnCollection(boolean deleteValues, java.lang.Object key, DynamicPropertyMap dynamicMap, PropertyCollection<?,?> changedInstance)
deleteValues
- option to delete all the values that were previously
contained by this instance if they are property collections.key
- the changed instance keydynamicMap
- the collection to changechangedInstance
- the instance that changedprivate void instanceTypeChanged(PropertyCollection<?,?> changedInstance, PropertyChangeEvent<?,?> event, PropertyCollection<?,?> changedType)
changedInstance
- the changed instanceevent
- description of the eventchangedType
- the type that contains the changed instanceprivate void updateInstanceValueWithNewCollectionType(PropertyCollection<?,?> changedInstance, PropertyCollection<?,?> changedType, java.lang.Object key, PropertyCollection<?,?> newValueType)
changedInstance
- the changed instancechangedType
- the type that contains the changed instancekey
- the key of the propertynewValueType
- the new value typeprivate void updateInstanceWithNewTypeOnCollection(PropertyCollection<?,?> changedInstance, java.lang.Object key, PropertyCollection<?,?> newValueType, DynamicPropertyMap dynamicMap)
changedInstance
- the changed instancekey
- the instance keynewValueType
- the new value typedynamicMap
- the map that might changeprivate java.lang.Object getConvertedBasicValue(PropertyCollection<?,?> changedInstance, PropertyCollection<?,?> newValueType, java.lang.Object propertyValue, PropertyCollection<?,?> changedCollection)
changedInstance
- the instance that changednewValueType
- the new value type to matchpropertyValue
- the current property value matching the old typechangedCollection
- the changed collection
public static java.lang.Object convertValueIfNumericType(PropertyCollection<?,?> type, java.lang.Number newValue)
type
- the type to createnewValue
- the new converted numeric value
private static java.lang.Object convertValueIfNumericTypePart2(PropertyCollection<?,?> type, java.lang.Number newValue)
type
- the type to convertnewValue
- the number value
public static boolean isPropertyInstanceValid(PropertyCollection<?,?> changedInstance)
changedInstance
- the property instance to check
private void listFixedInstanceChanged(PropertyCollection<?,?> changedInstance, PropertyChangeEvent<?,?> event)
changedInstance
- the changed instanceevent
- description of the change eventprotected static void setPropertyValueOnDynamicMap(java.lang.Object key, PropertyCollection<java.lang.Object,java.lang.Object> dynamicMap, java.lang.Object newValue)
key
- the key of the property to changedynamicMap
- the dynamic map to changenewValue
- the new valueprivate void listInstanceChanged(PropertyCollection<?,?> changedInstance, PropertyChangeEvent<?,?> event)
changedInstance
- the changed list instanceevent
- description of the change eventprivate void resetAllListFixedInstance(PropertyCollection<?,?> changedInstance)
changedInstance
- the changed list instanceprivate void resetListFixedInstance(PropertyCollection<?,?> changedInstance, PropertyList<DynamicPropertyMap> currentList)
changedInstance
- the changed instancecurrentList
- the current list to changeprivate void resetListMemberFixedInstance(PropertyList<DynamicPropertyMap> currentList, PropertyCollection<?,?> listFixedInstanceType, boolean fixedInstanceIsReference, java.util.List<DynamicPropertyMap> objectAddList, java.lang.Object currentKey)
currentList
- the list to changelistFixedInstanceType
- the list fixed instance typefixedInstanceIsReference
- is the fixed instance a referenceobjectAddList
- the list of values to add back to the modified list
after everything is removed.currentKey
- current key being modifiedprivate boolean createListIfValidDestroyOtherwise(PropertyCollection<?,?> changedInstance)
changedInstance
- the changed instance
public static boolean isPropertyCollectionListInstanceValid(PropertyCollection<?,?> instanceToValidate)
instanceToValidate
- the instance to validate
private void addSchema(PropertyCollection<?,?> schema)
schema
- the schema to addprivate void removeSchemaIfNotInList(PropertyCollection<?,?> schema)
schema
- the schema to possibly removeprivate void removeSchema(PropertyCollection<?,?> schema)
schema
- the schema to removepublic PropertyCollection<?,?> getSchemaBasedApplicationLayer()
public void setSchemaBasedApplicationLayer(PropertyCollection<?,?> layer)
layer
- the layer to useprivate void updateSchemaList()
private PropertyCollection<?,?> getSchemaList()
public static void setTypeExistenceRunner(Runner setTypeExistenceRunner)
setTypeExistenceRunner
- the type existence runner to setpublic static Runner getTypeExistenceRunner()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |