Giter Club home page Giter Club logo

pydio-sdk-java-v2's Introduction

Getting started

The pydio java sdk provides a Java implementation of features for communicating with a Pydio server Cells and Pydio 8+ versions. Most of the functions are wrapped into the com.pydio.sdk.core.Pydio8 class that contains methods to easily manage your files on a Pydio server.

Configure and resolve a pydio server:

Given an URL, we create a ServerNode object to load the server info

String url = "https://demo.pydio.com";
ServerNode node = new ServerNode();
Error error = node.resolve();
if (error != null) {
    // error.code could be
    //Code.ssl_error or
    //Code.pydio_server_not_supported or
    //Code.pydio_server_not_supported or
    //Code.con_failed or
    //Code.ssl_certificate_not_signed or
    System.out.println("failed to resolve server");
    return;
}

System.out.println("version: " + server.getVersion());
System.out.println("version name: " + server.getVersionName());

Working with the pydio client:

Instantiate a Pydio Client

To create a client pass the resolved server to the client factory

Client client = Client.get(node);

Setting user credentials

Credentials credentials = new DefaultCredentials("login", "password");
client.setCredentials(credentials);

Performing folder list

//listing root of "My Files" workspace
try {
    client.ls("my-files", "/", (n) -> {
        System.out.println(n.label());
    });
} catch(SDKexception e) {
    e.printStackTrace();
    Error error = Error.fromException(e)
    // error.code could be
    //Code.ssl_error or
    //Code.pydio_server_not_supported or
    //Code.pydio_server_not_supported or
    //Code.con_failed or
    //Code.ssl_certificate_not_signed or
}

Examples

Find more examples here

pydio-sdk-java-v2's People

Contributors

jabarkarim avatar

Watchers

James Cloos avatar  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.