Skip to content
This repository was archived by the owner on May 8, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9551928
Update build scripts and dependencies in pom.xml
saschadoemer Nov 27, 2023
206425f
Update build scripts and dependencies in pom.xml
saschadoemer Nov 27, 2023
960b41b
Update JAX-RS dependency in pom.xml
saschadoemer Nov 27, 2023
6fa62c4
Updated dependencies from JavaEE to JakartaEE and Kotlin Version
saschadoemer Nov 27, 2023
3c49e7d
Update onboarding and request setup, refactor keystore creation
saschadoemer Dec 13, 2023
fb319b3
Update request setup and keystore creation methods
saschadoemer Dec 13, 2023
6d8e077
Remove unnecessary dependencies and refactor REST calls
saschadoemer Dec 13, 2023
0ee5410
Adjust formatting and indentation for readability
saschadoemer Dec 13, 2023
69a1671
Remove unused files MessageConfirmationRequest and MessageSendingResult
saschadoemer Dec 13, 2023
745185f
Remove specific exception classes
saschadoemer Dec 13, 2023
10b4d26
Remove RegistrationCodeResponse class and make minor updates
saschadoemer Dec 13, 2023
556a051
Remove redundant constructor in CouldNotCreateMqttOptionException class
saschadoemer Dec 13, 2023
0253994
Refactor IllegalParameterDefinitionException class
saschadoemer Dec 13, 2023
0b55b54
improves code readability and ensures the correct use of the class, b…
saschadoemer Dec 13, 2023
52f8ac1
Fixed client ID assignment in MqttClientService
saschadoemer Dec 13, 2023
6127ed0
Remove unnecessary semicolons in RouterDevice
saschadoemer Dec 13, 2023
439f03d
Add @SuppressWarnings annotation to UtcTimeService class
saschadoemer Dec 13, 2023
59754ad
Refactor ContentReader and RevokingService classes
saschadoemer Dec 13, 2023
f58f1ba
Add suppression annotation to AuthorizationResponse
saschadoemer Dec 13, 2023
e5d762f
Add suppression annotations for unused elements
saschadoemer Dec 13, 2023
09498e7
Suppress unused warnings across project
saschadoemer Dec 13, 2023
31da0bf
Refactor code for better readability and suppression warnings
saschadoemer Dec 13, 2023
3f2f005
Implement changes in MessageQueryServiceImpl
saschadoemer Dec 13, 2023
039e11f
Refactor CloudOnboardingServiceImpl for less warnings and better read…
saschadoemer Dec 13, 2023
1b90e6f
Refactor CloudOffboardingServiceImpl for warning reduction and readab…
saschadoemer Dec 13, 2023
85cf6e7
Refactor SetSubscriptionServiceImpl and SetCapabilityServiceImpl for …
saschadoemer Dec 13, 2023
6075ff4
Refactor ListEndpointsServiceImpl for readability
saschadoemer Dec 13, 2023
9b0a8c5
Remove unused imports across multiple files
saschadoemer Dec 13, 2023
69f6216
Updated code to improve readability and maintainability
saschadoemer Dec 13, 2023
477935a
Refactor codebase to use 'var' keyword for better readability
saschadoemer Dec 13, 2023
0da1983
Remove unused import in AuthorizationRequestServiceImpl.java
saschadoemer Dec 13, 2023
784577b
Clean up unused imports in multiple files
saschadoemer Dec 13, 2023
65a5908
Remove unused CertificationTypeNotSupportedException
saschadoemer Dec 13, 2023
377b47a
Refactor code and address compiler warnings
saschadoemer Dec 13, 2023
45a64df
Removed unused imports and fixed grammar in README
saschadoemer Dec 13, 2023
1bb0934
Suppress warnings and refactor test in SDK
saschadoemer Dec 13, 2023
36b69bd
Update version of Agrirouter SDK Java
saschadoemer Dec 13, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 7 additions & 20 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,33 +9,33 @@ on:
- "main"

jobs:
build_jdk8:
build_jdk17:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 17
distribution: zulu
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B package --file pom.xml --settings ci/settings.xml -DskipTests=true
build_jdk11:
build_jdk21:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 11
java-version: 21
distribution: zulu
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B package --file pom.xml --settings ci/settings.xml -DskipTests=true
build_jdk17:
integration_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -44,19 +44,6 @@ jobs:
with:
java-version: 17
distribution: zulu
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B package --file pom.xml --settings ci/settings.xml -DskipTests=true
integration_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
- name: Build with Maven
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
tags:
- 1.*
- 2.*
- 3.*

jobs:
deploy:
Expand All @@ -14,7 +15,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: 8
java-version: 17
distribution: zulu
- name: Build with Maven
env:
Expand Down
10 changes: 5 additions & 5 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,27 +16,27 @@ As a universal data exchange platform, agrirouter fills a gap on the way to Farm
image::lmis.svg[agrirouter]

The LMIS AG is a recognised german IT service company, certified according to DIN EN ISO 9001:2015 and based in
Osnabrück, Berlin, Friedland and Wuppertal. Our core competence is the individual development, optimisation and support
Osnabrück, Berlin, Friedland and Wuppertal. Our core competence is the individual development, optimization and support
of IT solutions. We also provide professional IT consulting services and training courses. We have been supporting
the whole project during the development in the field of test management and are currently responsible for the development
support of the platform.

We are active maintainers of the SDK and are using the SDK for internal testing purposes as well. Therefore we have a
We are active maintainers of the SDK and are using the SDK for internal testing as well. Therefore, we have a
high interest in a stable and usable interface to connect to the agrirouter.

