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

Examples of org.apache.chemistry.opencmis.client.api.Document.checkIn()


            addResult(checkObject(session, pwc, getAllProperties(pwc), "PWC spec compliance - test 2"));

            checkCheckedOut(pwc);

            // check in
            ObjectId newVersionId = pwc.checkIn(true, null, null, "Test Version 2");
            Document newVersion = (Document) session.getObject(newVersionId, SELECT_ALL_NO_CACHE_OC);

            addResult(checkObject(session, newVersion, getAllProperties(newVersion), "New version compliance"));

            checkCheckedIn(newVersion);
View Full Code Here


            addResult(checkObject(session, pwc, getAllProperties(pwc), "PWC spec compliance - test 2"));

            checkCheckedOut(pwc);

            // check in
            ObjectId newVersionId = pwc.checkIn(true, null, null, "Test Version 2");
            Document newVersion = (Document) session.getObject(newVersionId, SELECT_ALL_NO_CACHE_OC);

            addResult(checkObject(session, newVersion, getAllProperties(newVersion), "New version compliance"));

            checkCheckedIn(newVersion);
View Full Code Here

            contentBytes = content.getBytes();
        }
        ContentStream contentStream = new ContentStreamImpl(doc.getName(), BigInteger.valueOf(contentBytes.length),
                "text/plain", new ByteArrayInputStream(contentBytes));

        ObjectId newVersionId = pwc.checkIn(true, null, contentStream, "test version " + version);
        Document newVersion = (Document) session.getObject(newVersionId, SELECT_ALL_NO_CACHE_OC);

        addResult(checkObject(session, newVersion, getAllProperties(newVersion), "Version " + version + " compliance"));

        // check version history
View Full Code Here

                    doc.getContentStream().getFileName(), buf.length,
                    doc.getContentStream().getMimeType(), new ByteArrayInputStream(buf));

            // Check in the pwc
            try {
                pwc.checkIn(false, null, contentStream, "minor version");
            } catch (Exception e) {
                e.printStackTrace();
                System.out.println("checkin failed, trying to cancel the checkout");
                pwc.cancelCheckOut();
            }
View Full Code Here

            addResult(checkObject(session, pwc, getAllProperties(pwc), "PWC spec compliance - test 2"));

            checkCheckedOut(pwc);

            // check in
            ObjectId newVersionId = pwc.checkIn(true, null, null, "Test Version 2");
            Document newVersion = (Document) session.getObject(newVersionId, SELECT_ALL_NO_CACHE_OC);

            addResult(checkObject(session, newVersion, getAllProperties(newVersion), "New version compliance"));

            checkCheckedIn(newVersion);
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.