Search in sources :

Example 6 with ContentStreamImpl

use of org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl in project alfresco-remote-api by Alfresco.

the class TestCMIS method testALF19320.

/*
     * Test that creating a document with a number of initial aspects does not create lots of initial versions
     */
@Test
public void testALF19320() throws Exception {
    final TestNetwork network1 = getTestFixture().getRandomNetwork();
    String username = "user" + System.currentTimeMillis();
    PersonInfo personInfo = new PersonInfo(username, username, username, TEST_PASSWORD, null, null, null, null, null, null, null);
    TestPerson person1 = network1.createUser(personInfo);
    String person1Id = person1.getId();
    final String siteName = "site" + System.currentTimeMillis();
    TenantUtil.runAsUserTenant(new TenantRunAsWork<NodeRef>() {

        @Override
        public NodeRef doWork() throws Exception {
            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);
            return folderNodeRef;
        }
    }, person1Id, network1.getId());
    // Create a document...
    publicApiClient.setRequestContext(new RequestContext(network1.getId(), person1Id));
    CmisSession cmisSession = publicApiClient.createPublicApiCMISSession(Binding.atom, CMIS_VERSION_10, AlfrescoObjectFactoryImpl.class.getName());
    AlfrescoFolder docLibrary = (AlfrescoFolder) cmisSession.getObjectByPath("/Sites/" + siteName + "/documentLibrary");
    Map<String, String> properties = new HashMap<String, String>();
    {
        // create a document with 2 aspects
        properties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document,P:cm:titled,P:cm:author");
        properties.put(PropertyIds.NAME, "mydoc-" + GUID.generate() + ".txt");
    }
    ContentStreamImpl fileContent = new ContentStreamImpl();
    {
        ContentWriter writer = new FileContentWriter(TempFileProvider.createTempFile(GUID.generate(), ".txt"));
        writer.putContent("Ipsum and so on");
        ContentReader reader = writer.getReader();
        fileContent.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
        fileContent.setStream(reader.getContentInputStream());
    }
    AlfrescoDocument doc = (AlfrescoDocument) docLibrary.createDocument(properties, fileContent, VersioningState.MAJOR);
    String versionLabel = doc.getVersionLabel();
    assertEquals(CMIS_VERSION_10, versionLabel);
    AlfrescoDocument doc1 = (AlfrescoDocument) doc.getObjectOfLatestVersion(false);
    String versionLabel1 = doc1.getVersionLabel();
    assertEquals(CMIS_VERSION_10, versionLabel1);
}
Also used : ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) AlfrescoObjectFactoryImpl(org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl) AlfrescoDocument(org.alfresco.cmis.client.AlfrescoDocument) CmisSession(org.alfresco.rest.api.tests.client.PublicApiClient.CmisSession) HashMap(java.util.HashMap) TestSite(org.alfresco.rest.api.tests.RepoService.TestSite) AlfrescoFolder(org.alfresco.cmis.client.AlfrescoFolder) FileContentWriter(org.alfresco.repo.content.filestore.FileContentWriter) ContentReader(org.alfresco.service.cmr.repository.ContentReader) CmisUpdateConflictException(org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException) CmisConstraintException(org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException) CmisPermissionDeniedException(org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException) CmisInvalidArgumentException(org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException) PublicApiException(org.alfresco.rest.api.tests.client.PublicApiException) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) NodeRef(org.alfresco.service.cmr.repository.NodeRef) ContentWriter(org.alfresco.service.cmr.repository.ContentWriter) FileContentWriter(org.alfresco.repo.content.filestore.FileContentWriter) SiteInformation(org.alfresco.rest.api.tests.RepoService.SiteInformation) TestNetwork(org.alfresco.rest.api.tests.RepoService.TestNetwork) RequestContext(org.alfresco.rest.api.tests.client.RequestContext) TestPerson(org.alfresco.rest.api.tests.RepoService.TestPerson) VersionableAspectTest(org.alfresco.repo.version.VersionableAspectTest) Test(org.junit.Test)

Example 7 with ContentStreamImpl