Feel free to get in touch by visiting our https://www.lmis.de[website] or contacting us via GitHub.

== The current project you're looking at

This project contains the SDK for the communication with the agrirouter. Everything you need for the onboarding process, secure communication and much more.
This project contains the SDK for the communication with the agrirouter. Everything you need for the onboarding process, secure communication, and much more.

== Releases

The release workflow follows the https://docs.microsoft.com/en-us/azure/devops/repos/git/git-branching-guidance?view=azure-devops[Microsoft DevOps Release Model] where a release shows up as a branch in the repository.

=== Update from 1.4.x to 2.x

The update for the new release includes some breaking changes. To have a rough overview what has to be done to have the new features from 2.x in you application, please see the following migration / update guide when updating.
The update for the new release includes some breaking changes. To have a rough overview of what has to be done to have the new features from 2.x in your application, please see the following migration / update guide when updating.

==== Update the Maven dependencies

Expand Down Expand Up @@ -181,7 +181,7 @@ If you try to add the command, please be aware, that the containing PEM file has
* There are no trailing spaces on each line.
* The certificate is saved as a .p7b.

If the files does not meet those requirements, the import will not be possible.
If the files do not meet those requirements, the import will not be possible.
The certificates are part of the integration guide which can be found in the external resources.

== External resources
Expand Down
4 changes: 2 additions & 2 deletions agrirouter-sdk-java-api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>com.agrirouter.api</groupId>
<artifactId>agrirouter-sdk-java</artifactId>
<version>2.3.0</version>
<version>3.0.0</version>
</parent>
<name>AGRIROUTER SDK JAVA - API</name>
<artifactId>agrirouter-sdk-java-api</artifactId>
Expand Down Expand Up @@ -59,7 +59,7 @@
<plugin>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-maven-plugin</artifactId>
<version>${kotlin.version}</version>
<version>1.9.0</version>
<executions>
<execution>
<id>compile</id>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
package com.dke.data.agrirouter.api.cancellation;

/** Cancellation token to enable custom implementations integration within the solution. */
/**
* Cancellation token to enable custom implementations integration within the solution.
*/
public interface CancellationToken {

/**
* Signals the polling that the operation can be cancelled.
*
* @return true if the operation can be cancelled, false otherwise.
*/
boolean isNotCancelled();
/**
* Signals the polling that the operation can be cancelled.
*
* @return true if the operation can be cancelled, false otherwise.
*/
boolean isNotCancelled();

/**
* Will be called if one step during the whole polling mechanism is done and the next iteration
* will start afterwards.
*/
void nextStep();
/**
* Will be called if one step during the whole polling mechanism is done and the next iteration
* will start afterwards.
*/
void nextStep();

/** Will wait a dedicated amount of time before starting the next step. */
void waitIfNotCancelled();
/**
* Will wait a dedicated amount of time before starting the next step.
*/
void waitIfNotCancelled();
}
Original file line number Diff line number Diff line change
@@ -1,38 +1,40 @@
package com.dke.data.agrirouter.api.cancellation;

/** Default - time based - implementation of the cancellation token. */
/**
* Default - time based - implementation of the cancellation token.
*/
public class DefaultCancellationToken implements CancellationToken {

private int nrOfTries;
private final int maxTries;
private final long timeToWait;
private boolean wasInterrupted;
private int nrOfTries;
private final int maxTries;
private final long timeToWait;
private boolean wasInterrupted;

public DefaultCancellationToken(int maxTries, long timeToWait) {
this.nrOfTries = 0;
this.maxTries = maxTries;
this.timeToWait = timeToWait;
this.wasInterrupted = false;
}
public DefaultCancellationToken(int maxTries, long timeToWait) {
this.nrOfTries = 0;
this.maxTries = maxTries;
this.timeToWait = timeToWait;
this.wasInterrupted = false;
}

@Override
public boolean isNotCancelled() {
return nrOfTries < maxTries && !wasInterrupted;
}
@Override
public boolean isNotCancelled() {
return nrOfTries < maxTries && !wasInterrupted;
}

@Override
public void nextStep() {
nrOfTries++;
}
@Override
public void nextStep() {
nrOfTries++;
}

@Override
public void waitIfNotCancelled() {
if (isNotCancelled()) {
try {
Thread.sleep(timeToWait);
} catch (InterruptedException nop) {
wasInterrupted = true;
}
@Override
public void waitIfNotCancelled() {
if (isNotCancelled()) {
try {
Thread.sleep(timeToWait);
} catch (InterruptedException nop) {
wasInterrupted = true;
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package com.dke.data.agrirouter.api.cancellation;

/**
* Non-retry implementation of the cancellation token.
*/
@SuppressWarnings("unused")
public class NonRetryCancellationToken implements CancellationToken {

public NonRetryCancellationToken() {
}

@Override
public boolean isNotCancelled() {
return true;
}

@Override
public void nextStep() {
// Do nothing
}

@Override
public void waitIfNotCancelled() {
// Do nothing
}
}
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
package com.dke.data.agrirouter.api.env;

/** Constants for the SDK. */
/**
* Constants for the SDK.
*/
public interface Constants {
String DEFAULT_PASSWORD = "changeit";
String PROTOCOL = "TLSv1.2";
String CERT_ALIAS = "cert-alias";
String KEY_ALIAS = "key-alias";
String DEFAULT_PASSWORD = "changeit";
String PROTOCOL = "TLSv1.2";
String CERT_ALIAS = "cert-alias";
String KEY_ALIAS = "key-alias";
}
Loading