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
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
17 changes: 10 additions & 7 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:

1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
Expand All @@ -21,15 +22,17 @@ A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]

**Smartphone (please complete the following information):**
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]

**Additional context**
Add any other context about the problem here.
29 changes: 22 additions & 7 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

## Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making
participation in our project and our community a harassment-free experience for everyone, regardless of age, body size,
disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race,
religion, or sexual identity and orientation.

## Our Standards

Expand All @@ -24,23 +27,35 @@ Examples of unacceptable behavior by participants include:

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take
appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any
contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the
project or its community. Examples of representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed representative at an online or offline
event. Representation of a project may be further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at info@dke-data.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at
info@dke-data.com. The project team will review and investigate all complaints, and will respond in a way that it deems
appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter
of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent
repercussions as determined by other members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available
at [http://contributor-covenant.org/version/1/4][version]

[homepage]: http://contributor-covenant.org

[version]: http://contributor-covenant.org/version/1/4/
54 changes: 34 additions & 20 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

= agrirouter-sdk-java
:imagesdir: assets/images
:toc:
Expand All @@ -7,40 +6,47 @@

[abstract]
== Abstract

image::agrirouter.svg[agrirouter]

The agrirouter is a universal data exchange platform for farmers and agricultural contractors that makes it possible to connect machinery and agricultural software, regardless of vendor or manufacturer. Agrirouter does not save data; it transfers data.
As a universal data exchange platform, agrirouter fills a gap on the way to Farming 4.0. Its underlying concept unites cross-vendor and discrimination-free data transfer. You retain full control over your data. Even data exchange with service providers (e.g. agricultural contractors) and other partners is uncomplicated: Data are very rapidly transferred via the online connection, and if you wish, is intelligently connected to other datasets.
The agrirouter is a universal data exchange platform for farmers and agricultural contractors that makes it possible to connect machinery and agricultural software, regardless of vendor or manufacturer.
Agrirouter does not save data; it transfers data.
As a universal data exchange platform, agrirouter fills a gap on the way to Farming 4.0. Its underlying concept unites cross-vendor and discrimination-free data transfer.
You retain full control over your data.
Even data exchange with service providers (e.g. agricultural contractors) and other partners is uncomplicated: Data are very rapidly transferred via the online connection, and if you wish, is intelligently connected to other datasets.

== Supporters & Maintainers

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, 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.
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, 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 as well. Therefore, we have a
high interest in a stable and usable interface to connect to the agrirouter.
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 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.
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

The first step is to update the coordinates of the dependencies. With the release 2.x the coordinates changed to a new name and a new version.
The first step is to update the coordinates of the dependencies.
With the release 2.x the coordinates changed to a new name and a new version.

[xml]
----
Expand All @@ -63,7 +69,8 @@ The first step is to update the coordinates of the dependencies. With the releas

==== Update package declarations for services and internal classes

Since the package declaration was updated along with the coordinates, there will be compiler errors that should be fixed. Some classes have moved to a more meaningful package.
Since the package declaration was updated along with the coordinates, there will be compiler errors that should be fixed.
Some classes have moved to a more meaningful package.

image::migration_1-4_to_2-0/compiler-errors-before.png[Compiler errors before the migration.]

Expand All @@ -73,7 +80,9 @@ image::migration_1-4_to_2-0/package-declaration-after-refactoring.png[Package de

==== Update the usage of the enums for message types

To have a better understanding about system message types and content message types, the declaration for the different types has changed. There are two new classes, the `ContentMessageType` for content messages and the `SystemMessageType` for system messages. The former technical message type will cause a compiler error, since it was replaced.
To have a better understanding about system message types and content message types, the declaration for the different types has changed.
There are two new classes, the `ContentMessageType` for content messages and the `SystemMessageType` for system messages.
The former technical message type will cause a compiler error, since it was replaced.

image::migration_1-4_to_2-0/former-technical-message-types.png[Former message types.]

Expand Down Expand Up @@ -108,17 +117,20 @@ The `impl` module contains the implementation of the given SDK defined by the `a

=== `convenience` Module

The `convenience` module contains common implementations for different problems which are not located within the SDK. Those could be capability setting, MQTT client creation or other common problems that are normally not part of the SDK.
The `convenience` module contains common implementations for different problems which are not located within the SDK.
Those could be capability setting, MQTT client creation or other common problems that are normally not part of the SDK.

=== `test` Module

The `test` module contains integration tests not only for the SDK, but also for different scenarios.

=== Integration

If you want to add a dependency feel free to fetch the latest release from Github Packages. Please find the documentation right https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages[here].
If you want to add a dependency feel free to fetch the latest release from Github Packages.
Please find the documentation right https://help.github.com/en/packages/using-github-packages-with-your-projects-ecosystem/configuring-apache-maven-for-use-with-github-packages[here].

If you want to add the packages, you need to define the settings within your `pom` or the `settings.xml` otherwise. If you need an example, you can either have a look at the `ci/settings.xml` for general purpose or check out the snippet below for a custom `settings.xml`.
If you want to add the packages, you need to define the settings within your `pom` or the `settings.xml` otherwise.
If you need an example, you can either have a look at the `ci/settings.xml` for general purpose or check out the snippet below for a custom `settings.xml`.

[xml]
----
Expand Down Expand Up @@ -154,11 +166,13 @@ If you want to add the packages, you need to define the settings within your `po
</settings>
----

You can use this `settings.xml` and include it during the build process in a specific way. Just use `mvn clean verify -s your_path_to_the_file/settings.xml` to use the settings if they are set in a local file.
You can use this `settings.xml` and include it during the build process in a specific way.
Just use `mvn clean verify -s your_path_to_the_file/settings.xml` to use the settings if they are set in a local file.

=== Compatibility

We are supporting JDK 8 and later, releases are build using a JDK 8 to have compatibility for most users. If you need to build the current development branch, please feel free build the branch on yourself and install it to your local repository.
We are supporting JDK 8 and later, releases are build using a JDK 8 to have compatibility for most users.
If you need to build the current development branch, please feel free build the branch on yourself and install it to your local repository.

== Certificates for the communication

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties
class OnboardingError {
class Error {
class SubError {
var code: String = ""
var code: Int = 0
lateinit var message: String
lateinit var target: String
}

var code: String = ""
var code: Int = 0
lateinit var message: String
lateinit var target: String
lateinit var details: Array<SubError>
Expand All @@ -24,7 +24,7 @@ class OnboardingError {
fun unknownError(error: String): OnboardingError {
val onboardingError = OnboardingError()
onboardingError.error = Error()
onboardingError.error.code = "UNKNOWN_ERROR"
onboardingError.error.code = -1
onboardingError.error.message = "Unknown error occurred, the original error message is: $error"
onboardingError.error.target = "Unknown target"
onboardingError.error.details = arrayOf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties
class RevokingError {
class Error {
class SubError {
var code: String = ""
var code: Int = 0
lateinit var message: String
lateinit var target: String
}

var code: String = ""
var code: Int = 0
lateinit var message: String
lateinit var target: String
lateinit var details: Array<SubError>
Expand All @@ -24,7 +24,7 @@ class RevokingError {
fun unknownError(error: String): RevokingError {
val revokingError = RevokingError()
revokingError.error = Error()
revokingError.error.code = "UNKNOWN_ERROR"
revokingError.error.code = -1
revokingError.error.message = "Unknown error occurred, the original error message is: $error"
revokingError.error.target = "Unknown target"
revokingError.error.details = arrayOf()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.*;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.stream.Collectors;
Expand Down Expand Up @@ -160,8 +159,7 @@ public List<MessageParameterTuple> chunkAndBase64EncodeEachChunk(
.encodeToString(
payloadParameters
.getValue()
.toStringUtf8()
.getBytes(StandardCharsets.UTF_8))));
.toByteArray())));
return Collections.singletonList(
new MessageParameterTuple(messageHeaderParameters, payload));
}
Expand Down
Loading