mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)
90394: Merged V4.2-BUG-FIX (4.2.4) to HEAD-BUG-FIX (5.0/Cloud) 90287: Merged DEV to V4.2-BUG-FIX (4.2.4) 89952 : MNT-12242 : Alfresco "autoVersionOnUpdateProps=false" does not work properly when making a CMIS call - Test to ensure auto-versioning on update properties and set/delete content using both Alfresco and CMIS perspectives. Changes according to new auto-versioning behavior git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@94672 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -432,6 +432,7 @@ public class VersionableAspect implements ContentServicePolicies.OnContentUpdate
|
||||
// Create the auto-version
|
||||
Map<String, Serializable> versionProperties = new HashMap<String, Serializable>(1);
|
||||
versionProperties.put(Version.PROP_DESCRIPTION, I18NUtil.getMessage(MSG_AUTO_VERSION));
|
||||
versionProperties.put(VersionModel.PROP_VERSION_TYPE, VersionType.MINOR);
|
||||
|
||||
createVersionImpl(nodeRef, versionProperties);
|
||||
}
|
||||
@@ -463,24 +464,15 @@ public class VersionableAspect implements ContentServicePolicies.OnContentUpdate
|
||||
Map<NodeRef, NodeRef> versionedNodeRefs = (Map)AlfrescoTransactionSupport.getResource(KEY_VERSIONED_NODEREFS);
|
||||
if (versionedNodeRefs == null || versionedNodeRefs.containsKey(nodeRef) == false)
|
||||
{
|
||||
// Determine whether the node is auto versionable (for property only updates) or not
|
||||
boolean autoVersion = false;
|
||||
Boolean value = (Boolean)this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTO_VERSION);
|
||||
if (value != null)
|
||||
{
|
||||
// If the value is not null then
|
||||
autoVersion = value.booleanValue();
|
||||
}
|
||||
|
||||
boolean autoVersionProps = false;
|
||||
value = (Boolean)this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTO_VERSION_PROPS);
|
||||
Boolean value = (Boolean)this.nodeService.getProperty(nodeRef, ContentModel.PROP_AUTO_VERSION_PROPS);
|
||||
if (value != null)
|
||||
{
|
||||
// If the value is not null then
|
||||
autoVersionProps = value.booleanValue();
|
||||
}
|
||||
|
||||
if ((autoVersion == true) && (autoVersionProps == true))
|
||||
if (autoVersionProps == true)
|
||||
{
|
||||
// Check for explicitly excluded props - if one or more excluded props changes then do not auto-version on this event (even if other props changed)
|
||||
if (excludedOnUpdatePropQNames.size() > 0)
|
||||
|
Reference in New Issue
Block a user