Merged V3.4 to HEAD

24070: Merged DEV/BELARUS/V3.4-2010_11_11 to V3.4
      24011: ALF-5618: Webdav with MAC OS X problems - Locking / unlocking creates new versions
   24101: Disabled test and reopened ALF-5618
   24117: Fixed test inter-dependencies on 'excludedOnUpdateProps' for ALF-5618


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@24118 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2010-12-01 12:23:25 +00:00
parent a6da98e165
commit 0fdc397234
3 changed files with 115 additions and 7 deletions

View File

@@ -24,7 +24,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.springframework.extensions.surf.util.I18NUtil;
import org.alfresco.model.ContentModel;
import org.alfresco.repo.content.ContentServicePolicies;
import org.alfresco.repo.copy.CopyBehaviourCallback;
@@ -44,6 +43,7 @@ import org.alfresco.service.cmr.version.VersionService;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.namespace.QName;
import org.alfresco.util.EqualsHelper;
import org.springframework.extensions.surf.util.I18NUtil;
/**
* Class containing behaviour for the versionable aspect
@@ -114,10 +114,21 @@ public class VersionableAspect implements ContentServicePolicies.OnContentUpdate
{
this.nodeService = nodeService;
}
/**
* @return Returns the current list of properties that <b>do not</b> trigger versioning
*/
public List<String> getExcludedOnUpdateProps()
{
return excludedOnUpdateProps;
}
/**
* @param excludedOnUpdateProps the list of properties that force versioning to ignore changes
*/
public void setExcludedOnUpdateProps(List<String> excludedOnUpdateProps)
{
this.excludedOnUpdateProps = excludedOnUpdateProps;
this.excludedOnUpdateProps = Collections.unmodifiableList(excludedOnUpdateProps);
}
/**
@@ -276,7 +287,7 @@ public class VersionableAspect implements ContentServicePolicies.OnContentUpdate
*
* If applicable and "cm:autoVersion" is TRUE then version the node on content update (even if no property updates)
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
public void onContentUpdate(NodeRef nodeRef, boolean newContent)
{
if (this.nodeService.exists(nodeRef) == true &&
@@ -315,7 +326,7 @@ public class VersionableAspect implements ContentServicePolicies.OnContentUpdate
*
* @since 3.2
*/
@SuppressWarnings("unchecked")
@SuppressWarnings({ "unchecked", "rawtypes" })
public void onUpdateProperties(
NodeRef nodeRef,
Map<QName, Serializable> before,