Code Monkey home page Code Monkey logo

camel-cmis's Introduction

Camel CMIS Component
====================

Enables Apache Camel to connect to CMIS supporting content repositories

Example usage:

1.Query cmis server using CMIS Query Language

from("direct:a")
    .body("SELECT * FROM cmis:document WHERE cmis:name LIKE 'test%'")
    .to("cmis://http://localhost:8080/chemistry-opencmis-server-inmemory-war-0.5.0/atom?username=admin&password=admin&repositoryId=A1&query=true");
    .to("stream:out");

To query CMIS server, create a producer by specifying query=true in the parameters and put the cmis query in the body of the message.
The result of the query is in the body of the message as a List, where each item is Map containing all the properties of the node.
Additionally it is also able to retrieve InputStream for the content itself if specified in the header as CamelCMISRetrieveContent true.


2. Create Folders and Documents on the CMIS server.

from("direct:start")
    .process(new Processor() {
        public void process(Exchange exchange) throws Exception {
            exchange.getOut().setHeader("cmis:objectTypeId", "cmis:folder");
            exchange.getOut().setHeader("cmis:name", "Test Folder");
        }
    })
    .to("cmis://http://localhost:8080/chemistry-opencmis-server-inmemory-war-0.5.0/atom?username=admin&password=admin&repositoryId=A1")

Creates a CMIS document which content is message body and properties from headers. For document with content, mimetype or content type is required header.
Creates folder if there is no message body or folder type is specified.
Name header is required for both document and folder creation.
Optional path header can specify in which location at create the new node. If not specified, the new node is created under the root folder.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.