Merged HEAD-BUG-FIX (5.1/Cloud) to HEAD (5.1/Cloud)

108038: Merged 5.0.N (5.0.3) to HEAD-BUG-FIX (5.1/Cloud)
      107601: Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.3)
         107332: Merged DEV to V4.2-BUG-FIX (4.2.5)
            105981 : MNT-12226 : Alfresco fails to version metadata after uploading new content version even when autoVersionOnUpdateProps=true
               - Added config for upload.post.js webscript. So now users may configure versioning for Share APP separatelly.
            106157 : MNT-12226 : Alfresco fails to version metadata after uploading new content version even when autoVersionOnUpdateProps=true
               - Updated previous solution so that if no config provided for upload.post.js webscript then default model versioning strategy used.,
         107537: MNT-12226 : Alfresco fails to version metadata after uploading new content version even when autoVersionOnUpdateProps=true
            - Fixed build failure.


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@108069 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Alan Davis
2015-07-09 22:09:30 +00:00
parent ae66d46812
commit c657b2825a
3 changed files with 39 additions and 4 deletions

View File

@@ -61,6 +61,7 @@ import org.alfresco.repo.tenant.TenantService;
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.rest.api.tests.RepoService.SiteInformation;
import org.alfresco.rest.api.tests.RepoService.TestNetwork;
import org.alfresco.rest.api.tests.RepoService.TestPerson;
@@ -122,6 +123,7 @@ import org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictExcept
import org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.io.IOUtils;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
@@ -155,6 +157,7 @@ public class TestCMIS extends EnterpriseTestApi
private CMISStrictDictionaryService cmisDictionary;
private QNameFilter cmisTypeExclusions;
private NodeService nodeService;
private VersionableAspect versionableAspect;
@Before
public void before() throws Exception
@@ -166,6 +169,15 @@ public class TestCMIS extends EnterpriseTestApi
this.cmisDictionary = (CMISStrictDictionaryService)ctx.getBean("OpenCMISDictionaryService");
this.cmisTypeExclusions = (QNameFilter)ctx.getBean("cmisTypeExclusions");
this.nodeService = (NodeService) ctx.getBean("NodeService");
this.versionableAspect = (VersionableAspect) ctx.getBean("versionableAspect");
this.versionableAspect.setEnableAutoVersionOnUpdateProps(true);
}
@After
public void after()
{
this.versionableAspect.setEnableAutoVersionOnUpdateProps(false);
}
private void checkSecondaryTypes(Document doc, Set<String> expectedSecondaryTypes, Set<String> expectedMissingSecondaryTypes)