use of org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl in project alfresco-remote-api by Alfresco.

the class TestCMIS method testDeleteNonCurrentVersion.

/**
 * Test delete version on versions other than latest (most recent) version (MNT-17228)
 */
@Test
public void testDeleteNonCurrentVersion() throws Exception {
    final TestNetwork network1 = getTestFixture().getRandomNetwork();
    String username = "user" + System.currentTimeMillis();
    PersonInfo personInfo = new PersonInfo(username, username, username, TEST_PASSWORD, null, null, null, null, null, null, null);
    TestPerson person = network1.createUser(personInfo);
    String personId = person.getId();
    publicApiClient.setRequestContext(new RequestContext(network1.getId(), personId));
    CmisSession cmisSession = publicApiClient.createPublicApiCMISSession(Binding.browser, CMIS_VERSION_11, AlfrescoObjectFactoryImpl.class.getName());
    Folder homeFolder = (Folder) cmisSession.getObjectByPath("/User Homes/" + personId);
    assertNotNull(homeFolder.getId());
    // Create a document
    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);
    Document doc = homeFolder.createDocument(properties, fileContent, VersioningState.MAJOR);
    String versionLabel = doc.getVersionLabel();
    assertEquals("1.0", versionLabel);
    Document docVersionToDelete = null;
    Document latestDoc = doc;
    int cnt = 4;
    for (int i = 1; i <= cnt; i++) {
        // Update content to create new versions (1.1, 1.2, 1.3, 1.4)
        fileContent = new ContentStreamImpl();
        {
            ContentWriter writer = new FileContentWriter(TempFileProvider.createTempFile(GUID.generate(), ".txt"));
            writer.putContent("Ipsum and so on and so on " + i);
            ContentReader reader = writer.getReader();
            fileContent.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
            fileContent.setStream(reader.getContentInputStream());
        }
        latestDoc.setContentStream(fileContent, true);
        latestDoc = latestDoc.getObjectOfLatestVersion(false);
        versionLabel = latestDoc.getVersionLabel();
        assertEquals("1." + i, versionLabel);
        assertEquals(1 + i, cmisSession.getAllVersions(latestDoc.getId()).size());
        if (i == 2) {
            // ie. 1.2
            docVersionToDelete = latestDoc;
        }
    }
    // Test delete with a user without permissions
    String username2 = "user" + System.currentTimeMillis();
    PersonInfo person2Info = new PersonInfo(username2, username2, username2, TEST_PASSWORD, null, null, null, null, null, null, null);
    TestPerson person2 = network1.createUser(person2Info);
    String person2Id = person2.getId();
    TenantUtil.runAsSystemTenant(new TenantRunAsWork<Void>() {

        @Override
        public Void doWork() throws Exception {
            String nodeId = stripCMISSuffix(doc.getId());
            NodeRef nodeRef = new NodeRef(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE, nodeId);
            // Give user person2 READ permissions to access the node
            permissionService.setPermission(nodeRef, person2Id, PermissionService.READ, true);
            return null;
        }
    }, network1.getId());
    // Connect with person2
    publicApiClient.setRequestContext(new RequestContext(network1.getId(), person2Id));
    CmisSession cmisSession2 = publicApiClient.createPublicApiCMISSession(Binding.browser, CMIS_VERSION_11, AlfrescoObjectFactoryImpl.class.getName());
    CmisObject docVersionToDeleteBy2 = cmisSession2.getObject(docVersionToDelete.getId());
    try {
        // (-) Delete v 1.2 (without DELETE permission)
        docVersionToDeleteBy2.delete(false);
        fail("Node version was deleted without permissions.");
    } catch (CmisPermissionDeniedException ex) {
    // expected
    }
    // (+) Delete v 1.2 (with permission)
    docVersionToDelete.delete(false);
    // eg. 1.0, 1.2, 1.3, 1.4 (not 1.1)
    assertEquals(cnt, cmisSession.getAllVersions(doc.getId()).size());
}
Also used : ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) HashMap(java.util.HashMap) AlfrescoFolder(org.alfresco.cmis.client.AlfrescoFolder) Folder(org.apache.chemistry.opencmis.client.api.Folder) AlfrescoDocument(org.alfresco.cmis.client.AlfrescoDocument) Document(org.apache.chemistry.opencmis.client.api.Document) NodeRef(org.alfresco.service.cmr.repository.NodeRef) CmisPermissionDeniedException(org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException) FileableCmisObject(org.apache.chemistry.opencmis.client.api.FileableCmisObject) CmisObject(org.apache.chemistry.opencmis.client.api.CmisObject) RequestContext(org.alfresco.rest.api.tests.client.RequestContext) AlfrescoObjectFactoryImpl(org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl) CmisSession(org.alfresco.rest.api.tests.client.PublicApiClient.CmisSession) FileContentWriter(org.alfresco.repo.content.filestore.FileContentWriter) ContentReader(org.alfresco.service.cmr.repository.ContentReader) CmisUpdateConflictException(org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException) CmisConstraintException(org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException) CmisPermissionDeniedException(org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException) CmisInvalidArgumentException(org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException) PublicApiException(org.alfresco.rest.api.tests.client.PublicApiException) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) ContentWriter(org.alfresco.service.cmr.repository.ContentWriter) FileContentWriter(org.alfresco.repo.content.filestore.FileContentWriter) ByteArrayInputStream(java.io.ByteArrayInputStream) TestNetwork(org.alfresco.rest.api.tests.RepoService.TestNetwork) FileableCmisObject(org.apache.chemistry.opencmis.client.api.FileableCmisObject) CmisObject(org.apache.chemistry.opencmis.client.api.CmisObject) TestPerson(org.alfresco.rest.api.tests.RepoService.TestPerson) VersionableAspectTest(org.alfresco.repo.version.VersionableAspectTest) Test(org.junit.Test)

