mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged BRANCHES/DEV/V3.4-BUG-FIX to HEAD
Fix build failures related to Audit 28511: Fix build - VersionMigratorTest testMigrateVersionWithAssocs - defaultOnCreateVersion() being called for each aspect as default policy was bound as a service. 28505: Test failure - AbstractVersionServiceImpl was not running defaultOnCreateVersion() as AccessAuditor provided a policy to listen to events. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@28517 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -179,33 +179,28 @@ public abstract class AbstractVersionServiceImpl
|
||||
Map<String, Serializable> versionProperties,
|
||||
PolicyScope nodeDetails)
|
||||
{
|
||||
Collection<OnCreateVersionPolicy> policies = this.onCreateVersionDelegate.getList(classRef);
|
||||
if (policies.size() == 0)
|
||||
{
|
||||
// Call the default implementation
|
||||
defaultOnCreateVersion(
|
||||
classRef,
|
||||
nodeRef,
|
||||
versionProperties,
|
||||
nodeDetails);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Call the policy definitions
|
||||
for (VersionServicePolicies.OnCreateVersionPolicy policy : policies)
|
||||
{
|
||||
policy.onCreateVersion(
|
||||
classRef,
|
||||
nodeRef,
|
||||
versionProperties,
|
||||
nodeDetails);
|
||||
}
|
||||
}
|
||||
// Call the default implementation
|
||||
defaultOnCreateVersion(
|
||||
classRef,
|
||||
nodeRef,
|
||||
versionProperties,
|
||||
nodeDetails);
|
||||
|
||||
// Call the policy definitions
|
||||
Collection<OnCreateVersionPolicy> policies = this.onCreateVersionDelegate.getList(classRef);
|
||||
for (VersionServicePolicies.OnCreateVersionPolicy policy : policies)
|
||||
{
|
||||
policy.onCreateVersion(
|
||||
classRef,
|
||||
nodeRef,
|
||||
versionProperties,
|
||||
nodeDetails);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Default implementation of the on create version policy. Called if no behaviour is registered for the
|
||||
* policy for the specified type.
|
||||
* Default implementation of the on create version policy.
|
||||
* Override if you wish to supply your own policy.
|
||||
*
|
||||
* @param nodeRef
|
||||
* @param versionProperties
|
||||
|
Reference in New Issue
Block a user