Skip to content
Snippets Groups Projects
user avatar
Martin Vogel authored
Update dependency org.apache.maven.plugins:maven-jar-plugin to v3.2.2

See merge request !13
cc6ace1f
History

Logo

About the FIT-Connect Java SDK

The Java SDK for FIT-Connect enables to build clients for senders and subscribers without directly interacting with any REST-Endpoints. It provides a simple fluent API that guides through the creation and sending of a submission, as well as receiving submissions as a subscriber.

For further information, check out the official docs: FIT-Connect Documentation as well as the:

Build Dependencies

This section lists major frameworks/libraries used in the SDK.

  • Java 11 (LTS)
  • Maven 3.x
  • Junit 5

Further 3rd party dependencies:

  • Nimbus-Jose JWT
  • Spring Web/HTTP
  • Jackson FasterXMl
  • JCommander
  • Typesafe Config

Getting Started

How to set up the SDK project locally.

Prerequisites

  • Java Runtime >= 11, check your current setup in your commandline
    java --version 

(back to top)

Modules

See the projects' module documentation for more specific information:

Setup

The following steps show how to get the SDK running

  1. Create and account on the self service portal
  2. Get your sender/subscriber API-key credentials
  3. Clone the sdk repo
    git clone https://git.fitko.de/fit-connect/sdk-java
  4. Build the project
    mvn clean install
  5. Enter your API keys and references to your private decryption key in sdk.conf

(back to top)

External Configuration

Configuration properties e.g. for REST-API urls and proxy settings can be found in the HOCON config sdk.conf within the root folder of the project.

In order to run the SDK client a configuration needs to be provided as file in the same path as the jar (e.g. when the commandline client is used) or via reference using the environment variable CONFIG_LOCATION (e.g. when the SDK i used programmatically).

(back to top)

Usage

Sending


List<File> attachments = ... // Load e.g from local file system
        
        ClientFactory.senderClient()
        .withDestination(UUID.randomUUID())
        .withServiceType("ServiceName", "leika:key:service")
        .withAttachments(attachments)
        .withJsonData("{ caseSpecific: 'Data' }")
        .submit();

Subscribing


    var client = ClientFactory.subscriberClient();

    var submissions = client.getAvailableSubmissions(destinationId);
    
    var submissionId = ... // filter submission list for requested one ...      
            
    var submission = client.requestSubmission(submissionId)
    submission.getAttachments();
    submission.getMetadata();
    submission.getData();

(back to top)

Roadmap

  • Add Routing features
  • Add Callback handling

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contact

See FIT-Connect Contact Page for further information.

(back to top)