Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
9aeed07
Update dependency org.apache.maven.plugins:maven-site-plugin to v4.0.…
xdev-renovate Jul 21, 2024
b9f8a59
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
xdev-renovate Jul 21, 2024
36ce21f
Merge pull request #85 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Jul 23, 2024
0dcfe5a
Merge pull request #86 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Jul 23, 2024
064a51c
Merge pull request #66 from xdev-software/master
JohannesRabauer Jul 26, 2024
0635abd
Update net.sourceforge.pmd to v7.4.0
xdev-renovate Jul 27, 2024
a1dcf66
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Jul 29, 2024
8a03acb
Merge pull request #87 from xdev-software/renovate/net.sourceforge.pmd
AB-xdev Jul 29, 2024
9e625e3
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Aug 5, 2024
99c8493
Fixed mainClass path
JohannesRabauer Aug 6, 2024
d88dcfb
Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.5
xdev-renovate Aug 12, 2024
ae41533
Update dependency maven to v3.9.9
xdev-renovate Aug 18, 2024
f247c9a
Update dependency org.apache.maven.plugins:maven-project-info-reports…
xdev-renovate Aug 22, 2024
2f8e6e2
Update dependency org.apache.maven.plugins:maven-checkstyle-plugin to…
xdev-renovate Aug 23, 2024
5cf7f3f
Update dependency org.apache.maven.plugins:maven-jxr-plugin to v3.5.0
xdev-renovate Aug 23, 2024
fdd3d61
Update dependency com.puppycrawl.tools:checkstyle to v10.18.0
xdev-renovate Aug 26, 2024
f7b9b65
Merge pull request #93 from xdev-software/renovate/com.puppycrawl.too…
AB-xdev Aug 26, 2024
f827175
Merge pull request #89 from xdev-software/renovate/maven-3.x
AB-xdev Aug 26, 2024
63071e2
Merge pull request #91 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Aug 26, 2024
3dbcf6f
Merge pull request #92 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Aug 26, 2024
36d8842
Merge pull request #90 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Aug 26, 2024
3e8774c
Merge pull request #88 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Aug 26, 2024
ca02508
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
xdev-renovate Aug 28, 2024
409f50d
Update dependency org.apache.maven.plugins:maven-pmd-plugin to v3.25.0
xdev-renovate Aug 28, 2024
bdba83b
Merge pull request #94 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Aug 28, 2024
9b0e9a1
Merge pull request #95 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Aug 28, 2024
e88198c
Update dependency com.puppycrawl.tools:checkstyle to v10.18.1
xdev-renovate Aug 31, 2024
221053a
Update net.sourceforge.pmd to v7.5.0
xdev-renovate Aug 31, 2024
ad77760
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Sep 2, 2024
4d27eed
Merge pull request #97 from xdev-software/renovate/net.sourceforge.pmd
AB-xdev Sep 2, 2024
f19c577
Merge pull request #96 from xdev-software/renovate/com.puppycrawl.too…
AB-xdev Sep 2, 2024
75f839e
Fix sonar PR detection
AB-xdev Sep 2, 2024
c78588c
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Sep 9, 2024
2bcb4a6
Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.6
xdev-renovate Sep 15, 2024
eff887a
Merge pull request #98 from xdev-software/renovate/org.apache.maven.p…
AB-xdev Sep 19, 2024
8ddfdfe
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Sep 23, 2024
4ea5cda
Update README.md
AB-xdev Sep 23, 2024
99e827c
Update README.md
AB-xdev Sep 23, 2024
40303d4
Update dependency com.mycila:license-maven-plugin to v4.6
xdev-renovate Sep 26, 2024
f8289ae
Merge pull request #99 from xdev-software/renovate/com.mycila-license…
AB-xdev Sep 27, 2024
52afc82
Update net.sourceforge.pmd to v7.6.0
xdev-renovate Sep 27, 2024
0443fe6
Merge pull request #100 from xdev-software/renovate/net.sourceforge.pmd
AB-xdev Sep 27, 2024
c0330dd
Update dependency org.apache.maven.plugins:maven-gpg-plugin to v3.2.7
xdev-renovate Sep 28, 2024
40edee3
Update dependency com.puppycrawl.tools:checkstyle to v10.18.2
xdev-renovate Sep 30, 2024
1c3916f
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Sep 30, 2024
2ce9319
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
xdev-renovate Oct 2, 2024
c6780b5
Merge pull request #103 from xdev-software/renovate/org.apache.maven.…
AB-xdev Oct 7, 2024
f4b4a6d
Merge pull request #102 from xdev-software/renovate/com.puppycrawl.to…
AB-xdev Oct 7, 2024
27ec7ab
Merge pull request #101 from xdev-software/renovate/org.apache.maven.…
AB-xdev Oct 7, 2024
1967712
Update lycheeverse/lychee-action action to v2
xdev-renovate Oct 9, 2024
0e0b2ff
Merge pull request #9 from xdev-software/renovate/lycheeverse-lychee-…
AB-xdev Oct 9, 2024
743c5c6
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Oct 9, 2024
8d8ccca
Merge branch 'develop' into update-from-template-merged
xdev-gh-bot Oct 14, 2024
57bcfc4
Update dependency org.slf4j:slf4j-api to v2.0.16
xdev-renovate Oct 15, 2024
11a01e9
Update dependency org.apache.logging.log4j:log4j-slf4j2-impl to v2.24.1
xdev-renovate Oct 15, 2024
e4df707
Update dependency org.apache.maven.plugins:maven-project-info-reports…
xdev-renovate Oct 22, 2024
c357895
bugfix. while setting identity type, it was previously not possible t…
Oct 24, 2024
e8206d6
Merge pull request #97 from defalt2111/bugfix_birthday_string_can't_b…
JohannesRabauer Oct 25, 2024
77e767c
Merge pull request #96 from xdev-software/renovate/org.apache.maven.p…
JohannesRabauer Oct 25, 2024
5a42776
Merge pull request #84 from xdev-software/renovate/org.apache.logging…
JohannesRabauer Oct 25, 2024
4563d71
Merge pull request #71 from xdev-software/renovate/org.slf4j-slf4j-ap…
JohannesRabauer Oct 25, 2024
6100b30
Minor refactoring
JohannesRabauer Oct 25, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1
uses: lycheeverse/lychee-action@v2

