From eb6e5e1ff080be4e5b55e97f04323a6f36176a6e Mon Sep 17 00:00:00 2001 From: Erik Winlof Date: Wed, 3 Sep 2014 12:15:25 +0000 Subject: [PATCH] Merged HEAD-BUG-FIX (5.0/Cloud) to HEAD (5.0/Cloud) 78437: Merged EOL (5.0/Cloud) to HEAD-BUG-FIX (5.0/Cloud) 76188: ACE-2149: EOL AVM / WCM - Force a type exclusion (act:actionbase) in order to test CMIS type exclusions - Originally, all wcm prefixes were ignored and that had been used by the CMIS exclusion test git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@82563 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/rest/api/tests/TestCMIS.java | 15 +++++++++++++-- source/test-resources/publicapi/test-model.xml | 4 ++-- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java b/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java index 952c30433d..b72a8f904b 100644 --- a/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java +++ b/source/test-java/org/alfresco/rest/api/tests/TestCMIS.java @@ -27,6 +27,8 @@ import org.alfresco.model.ContentModel; import org.alfresco.opencmis.CMISDispatcherRegistry.Binding; import org.alfresco.opencmis.dictionary.CMISStrictDictionaryService; import org.alfresco.opencmis.dictionary.QNameFilter; +import org.alfresco.opencmis.dictionary.QNameFilterImpl; +import org.alfresco.repo.action.ActionModel; import org.alfresco.repo.content.MimetypeMap; import org.alfresco.repo.content.filestore.FileContentWriter; import org.alfresco.repo.dictionary.DictionaryBootstrap; @@ -1217,10 +1219,19 @@ public class TestCMIS extends EnterpriseTestApi } } - // ALF-18968 + /** + * ALF-18968 + * + * @see QNameFilterImpl#listOfHardCodedExcludedTypes() + */ @Test public void testTypeFiltering() throws Exception { + // Force an exclusion in order to test the exclusion inheritance + cmisTypeExclusions.setExcluded(ActionModel.TYPE_ACTION_BASE, true); + // Quick check + assertTrue(cmisTypeExclusions.isExcluded(ActionModel.TYPE_ACTION_BASE)); + // Test that a type defined with this excluded parent type does not break the CMIS dictionary DictionaryBootstrap bootstrap = new DictionaryBootstrap(); List bootstrapModels = new ArrayList(); @@ -1238,7 +1249,7 @@ public class TestCMIS extends EnterpriseTestApi TestPerson person1 = network1.createUser(personInfo); String person1Id = person1.getId(); - // test that this type is excluded + // test that this type is excluded; the 'action' model (act prefix) is in the list of hardcoded exclusions QName type = QName.createQName("{http://www.alfresco.org/test/testCMIS}type1"); assertTrue(cmisTypeExclusions.isExcluded(type)); diff --git a/source/test-resources/publicapi/test-model.xml b/source/test-resources/publicapi/test-model.xml index 6e951e3b73..d41a8c0a23 100644 --- a/source/test-resources/publicapi/test-model.xml +++ b/source/test-resources/publicapi/test-model.xml @@ -7,7 +7,7 @@ 0.1 - + @@ -17,7 +17,7 @@ Type 1 - cm:savedquery + act:actionbase