mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Enhanced 'beforeCreateChildAssociaton' and 'onCreateChildAssociation' to carry an 'isNewNode' flag.
Fixed Lock and Rules to react correctly to this new information. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6003 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -328,7 +328,7 @@ public class IntegrityChecker
|
||||
save(event);
|
||||
|
||||
// check that the multiplicity and other properties of the new association are allowed
|
||||
onCreateChildAssociation(childAssocRef);
|
||||
onCreateChildAssociation(childAssocRef, false);
|
||||
|
||||
// check mandatory aspects
|
||||
event = new AspectsIntegrityEvent(nodeService, dictionaryService, childRef);
|
||||
@@ -426,14 +426,21 @@ public class IntegrityChecker
|
||||
}
|
||||
|
||||
/**
|
||||
* This handles the creation of secondary child associations.
|
||||
*
|
||||
* @see AssocSourceTypeIntegrityEvent
|
||||
* @see AssocTargetTypeIntegrityEvent
|
||||
* @see AssocSourceMultiplicityIntegrityEvent
|
||||
* @see AssocTargetMultiplicityIntegrityEvent
|
||||
* @see AssocTargetRoleIntegrityEvent
|
||||
*/
|
||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef)
|
||||
public void onCreateChildAssociation(ChildAssociationRef childAssocRef, boolean isNew)
|
||||
{
|
||||
if (isNew)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
IntegrityEvent event = null;
|
||||
// check source type
|
||||
event = new AssocSourceTypeIntegrityEvent(
|
||||
|
Reference in New Issue
Block a user