Example 8 with ContentStreamImpl

use of org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl in project alfresco-remote-api by Alfresco.

the class TestCMIS method testCreationDate.

/**
 * MNT-12680
 * The creation date of version should be the same as creation date of the original node
 * @throws Exception
 */
@Test
public void testCreationDate() throws Exception {
    // create a site
    final TestNetwork network1 = getTestFixture().getRandomNetwork();
    String username = "user" + System.currentTimeMillis();
    PersonInfo personInfo = new PersonInfo(username, username, username, "password", null, null, null, null, null, null, null);
    TestPerson person1 = network1.createUser(personInfo);
    String person1Id = person1.getId();
    final String siteName = "site" + System.currentTimeMillis();
    TenantUtil.runAsUserTenant(new TenantRunAsWork<NodeRef>() {

        @Override
        public NodeRef doWork() throws Exception {
            SiteInformation siteInfo = new SiteInformation(siteName, siteName, siteName, SiteVisibility.PUBLIC);
            final TestSite site = network1.createSite(siteInfo);
            final NodeRef resNode = repoService.createDocument(site.getContainerNodeRef("documentLibrary"), "testdoc.txt", "Test Doc1 Title", "Test Doc1 Description", "Test Content");
            return resNode;
        }
    }, person1Id, network1.getId());
    // create a document
    publicApiClient.setRequestContext(new RequestContext(network1.getId(), person1Id));
    CmisSession cmisSession = publicApiClient.createPublicApiCMISSession(Binding.atom, CMIS_VERSION_10, AlfrescoObjectFactoryImpl.class.getName());
    AlfrescoFolder docLibrary = (AlfrescoFolder) cmisSession.getObjectByPath("/Sites/" + siteName + "/documentLibrary");
    Map<String, String> properties = new HashMap<String, String>();
    {
        properties.put(PropertyIds.OBJECT_TYPE_ID, TYPE_CMIS_DOCUMENT);
        properties.put(PropertyIds.NAME, "mydoc-" + GUID.generate() + ".txt");
    }
    ContentStreamImpl fileContent = new ContentStreamImpl();
    {
        ContentWriter writer = new FileContentWriter(TempFileProvider.createTempFile(GUID.generate(), ".txt"));
        writer.putContent("some content");
        ContentReader reader = writer.getReader();
        fileContent.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
        fileContent.setStream(reader.getContentInputStream());
    }
    Document autoVersionedDoc = docLibrary.createDocument(properties, fileContent, VersioningState.MAJOR);
    String objectId = autoVersionedDoc.getId();
    String bareObjectId = stripCMISSuffix(objectId);
    // create versions
    for (int i = 0; i < 3; i++) {
        Document doc1 = (Document) cmisSession.getObject(bareObjectId);
        ObjectId pwcId = doc1.checkOut();
        Document pwc = (Document) cmisSession.getObject(pwcId.getId());
        ContentStreamImpl contentStream = new ContentStreamImpl();
        {
            ContentWriter writer = new FileContentWriter(TempFileProvider.createTempFile(GUID.generate(), ".txt"));
            writer.putContent(GUID.generate());
            ContentReader reader = writer.getReader();
            contentStream.setMimeType(MimetypeMap.MIMETYPE_TEXT_PLAIN);
            contentStream.setStream(reader.getContentInputStream());
        }
        pwc.checkIn(true, Collections.EMPTY_MAP, contentStream, "checkin " + i);
    }
    GregorianCalendar cDateFirst = cmisSession.getAllVersions(bareObjectId).get(0).getCreationDate();
    GregorianCalendar cDateSecond = cmisSession.getAllVersions(bareObjectId).get(2).getCreationDate();
    if (cDateFirst.before(cDateSecond) || cDateFirst.after(cDateSecond)) {
        fail("The creation date of version should be the same as creation date of the original node");
    }
}
Also used : ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) AlfrescoObjectFactoryImpl(org.alfresco.cmis.client.impl.AlfrescoObjectFactoryImpl) CmisSession(org.alfresco.rest.api.tests.client.PublicApiClient.CmisSession) HashMap(java.util.HashMap) ObjectId(org.apache.chemistry.opencmis.client.api.ObjectId) TestSite(org.alfresco.rest.api.tests.RepoService.TestSite) AlfrescoFolder(org.alfresco.cmis.client.AlfrescoFolder) FileContentWriter(org.alfresco.repo.content.filestore.FileContentWriter) ContentReader(org.alfresco.service.cmr.repository.ContentReader) GregorianCalendar(java.util.GregorianCalendar) AlfrescoDocument(org.alfresco.cmis.client.AlfrescoDocument) Document(org.apache.chemistry.opencmis.client.api.Document) CmisUpdateConflictException(org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException) CmisConstraintException(org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException) CmisPermissionDeniedException(org.apache.chemistry.opencmis.commons.exceptions.CmisPermissionDeniedException) CmisInvalidArgumentException(org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException) PublicApiException(org.alfresco.rest.api.tests.client.PublicApiException) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) NodeRef(org.alfresco.service.cmr.repository.NodeRef) ContentWriter(org.alfresco.service.cmr.repository.ContentWriter) FileContentWriter(org.alfresco.repo.content.filestore.FileContentWriter) SiteInformation(org.alfresco.rest.api.tests.RepoService.SiteInformation) TestNetwork(org.alfresco.rest.api.tests.RepoService.TestNetwork) RequestContext(org.alfresco.rest.api.tests.client.RequestContext) TestPerson(org.alfresco.rest.api.tests.RepoService.TestPerson) VersionableAspectTest(org.alfresco.repo.version.VersionableAspectTest) Test(org.junit.Test)

