Skip to content

Java-API

This is the API-Documentation, holding detailed information for each publicly available action you can do with each class. Below the structure of the library is explained and some generic examples are shown.

library structure

The library is structured into three packages:

  1. de.hftstuttgart.unifiedticketing.core
  2. de.hftstuttgart.unifiedticketing.exceptions
  3. de.hftstuttgart.unifiedticketing.systems

The core package contains the classes defining the generic API, to be implemented by each supported system.
The systems package contains a sub-package per supported system, which then holds the implementations of the core classes.
The exceptions package has some own exception types, used throughout the lib.

For each package, this documentation provides a chapter in the navigation on the left.

examples

Info

These examples are not specific to a certain system. Therefore they can contain placeholders for system specific parts. To get these parts, you'll have to go to the dedicated API-docs part.

create TicketSystem instance

from builder:

1
2
3
TicketSystem ts = TicketSystem.fromBuilder()
    .<methods specifying connection details>
    .build();

from uri:

1
TicketSystem ts = TicketSystem.fromUri(<uri>);

searching tickets

without filters:

1
ts.find().get();

only open tickets and explicit pagination:

1
2
3
4
5
ts.find()
    .isOpen()
    .setPage(1)
    .setPageSize(10)
    .get();

default pagination

many systems have an implicit default pagination enabled, which could block you from simply getting all tickets.

Tip

you can ask the TicketSystem object, to tell you if it uses a default pagination:

1
ts.hasDefaultPagination();