Java SDK

Getting Started

Installing the SDK using Maven (recommended)

add this to your pom.xml file

edit pom.xml file
<dependency>
<groupId>io.secuconnect</groupId>
<artifactId>secuconnect-java-sdk</artifactId>
<version>1.2.1</version>
</dependency>
<repositories>
<repository>
<id>secuconnect-java-sdk-mvn</id>
<url>https://raw.github.com/secuconnect/secuconnect-java-sdk/mvn-repo/</url>
</repository>
</repositories>

and then install in using maven :

Maven install
mvn install

Installing the SDK from downloaded JAR file

On our GitHub-Release-Page you can find a list of JAR files for every release: https://github.com/secuconnect/secuconnect-java-sdk/releases

We are providing f.e. one JAR file with all dependencies.

1) Download the secuconnect-java-sdk-1.2.1-shaded.jar from the github release page https://github.com/secuconnect/secuconnect-java-sdk/releases and store it into the subdirectory "lib" in your project.

2) add this to your pom.xml :

<dependency>
<groupId>io.secuconnect</groupId>
<artifactId>secuconnect-java-sdk</artifactId>
<version>1.2.1</version>
<scope>system</scope>
<systemPath>${basedir}/lib/secuconnect-java-sdk-1.2.1-shaded.jar</systemPath>
</dependency>

Installing the SDK using Git

SDK is also available through github on https://github.com/secuconnect/secuconnect-java-sdk

you clone in using:

git clone
git clone https://github.com/secuconnect/secuconnect-java-sdk.git

you can also download the project in a zip file from https://github.com/secuconnect/secuconnect-java-sdk

1) just clicking on "Clone or download" button

images/download/attachments/54330270/image2018-10-24_13-38-47.png

2) and then on "Download Zip" button

images/download/attachments/54330270/image2018-10-24_13-37-51.png

Running tests included in SDK

Tests are written in JUnit. To run tests please press run button from options in your IDE.

Exists second option to run tests. It is from command line like below:

Running tests
mvn clean test

Authentication

See Authentication section to learn about authentication options, requirements and working example.

A sample application

See sample application section for robust example of authentication, SDK configuration and CRUD use case

Live

To switch to the live environment it is necessary to change the urls of the API endpoints:

// Live-Server:
Configuration.getDefaultApiClient().setBasePath("https://connect.secucard.com/api/v2");
Configuration.getDefaultApiClient().setAuthHost("https://connect.secucard.com/");