/urlaubsverwaltung-extension-api

Urlaubsverwaltung Extension Java API

Primary LanguageJavaApache License 2.0Apache-2.0

Urlaubsverwaltung Extension Java API

This project provides DTOs and service interfaces to write own extensions for Urlaubsverwaltung.

Requirements

This project requires Java 21 compiler.

Usage

Include Urlaubsverwaltung Extension Java API to your project:

<dependency>
    <groupId>de.focus-shift.urlaubsverwaltung.extension.api</groupId>
    <artifactId>service</artifactId>
    <version>...</version>
</dependency>

After that, create a java class and use one of the *ServiceExtension classes like PersonServiceExtension:

package my.custom.package;

import java.util.Set;
import java.util.UUID;

public class PersonServiceExtensionDemo {

    private final PersonServiceExtension personServiceExtension;

    public PersonServiceExtensionTest(PersonServiceExtension personServiceExtension) {
        this.personServiceExtension = personServiceExtension;
    }

    void doSomething() {
        PersonDTO myPerson = PersonDTO.builder()
                .firstName("Marlene")
                .lastName("Muster")
                .username(UUID.randomUUID().toString())
                .email("office@example.org")
                .permissions(Set.of(RoleDTO.OFFICE))
                .build();

        PersonDTO createdPerson = personServiceExtension.create(myPerson);
    }
}

Package your extension and run Urlaubsverwaltung with PropertiesLauncher

Implementation Status

The following extension points are provided:

  • absence
  • account
  • application
  • department
  • overtime
  • person
  • publicholiday
  • settings
  • sicknote
  • user
  • workingtime

Compatibility

Extension API Version Urlaubsverwaltung Version Java Version
1.x.x 5.x.x 21.x
0.x.x 4.x.x 11.x

License

Urlaubsverwaltung Extension Java API is Open Source software released under the Apache License 2.0.