Merged 5.0.N (5.0.3) to HEAD (5.1)

110205: Merged V4.2-BUG-FIX (4.2.6) to 5.0.N (5.0.3)
      110092: Merged V4.2.5 (4.2.5) to V4.2-BUG-FIX (4.2.6)
         110055: Merged DEV to PATCHES/V4.2.5 (4.2.5)
            109047 : MNT-12226 : Alfresco fails to version metadata after uploading new content version even when autoVersionOnUpdateProps=true
               - Reimplemented previous solution. Configuration properties for autoVersioning should not affect all nodes in repo. They should just provide default behavior.
               - Added ability to specify default values for model properties using standard alfresco GLOBAL_PROPERTIES file.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@110627 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Tatyana Valkevych
2015-08-21 16:42:09 +00:00
parent 5e0d90bb8d
commit 9cdc1f1377
6 changed files with 22 additions and 51 deletions

View File

@@ -41,6 +41,7 @@ import java.util.List;
import java.util.Map;
import java.util.Set;
import org.alfresco.cmis.CMISChangeEvent;
import org.alfresco.model.ContentModel;
import org.alfresco.opencmis.dictionary.CMISDictionaryService;
import org.alfresco.opencmis.dictionary.PropertyDefinitionWrapper;
@@ -64,7 +65,7 @@ import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.tenant.TenantUtil;
import org.alfresco.repo.tenant.TenantUtil.TenantRunAsWork;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.repo.version.VersionableAspect;
import org.alfresco.repo.version.VersionableAspectTest;
import org.alfresco.service.cmr.action.ActionCondition;
import org.alfresco.service.cmr.action.ActionService;
import org.alfresco.service.cmr.dictionary.AspectDefinition;
@@ -168,7 +169,7 @@ public class CMISTest
private RuleService ruleService;
private NodeArchiveService nodeArchiveService;
private DictionaryService dictionaryService;
private VersionableAspect versionableAspect;
private java.util.Properties globalProperties;
private AlfrescoCmisServiceFactory factory;
@@ -342,14 +343,14 @@ public class CMISTest
this.nodeArchiveService = (NodeArchiveService) ctx.getBean("nodeArchiveService");
this.dictionaryService = (DictionaryService) ctx.getBean("dictionaryService");
this.versionableAspect = (VersionableAspect) ctx.getBean("versionableAspect");
this.versionableAspect.setEnableAutoVersionOnUpdateProps(true);
this.globalProperties = (java.util.Properties) ctx.getBean("global-properties");
this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "true");
}
@After
public void after()
{
this.versionableAspect.setEnableAutoVersionOnUpdateProps(false);
this.globalProperties.setProperty(VersionableAspectTest.AUTO_VERSION_PROPS_KEY, "false");
}
/**