Skip to content

FINTmodels/fint-event-model

Repository files navigation

FINT Event Model

Build Status Coverage Status

Event model for FINT

Installation

build.gradle

repositories {
    maven {
        url  "http://dl.bintray.com/fint/maven"
    }
}

compile('no.fint:fint-event-model:3.0.0')

Usage

Create new Event.

Event<String> event = new Event<>("rogfk.no", "FK1", "GET_ALL", "VFS");

with action enum

Event<String> event = new Event<>("rogfk.no", "FK1", DefaultActions.HEALTH, "test");

Transform Event to json.

String json = EventUtil.toJson(event);

Transform json to Event.

Event event = EventUtil.toEvent(json);

Convert Event data into objects.

List<TestDto> eventData = EventUtil.convertEventData(event, new TypeReference<List<TestDto>>() {});