Package org.apache.chemistry.opencmis.client.api

Examples of org.apache.chemistry.opencmis.client.api.TransientDocument.save()


        String filename2 = UUID.randomUUID().toString();
        tdoc2.setName(filename2);
        assertEquals(filename2, tdoc2.getName());

        ObjectId id2 = tdoc2.save();
        assertNotNull(id2);

        // set new content and save
        Document doc3 = (Document) session.getObject(id2, oc);
        TransientDocument tdoc3 = doc3.getTransientDocument();
View Full Code Here


                        in3);
        assertNotNull(contentStream3);

        tdoc3.setContentStream(contentStream3, true);

        ObjectId id3 = tdoc3.save();
        assertNotNull(id3);

        // set new name, delete content and save
        Document doc4 = (Document) session.getObject(id3, oc);
        TransientDocument tdoc4 = doc4.getTransientDocument();
View Full Code Here

        tdoc4.setName(filename4);
        assertEquals(filename4, tdoc4.getName());

        tdoc4.deleteContentStream();

        ObjectId id4 = tdoc4.save();
        assertNotNull(id4);

        // delete object
        Document doc5 = (Document) session.getObject(id4, oc);
        TransientDocument tdoc5 = doc5.getTransientDocument();
View Full Code Here

        tdoc5.delete(true);

        assertEquals(true, tdoc5.isMarkedForDelete());

        ObjectId id5 = tdoc5.save();
        assertNull(id5);

        // check
        try {
            this.session.getObject(id4, oc);
View Full Code Here

        assertEquals(doc2.getProperty(PropertyIds.NAME).getValueAsString(),
                FixtureData.DOCUMENT1_NAME.toString());
        assertEquals(tdoc.getProperty(PropertyIds.NAME).getValueAsString(),
                newDocName);

        tdoc.save();
        session2.clear();

        ObjectId id = session2.createObjectId(tdoc.getId());

        Document doc3 = (Document) session2.getObject(id);
View Full Code Here

    String filename2 = UUID.randomUUID().toString();
    tdoc2.setName(filename2);
    assertEquals(filename2, tdoc2.getName());

    ObjectId id2 = tdoc2.save();
    assertNotNull(id2);

    // set new content and save
    Document doc3 = (Document) this.session.getObject(id2, oc);
    TransientDocument tdoc3 = doc3.getTransientDocument();
View Full Code Here

            in3);
    assertNotNull(contentStream3);

    tdoc3.setContentStream(contentStream3, true);

    ObjectId id3 = tdoc3.save();
    assertNotNull(id3);

    // set new name, delete content and save
    Document doc4 = (Document) this.session.getObject(id3, oc);
    TransientDocument tdoc4 = doc4.getTransientDocument();
View Full Code Here

    tdoc4.setName(filename4);
    assertEquals(filename4, tdoc4.getName());

    tdoc4.deleteContentStream();

    ObjectId id4 = tdoc4.save();
    assertNotNull(id4);

    // delete object
    Document doc5 = (Document) this.session.getObject(id4, oc);
    TransientDocument tdoc5 = doc5.getTransientDocument();
View Full Code Here

    tdoc5.delete(true);

    assertEquals(true, tdoc5.isMarkedForDelete());

    ObjectId id5 = tdoc5.save();
    assertNull(id5);

    // check
    try {
      this.session.getObject(id4, oc);
View Full Code Here

    Document  doc2 = (Document) this.session2.getObjectByPath(path);
    assertNotNull(doc2);
    assertEquals(doc2.getProperty(PropertyIds.NAME).getValueAsString(), FixtureData.DOCUMENT1_NAME.toString());
    assertEquals(tdoc.getProperty(PropertyIds.NAME).getValueAsString(), newDocName);
   
    tdoc.save();
    session2.clear();

    ObjectId id = this.session2.createObjectId(tdoc.getId());
       
    Document doc3 = (Document) this.session2.getObject(id);
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.