Example 9 with ContentStreamImpl

use of org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl in project SearchServices by Alfresco.

the class CMISDataCreatorTest method createUniqueDocument.

private Document createUniqueDocument(Folder newFolder) throws UnsupportedEncodingException {
    String uniqueName = getUniqueName();
    Map<String, Object> uProperties = new HashMap<String, Object>();
    uProperties.put(PropertyIds.OBJECT_TYPE_ID, "cmis:document");
    uProperties.put(PropertyIds.NAME, uniqueName);
    ContentStreamImpl contentStream = new ContentStreamImpl();
    contentStream.setFileName("bob");
    String shortString = "short";
    contentStream.setStream(new ByteArrayInputStream(shortString.getBytes("UTF-8")));
    contentStream.setLength(new BigInteger("5"));
    contentStream.setMimeType("text/plain");
    Document uniqueDocument = newFolder.createDocument(uProperties, contentStream, VersioningState.MAJOR);
    return uniqueDocument;
}
Also used : ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) HashMap(java.util.HashMap) ByteArrayInputStream(java.io.ByteArrayInputStream) BigInteger(java.math.BigInteger) CmisObject(org.apache.chemistry.opencmis.client.api.CmisObject) Document(org.apache.chemistry.opencmis.client.api.Document)

Example 10 with ContentStreamImpl

