mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
ACE-5040: Merged 5.1.N (5.1.1) to HEAD (5.1)
120106 nsmintanca: Merged 5.0.N (5.0.4) to 5.1.N (5.1.1) 120071 rmunteanu: Merged 5.0.3 (5.0.3) to 5.0.N (5.0.4) 119848 adragoi: Merged DEV to 5.0.3 (5.0.3) 119808 adragoi: MNT-15338 : CMIS get object by path only shows the working copy file and not the original file - reverted commits related to "Ghost versions when Document is created with CheckinType CHECKOUT" stask : 100772 : Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 100260: MNT-13722 : CLONE - Ghost versions when Document is created with CheckinType CHECKOUT - Fix for tests failures 100824 : Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 100184: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.5) 100131 : Merged DEV to V4.1-BUG-FIX (4.1.10) 99521 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT - Don't include PWC in a version series 99824 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT - Return PWC as a part of version series. Fixes to pass TCK 100837 : Fix another merge issue as a result of a re factor that has taken place in 5.0 Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 100184: Merged V4.1-BUG-FIX (4.1.10) to V4.2-BUG-FIX (4.2.5) 100131 : Merged DEV to V4.1-BUG-FIX (4.1.10) 99521 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT - Don't include PWC in a version series 99824 : MNT-9088 : Ghost versions when Document is created with CheckinType CHECKOUT - Return PWC as a part of version series. Fixes to pass TCK 101404 : Merged V4.2-BUG-FIX (4.2.5) to 5.0.N (5.0.2) 101273: Merged DEV to V4.2-GUB-FIX (4.2.5) 100792 : MNT-13722 : CLONE - Ghost versions when Document is created with CheckinType CHECKOUT - Added init-method for CMISConnector. Test is added 101597 : Merged DEV to 5.0.N (5.0.2) 101560 : MNT-13813 : CLONE - Ghost versions when Document is created with CheckinType CHECKOUT - Fix to test failure git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@121388 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1063,6 +1063,7 @@ public class TestCMIS extends EnterpriseTestApi
|
||||
String siteName = "site" + System.currentTimeMillis();
|
||||
SiteInformation siteInfo = new SiteInformation(siteName, siteName, siteName, SiteVisibility.PRIVATE);
|
||||
TestSite site = repoService.createSite(null, siteInfo);
|
||||
|
||||
String name = GUID.generate();
|
||||
NodeRef folderNodeRef = repoService.createFolder(site.getContainerNodeRef(DOCUMENT_LIBRARY_CONTAINER_NAME), name);
|
||||
folders.add(folderNodeRef);
|
||||
@@ -2411,52 +2412,4 @@ public class TestCMIS extends EnterpriseTestApi
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testDoNotShowCheckedOutedNodeInFolder() throws Exception
|
||||
{
|
||||
final TestNetwork network = getTestFixture().getRandomNetwork();
|
||||
|
||||
String username = String.format(TEST_USER_NAME_PATTERN, System.currentTimeMillis());
|
||||
PersonInfo personInfo = new PersonInfo(username, username, username, TEST_PASSWORD, null, null, null, null, null, null, null);
|
||||
TestPerson person = network.createUser(personInfo);
|
||||
String personId = person.getId();
|
||||
|
||||
final String siteName = String.format(TEST_SITE_NAME_PATTERN, System.currentTimeMillis());
|
||||
|
||||
TenantUtil.runAsUserTenant(new TenantRunAsWork<TestSite>()
|
||||
{
|
||||
@Override
|
||||
public TestSite doWork() throws Exception
|
||||
{
|
||||
SiteInformation siteInfo = new SiteInformation(siteName, siteName, siteName, SiteVisibility.PRIVATE);
|
||||
return repoService.createSite(null, siteInfo);
|
||||
}
|
||||
}, personId, network.getId());
|
||||
|
||||
publicApiClient.setRequestContext(new RequestContext(network.getId(), personId));
|
||||
CmisSession cmisSession = publicApiClient.createPublicApiCMISSession(Binding.atom, CMIS_VERSION_11);
|
||||
Folder docLibrary = (Folder) cmisSession.getObjectByPath(String.format(DOCUMENT_LIBRARY_PATH_PATTERN, siteName));
|
||||
|
||||
assertEquals(0, docLibrary.getChildren().getTotalNumItems());
|
||||
|
||||
String name = String.format(TEST_DOCUMENT_NAME_PATTERN, GUID.generate());
|
||||
|
||||
Map<String, Object> properties = new HashMap<String, Object>();
|
||||
properties.put(PropertyIds.OBJECT_TYPE_ID, TYPE_CMIS_DOCUMENT);
|
||||
properties.put(PropertyIds.NAME, name);
|
||||
|
||||
ContentStreamImpl fileContent = new ContentStreamImpl();
|
||||
ByteArrayInputStream stream = new ByteArrayInputStream(GUID.generate().getBytes());
|
||||
fileContent.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
|
||||
fileContent.setStream(stream);
|
||||
|
||||
docLibrary.createDocument(properties, fileContent, VersioningState.CHECKEDOUT);
|
||||
// there should be only one document
|
||||
assertEquals(1, docLibrary.getChildren().getTotalNumItems());
|
||||
|
||||
Document obj = (Document)docLibrary.getChildren().iterator().next();
|
||||
// and it should be a PWC
|
||||
assertTrue(obj.isPrivateWorkingCopy());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user