- name: Find already existing issue
id: find-issue
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sonar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ on:
- '.idea/**'
- 'assets/**'
pull_request:
types: [opened, synchronize, reopened]
branches: [ develop ]
paths-ignore:
- '**.md'
- '.config/**'
Expand Down
2 changes: 1 addition & 1 deletion .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.8/apache-maven-3.9.8-bin.zip
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.0.3

* ReportableSellerCreator can now create "Rechtsträger" like a company.

# 1.0.2

* The alias for the private key in the keystore is now configurable (
Expand Down
50 changes: 14 additions & 36 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,37 +8,24 @@

# bzst-dip-java-client

Client for using
the [Mass data transmission DIP (mass data
interface)](https://www.bzst.de/EN/Businesses/CESOP/electronic_data_transmission/electronic_data_transmission_node.html#js-toc-entry1).
Client for using the [Mass data transmission DIP (mass data interface)](https://www.bzst.de/EN/Businesses/CESOP/electronic_data_transmission/electronic_data_transmission_node.html#js-toc-entry1).

The BZSt (Bundeszentralamt für Steuern / Federal Central Tax Office) provides the Digital Inbox (DIP) as a service
for payment service providers to transmit financial data.
The BZSt (Bundeszentralamt für Steuern / Federal Central Tax Office) provides the Digital Inbox (DIP) as a service for payment service providers to transmit financial data.

Clients need to register / login
at [BZSt online.portal](https://www.bzst.de/DE/Service/Portalinformation/Massendaten/DIP/dip.html?nn=68828)
through [Elster](https://www.elster.de/elsterweb/start), [BundID](https://id.bund.de/de)
or [BZSt Online-Portal (BOP)](https://www.elster.de/bportal/start).
Clients need to register / login at [BZSt online.portal](https://www.bzst.de/DE/Service/Portalinformation/Massendaten/DIP/dip.html?nn=68828) through [Elster](https://www.elster.de/elsterweb/start), [BundID](https://id.bund.de/de) or [BZSt Online-Portal (BOP)](https://www.elster.de/bportal/start).

See
the [BZSt Information](https://www.bzst.de/EN/Service/Portalinformation/Login/login_node.html)
for more information.
See the [BZSt Information](https://www.bzst.de/EN/Service/Portalinformation/Login/login_node.html) for more information.

*Warning*: **BZSt Online-Portal** (deprecated) is different from **BZSt online.portal**.
> [!NOTE]
> **BZSt Online-Portal** (deprecated) is different from **BZSt online.portal**.

## Rationale

We created this client to make it as easy as possible for the developer to use the BZSt DIP.
Through usage of the builder pattern (see [Configuration](#configuration) below), DTOs
and a typesafe data model we ensure high usability and readability.
Through usage of the builder pattern (see [Configuration](#configuration) below), DTOs and a typesafe data model we ensure high usability and readability.

The BZSt
provides [XSD](https://www.bzst.de/SharedDocs/Downloads/DE/Digitale_Plattformbetreiber/amtlicher_datensatz_entwurf) that
define the expected XML structure and
make it possible to generate java
classes ([BZSt Docs](https://www.bzst.de/DE/Unternehmen/Intern_Informationsaustausch/DAC7/Handbuecher/handbuecher.html?nn=127558#js-toc-entry2)).
Our library validates each
request through these XSD find errors before they are sent to the DIP.
The BZSt provides [XSD](https://www.bzst.de/SharedDocs/Downloads/DE/Digitale_Plattformbetreiber/amtlicher_datensatz_entwurf) that define the expected XML structure and make it possible to generate java classes ([BZSt Docs](https://www.bzst.de/DE/Unternehmen/Intern_Informationsaustausch/DAC7/Handbuecher/handbuecher.html?nn=127558#js-toc-entry2)).<br/>
Our library validates each request through these XSD find errors before they are sent to the DIP.

## Installation
[Installation guide for the latest release](https://github.com/xdev-software/bzst-dip-java-client/releases/latest#Installation)
Expand All @@ -51,9 +38,7 @@ See the [examples in the demo package](./bzst-dip-java-client-demo/src/main/java

For authentification at the BZST you have to create a public- and private-key.

First you have to create a **PEM** file as described on
the [BZST Website](https://www.bzst.de/SharedDocs/Downloads/DE/EOP_BOP/khb_dip.pdf?__blob=publicationFile&v=9) (see
1.7).
First you have to create a **PEM** file as described on the [BZST Website](https://www.bzst.de/DE/Service/Portalinformation/Massendaten/DIP/dip_node.html) (see 1.7).

OpenSSL can be downloaded from their [website](https://www.openssl.org/).

Expand All @@ -67,15 +52,13 @@ Next you have to convert that file to a **PKCS12** file.
openssl pkcs12 -export -in cert.pem -inkey key.pem -out certificate.p12 -name "certificate"
```

The [keytool](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) is contained in your JDK
installation.
The [keytool](https://docs.oracle.com/javase/8/docs/technotes/tools/unix/keytool.html) is contained in your JDK installation.

```
keytool -importkeystore -srckeystore certificate.p12 -srcstoretype pkcs12 -destkeystore cert.jks
```

The password you insert here, along with the file itself must be set in the client configuration. See example
at [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties):
The password you insert here, along with the file itself must be set in the client configuration. See example at [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties):

```
certificate.keystore.password=SECRET_PASSWORD
Expand All @@ -101,11 +84,7 @@ client.id=abcd1234-ab12-ab12-ab12-abcdef123456

### Configuration

The client can be configured through a properties file (
see [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties)
and [ApplicationWithConfigurationFromProperties.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithConfigurationFromProperties.java))
or by creating a configuration object (
see [Application.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/Application.java)).
The client can be configured through a properties file (see [app.properties](./bzst-dip-java-client-demo/src/main/resources/app.properties) and [ApplicationWithConfigurationFromProperties.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/ApplicationWithConfigurationFromProperties.java)) or by creating a configuration object (see [Application.java](./bzst-dip-java-client-demo/src/main/java/software/xdev/Application.java)).

```java
public static BzstDipConfiguration createConfiguration()
Expand All @@ -130,8 +109,7 @@ public static BzstDipConfiguration createConfiguration()

## Support

If you need support as soon as possible, and you can't wait for any pull request, feel free to
use [our support](https://xdev.software/en/services/support).
If you need support as soon as possible, and you can't wait for any pull request, feel free to use [our support](https://xdev.software/en/services/support).

## Contributing
See the [contributing guide](./CONTRIBUTING.md) for detailed instructions on how to get started with our project.
Expand Down
4 changes: 2 additions & 2 deletions bzst-dip-java-client-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

<mainClass>software.xdev.bzst.dip.client.Application</mainClass>
<mainClass>software.xdev.Application</mainClass>
</properties>

<dependencies>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>2.23.1</version>
<version>2.24.1</version>
</dependency>
</dependencies>

Expand Down
24 changes: 12 additions & 12 deletions bzst-dip-java-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>2.0.13</version>
<version>2.0.16</version>
</dependency>
<dependency>
<groupId>com.opencsv</groupId>
Expand All @@ -138,7 +138,7 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-slf4j2-impl</artifactId>
<version>2.23.1</version>
<version>2.24.1</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand Down Expand Up @@ -177,15 +177,15 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>3.6.2</version>
<version>3.8.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>com.mycila</groupId>
<artifactId>license-maven-plugin</artifactId>
<version>4.5</version>
<version>4.6</version>
<configuration>
<properties>
<email>${project.organization.url}</email>
Expand Down Expand Up @@ -225,7 +225,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.8.0</version>
<version>3.10.1</version>
<executions>
<execution>
<id>attach-javadocs</id>
Expand Down Expand Up @@ -281,7 +281,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.2.4</version>
<version>3.2.7</version>
<executions>
<execution>
<id>sign-artifacts</id>
Expand Down Expand Up @@ -324,12 +324,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.17.0</version>
<version>10.18.2</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -355,7 +355,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.24.0</version>
<version>3.25.0</version>
<configuration>
<includeTests>true</includeTests>
<printFailingErrors>true</printFailingErrors>
Expand All @@ -367,12 +367,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.3.0</version>
<version>7.6.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.3.0</version>
<version>7.6.0</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -384,7 +384,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
</plugin>
</plugins>
</reporting>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,11 @@ public CorrectableReportableSellerType toXmlType(final BzstDipConfiguration conf
this.tin.toXmlType(),
this.handelsregisternummer,
this.vat,
this.firstName,
this.firstName == null ? ReportableSellerCreator.NULL_STRING : this.firstName,
this.lastName,
this.birthDate.format(DateTimeFormatter.ISO_LOCAL_DATE),
this.birthDate == null
? ReportableSellerCreator.NULL_STRING
: this.birthDate.format(DateTimeFormatter.ISO_LOCAL_DATE),
this.legalAddress.toXmlType(),
this.addressFix.toXmlType(),
this.numberOfActivities.toXmlType(),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
public class ReportableSellerCreator
{
private static final Logger LOGGER = LoggerFactory.getLogger(ReportableSellerCreator.class);
public static final String NULL_STRING = "NULL";
private final BzstDipConfiguration configuration;

public ReportableSellerCreator(final BzstDipConfiguration configuration)
Expand Down Expand Up @@ -337,7 +338,7 @@ private static OrganisationPartyType createOrganisationPartyType(
*/
public static boolean isNULLAsString(final String checkNULLString)
{
return checkNULLString.equals("NULL");
return checkNULLString.equals(NULL_STRING);
}

private static OrganisationINType createIN(final String in)
Expand Down
12 changes: 6 additions & 6 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
<dependencies>
<dependency>
<groupId>com.puppycrawl.tools</groupId>
<artifactId>checkstyle</artifactId>
<version>10.17.0</version>
<version>10.18.2</version>
</dependency>
</dependencies>
<configuration>
Expand All @@ -70,7 +70,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.24.0</version>
<version>3.25.0</version>
<configuration>
<includeTests>true</includeTests>
<printFailingErrors>true</printFailingErrors>
Expand All @@ -82,12 +82,12 @@
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-core</artifactId>
<version>7.3.0</version>
<version>7.6.0</version>
</dependency>
<dependency>
<groupId>net.sourceforge.pmd</groupId>
<artifactId>pmd-java</artifactId>
<version>7.3.0</version>
<version>7.6.0</version>
</dependency>
</dependencies>
</plugin>
Expand All @@ -99,7 +99,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>3.4.0</version>
<version>3.5.0</version>
</plugin>
</plugins>
</reporting>
Expand Down