use of org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl in project copper-cms by PogeyanOSS.

the class AbstractSessionTest method createDocument.

/**
 * Creates a document.
 */
protected Document createDocument(Session session, Folder parent, String name, String objectTypeId, String[] secondaryTypeIds, String content) {
    if (parent == null) {
        throw new IllegalArgumentException("Parent is not set!");
    }
    if (name == null) {
        throw new IllegalArgumentException("Name is not set!");
    }
    if (objectTypeId == null) {
        throw new IllegalArgumentException("Object Type ID is not set!");
    }
    if (content == null) {
        content = "";
    }
    // check type
    ObjectType type;
    try {
        type = session.getTypeDefinition(objectTypeId);
    } catch (CmisObjectNotFoundException e) {
        addResult(createResult(UNEXPECTED_EXCEPTION, "Document type '" + objectTypeId + "' is not available: " + e.getMessage(), e, true));
        return null;
    }
    if (Boolean.FALSE.equals(type.isCreatable())) {
        addResult(createResult(SKIPPED, "Document type '" + objectTypeId + "' is not creatable!", true));
        return null;
    }
    // create
    Map<String, Object> properties = new HashMap<String, Object>();
    properties.put(PropertyIds.NAME, name);
    properties.put(PropertyIds.OBJECT_TYPE_ID, objectTypeId);
    if (secondaryTypeIds != null) {
        properties.put(PropertyIds.SECONDARY_OBJECT_TYPE_IDS, Arrays.asList(secondaryTypeIds));
    }
    type = session.getTypeDefinition(objectTypeId);
    if (!(type instanceof DocumentTypeDefinition)) {
        addResult(createResult(FAILURE, "Type is not a document type! Type: " + objectTypeId, true));
        return null;
    }
    DocumentTypeDefinition docType = (DocumentTypeDefinition) type;
    VersioningState versioningState = (Boolean.TRUE.equals(docType.isVersionable()) ? VersioningState.MAJOR : VersioningState.NONE);
    byte[] contentBytes = null;
    Document result = null;
    try {
        contentBytes = IOUtils.toUTF8Bytes(content);
        ContentStream contentStream = new ContentStreamImpl(name, BigInteger.valueOf(contentBytes.length), "text/plain", new ByteArrayInputStream(contentBytes));
        // create the document
        result = parent.createDocument(properties, contentStream, versioningState, null, null, null, SELECT_ALL_NO_CACHE_OC);
        contentStream.getStream().close();
    } catch (Exception e) {
        addResult(createResult(UNEXPECTED_EXCEPTION, "Document could not be created! Exception: " + e.getMessage(), e, true));
        return null;
    }
    try {
        CmisTestResult f;
        // check document name
        f = createResult(FAILURE, "Document name does not match!", false);
        addResult(assertEquals(name, result.getName(), null, f));
        // check content length
        f = createResult(WARNING, "Content length does not match!", false);
        addResult(assertEquals((long) contentBytes.length, result.getContentStreamLength(), null, f));
        // check the new document
        addResult(checkObject(session, result, getAllProperties(result), "New document object spec compliance"));
        // check content
        try {
            ContentStream contentStream = result.getContentStream();
            f = createResult(WARNING, "Document filename and the filename of the content stream do not match!", false);
            addResult(assertEquals(name, contentStream.getFileName(), null, f));
            f = createResult(WARNING, "cmis:contentStreamFileName and the filename of the content stream do not match!", false);
            addResult(assertEquals(result.getContentStreamFileName(), contentStream.getFileName(), null, f));
            String fetchedContent = getStringFromContentStream(result.getContentStream());
            if (!content.equals(fetchedContent)) {
                addResult(createResult(FAILURE, "Content of newly created document doesn't match the orign content!"));
            }
        } catch (IOException e) {
            addResult(createResult(UNEXPECTED_EXCEPTION, "Content of newly created document couldn't be read! Exception: " + e.getMessage(), e, true));
        }
    } catch (CmisBaseException e) {
        addResult(createResult(UNEXPECTED_EXCEPTION, "Newly created document is invalid! Exception: " + e.getMessage(), e, true));
    }
    // check parents
    List<Folder> parents = result.getParents(SELECT_ALL_NO_CACHE_OC);
    boolean found = false;
    for (Folder folder : parents) {
        if (parent.getId().equals(folder.getId())) {
            found = true;
            break;
        }
    }
    if (!found) {
        addResult(createResult(FAILURE, "The folder the document has been created in is not in the list of the document parents!"));
    }
    return result;
}
Also used : ContentStreamImpl(org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl) DocumentTypeDefinition(org.apache.chemistry.opencmis.commons.definitions.DocumentTypeDefinition) HashMap(java.util.HashMap) IOException(java.io.IOException) Document(org.apache.chemistry.opencmis.client.api.Document) Folder(org.apache.chemistry.opencmis.client.api.Folder) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) CmisBaseException(org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException) CmisNotSupportedException(org.apache.chemistry.opencmis.commons.exceptions.CmisNotSupportedException) IOException(java.io.IOException) CmisInvalidArgumentException(org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException) ObjectType(org.apache.chemistry.opencmis.client.api.ObjectType) ContentStream(org.apache.chemistry.opencmis.commons.data.ContentStream) CmisObjectNotFoundException(org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException) ByteArrayInputStream(java.io.ByteArrayInputStream) CmisBaseException(org.apache.chemistry.opencmis.commons.exceptions.CmisBaseException) CmisTestResult(org.apache.chemistry.opencmis.tck.CmisTestResult) FileableCmisObject(org.apache.chemistry.opencmis.client.api.FileableCmisObject) CmisObject(org.apache.chemistry.opencmis.client.api.CmisObject) VersioningState(org.apache.chemistry.opencmis.commons.enums.VersioningState)

