Coder Social home page Coder Social logo

kaiserghub / documentum-rest-client-java Goto Github PK

View Code? Open in Web Editor NEW

This project forked from enterprise-content-management/documentum-rest-client-java

0.0 1.0 0.0 1.36 MB

Reference implementation of Documentum REST Java client

License: Apache License 2.0

Java 100.00%

documentum-rest-client-java's Introduction

Documentum REST Java Client Reference Implementation

Build Status License: Apache 2

This Java project contains a reference implementation of Documentum REST Services client written in Java code. The purpose of this project is to demonstrate one way to develop a hypermedia driven REST client to consume Documentum REST Services. It does NOT indicate that users could not develop a REST client using other technologies.

OpenText shares the source code of this project for the technology sharing. If users plan to migrate the sample code to their products, they are responsible to maintain this part of the code in their products and should agree with license polices of the referenced libraries used by this sample project.

Overview

This Documentum REST Services client is written with Java code. Underlying it leverages Spring RestTemplate to send the REST messages. It supports both XML and JSON representations. JAXB is used to bind XML object, and Jackson for JSON. Both http and https are supported. The Java client's supported features are listed in below tables.

API Spec Description
Supported Servers REST API Version REST API Version, REST API Version
Supported Formats
  • JSON
  • XML
Supported Authentications
  • Basic
  • Basic plus client token cookie
  • Basic plus client token cookie + CSRF
Call Mode
  • Synchronous
  • Asynchronous
Service Spec Description
Fundamental Services
  • Home document
  • Product information
  • Repositories
  • Batch execution
Folder Services
  • Cabinet CRUD
  • Folder CRUD
  • Folder navigation
  • Copy, move, link, unlink
Document / Sysobject Services
  • Document CRUD
  • Checkout, cancel checkout, checkin
  • Copy, move, link, unlink
Content Services
  • Import contents
  • Update contents
  • Export contents
Aspect Services
  • Attach aspects
  • Detach aspects
Lightweight object Services
  • Shared parent/children navigation
  • Materialization
  • Dematerialization
Virtual document Services
  • List virtual document nodes
Query and search Services
  • DQL read-only query
  • Full-text search
  • Full-text search with facets
  • Search template CRUD, execution
  • Saved search CRUD, execution
User and group Services
  • User CRUD
  • Group CRUD
  • Add group members
  • Remove group members
  • User preference CRUD
Permission Services
  • ACL CRUD
  • Set object permissions
  • Enquire object permissions
Collaboration Services
  • List comments
  • Add/reply comments
  • Delete comments
Relation Services
  • Create relations
  • List relations
Format Services
  • List formats
Network location Services
  • List network locations
Type services
  • List types
  • List relation types
  • List aspect types
  • Get value assistance

CRUD - Create, Retrieve, Update, Delete

System requirements

  1. Documentum REST Services 7.x is deployed in the development environment. The samples will be automatically loaded according the rest server version.
  2. Java 7 or later is installed.
  3. Maven 3 is required to build the project.

Build the project

  1. Build the project with maven
  mvn clean install
  1. There will be several files built in target directory:
  • rest-api-client-sample-7.3.jar --> the sample client jar file
  • lib -> the lib directory contains all other required third party library
  • rest-api-client-sample-7.3-all-in-one.jar -> the sample client jar file, with all other third party classes embedded
  • rest-api-client-sample-7.3-javadoc.jar -> javadoc of the sample client
  • rest-api-client-sample-7.3-sources.jar -> source code of the sample client

Use the API

The class DCTMRestClient is the client stub class for the client application to call REST APIs. We can use DCTMRestClientBuilder to build a REST client instance.

// new a simple rest client instance
DCTMRestClient client = new DCTMRestClientBuilder().bind(DCTMRestClientBinding.JSON)
                .contextRoot("http://localhost:8080/dctm-rest")
                .repository("ACME")
                .credentials("username", "password")
                .build();
// get product info resource                
RestObject productInfo = client.getProductInfo();

Run samples

  1. Run the project execute rest-api-client-sample-7.3.jar, with lib directory at the same place
java -jar rest-api-client-sample-7.3.jar

or execute rest-api-client-sample-7.3-all-in-one.jar directly

java -jar rest-api-client-sample-7.3-all-in-one.jar
  1. After the program is started, please input the required information prompted by the sample client. After that, you will see a list of commands:
  Please input the number of the sample operation which need be executed:
    0 Exit
    1 Navigation
    2 Folder Create/Update/Delete
    ...
  1. Then input the number of the sample you want to execute
  2. Basic sample client

  1. HTTPS connection without authenticating the rest server

  1. HTTPS connection with authenticating the rest server (the trust store must contain the rest server)

Or provide the trust store path with -D parameter:

java -Djavax.net.ssl.trustStore=X:\git\documentum-rest-client-java\truststore.jks -Djavax.net.ssl.trustStorePassword=password -jar rest-api-client-sample-7.3.jar

documentum-rest-client-java's People

Contributors

ruan-wei avatar gentlewind avatar jonathanrobie avatar michyosyn avatar

Watchers

James Cloos avatar

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.