Package org.apache.chemistry.opencmis.client.bindings.spi.http

Examples of org.apache.chemistry.opencmis.client.bindings.spi.http.Output


        object.setPolicyIds(convertPolicyIds(policies));

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // post the new folder object
        Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
            public void write(OutputStream out) throws Exception {
                entryWriter.write(out);
            }
        });
View Full Code Here


        object.setPolicyIds(convertPolicyIds(policies));

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // post the new folder object
        Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
            public void write(OutputStream out) throws Exception {
                entryWriter.write(out);
            }
        });
View Full Code Here

        object.setPolicyIds(convertPolicyIds(policies));

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // post the new folder object
        Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
            public void write(OutputStream out) throws Exception {
                entryWriter.write(out);
            }
        });
View Full Code Here

        object.setProperties(convert(properties));

        final AtomEntryWriter entryWriter = new AtomEntryWriter(object);

        // update
        Response resp = put(url, Constants.MEDIATYPE_ENTRY, new Output() {
            public void write(OutputStream out) throws Exception {
                entryWriter.write(out);
            }
        });
View Full Code Here

        // set up object and writer
        final AtomEntryWriter entryWriter = new AtomEntryWriter(createIdObject(objectId.getValue()));

        // post move request
        Response resp = post(url, Constants.MEDIATYPE_ENTRY, new Output() {
            public void write(OutputStream out) throws Exception {
                entryWriter.write(out);
            }
        });
View Full Code Here

                            MimeHelper.encodeContentDisposition(MimeHelper.DISPOSITION_ATTACHMENT,
                                    contentStream.getFileName()));
        }

        // send content
        Response resp = put(url, contentStream.getMimeType(), headers, new Output() {
            public void write(OutputStream out) throws Exception {
                int b;
                byte[] buffer = new byte[4096];

                while ((b = stream.read(buffer)) > -1) {
View Full Code Here

        query.setRenditionFilter(renditionFilter);
        query.setMaxItems(maxItems);
        query.setSkipCount(skipCount);

        // post the query and parse results
        Response resp = post(url, Constants.MEDIATYPE_QUERY, new Output() {
            public void write(OutputStream out) throws Exception {
                JaxBHelper.marshal(JaxBHelper.CMIS_OBJECT_FACTORY.createQuery(query), out, false);
            }
        });
        AtomFeed feed = parse(resp.getStream(), AtomFeed.class);
View Full Code Here

        // prepare form data
        final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_APPLY_POLICY);
        formData.addPoliciesParameters(Collections.singletonList(policyId));

        // send
        postAndConsume(url, formData.getContentType(), new Output() {
            public void write(OutputStream out) throws Exception {
                formData.write(out);
            }
        });
    }
View Full Code Here

        // prepare form data
        final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_REMOVE_POLICY);
        formData.addPoliciesParameters(Collections.singletonList(policyId));

        // send
        postAndConsume(url, formData.getContentType(), new Output() {
            public void write(OutputStream out) throws Exception {
                formData.write(out);
            }
        });
    }
View Full Code Here

        // prepare form data
        final FormDataWriter formData = new FormDataWriter(Constants.CMISACTION_CHECK_OUT);
        formData.addSuccinctFlag(getSuccinct());

        // send and parse
        Response resp = post(url, formData.getContentType(), new Output() {
            public void write(OutputStream out) throws Exception {
                formData.write(out);
            }
        });
View Full Code Here

TOP

Related Classes of org.apache.chemistry.opencmis.client.bindings.spi.http.Output

Copyright © 2018 www.massapicom. 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.