Aggregations

ContentStreamImpl (org.apache.chemistry.opencmis.commons.impl.dataobjects.ContentStreamImpl)26 HashMap (java.util.HashMap)21 Document (org.apache.chemistry.opencmis.client.api.Document)18 CmisObjectNotFoundException (org.apache.chemistry.opencmis.commons.exceptions.CmisObjectNotFoundException)17 CmisConstraintException (org.apache.chemistry.opencmis.commons.exceptions.CmisConstraintException)16 AlfrescoDocument (org.alfresco.cmis.client.AlfrescoDocument)15 AlfrescoFolder (org.alfresco.cmis.client.AlfrescoFolder)15 VersionableAspectTest (org.alfresco.repo.version.VersionableAspectTest)15 TestNetwork (org.alfresco.rest.api.tests.RepoService.TestNetwork)15 CmisSession (org.alfresco.rest.api.tests.client.PublicApiClient.CmisSession)15 RequestContext (org.alfresco.rest.api.tests.client.RequestContext)15 Folder (org.apache.chemistry.opencmis.client.api.Folder)15 CmisInvalidArgumentException (org.apache.chemistry.opencmis.commons.exceptions.CmisInvalidArgumentException)15 Test (org.junit.Test)15 CmisUpdateConflictException (org.apache.chemistry.opencmis.commons.exceptions.CmisUpdateConflictException)14 ByteArrayInputStream (java.io.ByteArrayInputStream)13 FileContentWriter (org.alfresco.repo.content.filestore.FileContentWriter)13 TestPerson (org.alfresco.rest.api.tests.RepoService.TestPerson)13 PublicApiException (org.alfresco.rest.api.tests.client.PublicApiException)13 ContentReader (org.alfresco.service.cmr.repository.ContentReader)13