Skip to content

Commit

Permalink
Updated to changed peppol-directory-businesscard module
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Nov 13, 2023
1 parent fff9672 commit 653c01b
Show file tree
Hide file tree
Showing 14 changed files with 77 additions and 69 deletions.
12 changes: 10 additions & 2 deletions phoss-smp-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@
<description>SMP backend library with all common parts used for a full SMP server web application</description>
<url>https://github.com/phax/phoss-smp/phoss-smp-backend</url>
<inceptionYear>2015</inceptionYear>

<licenses>
<license>
<name>MPL 2.0</name>
<url>http://mozilla.org/MPL/2.0/</url>
<distribution>repo</distribution>
</license>
</licenses>

<organization>
<name>Philip Helger</name>
<url>http://www.helger.com</url>
</organization>

<developers>
<developer>
<id>philip</id>
Expand All @@ -43,6 +46,7 @@
<url>http://www.helger.com</url>
</developer>
</developers>

<dependencies>
<dependency>
<groupId>com.helger.commons</groupId>
Expand Down Expand Up @@ -77,18 +81,20 @@
<artifactId>ph-oton-core</artifactId>
</dependency>
<dependency>
<groupId>com.helger</groupId>
<artifactId>phoss-directory-businesscard</artifactId>
<groupId>com.helger.peppol</groupId>
<artifactId>peppol-directory-businesscard</artifactId>
</dependency>
<dependency>
<groupId>com.helger</groupId>
<artifactId>ph-xmldsig</artifactId>
</dependency>

<dependency>
<groupId>jakarta.servlet</groupId>
<artifactId>jakarta.servlet-api</artifactId>
<scope>provided</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Expand All @@ -99,6 +105,7 @@
<artifactId>ph-oton-security</artifactId>
<optional>true</optional>
</dependency>

<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
Expand All @@ -110,6 +117,7 @@
<scope>test</scope>
</dependency>
</dependencies>

<build>
<resources>
<!-- Hack to filter only properties files -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
import com.helger.commons.annotation.ReturnsMutableCopy;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.id.IHasID;
import com.helger.pd.businesscard.v3.PD3BusinessCardType;
import com.helger.peppol.businesscard.v3.PD3BusinessCardType;
import com.helger.peppolid.IParticipantIdentifier;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import com.helger.commons.hashcode.HashCodeGenerator;
import com.helger.commons.string.ToStringGenerator;
import com.helger.commons.type.ObjectType;
import com.helger.pd.businesscard.v3.PD3APIHelper;
import com.helger.pd.businesscard.v3.PD3BusinessCardType;
import com.helger.peppol.businesscard.v3.PD3APIHelper;
import com.helger.peppol.businesscard.v3.PD3BusinessCardType;
import com.helger.peppolid.IParticipantIdentifier;
import com.helger.phoss.smp.domain.servicegroup.SMPServiceGroup;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
import com.helger.commons.id.factory.GlobalIDFactory;
import com.helger.commons.string.StringHelper;
import com.helger.commons.string.ToStringGenerator;
import com.helger.pd.businesscard.generic.PDContact;
import com.helger.pd.businesscard.v3.PD3ContactType;
import com.helger.peppol.businesscard.generic.PDContact;
import com.helger.peppol.businesscard.v3.PD3ContactType;

/**
* A single business card contact.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@
import com.helger.commons.string.ToStringGenerator;
import com.helger.json.IJsonArray;
import com.helger.json.JsonArray;
import com.helger.pd.businesscard.generic.PDBusinessEntity;
import com.helger.pd.businesscard.generic.PDContact;
import com.helger.pd.businesscard.generic.PDIdentifier;
import com.helger.pd.businesscard.generic.PDName;
import com.helger.pd.businesscard.v3.PD3BusinessEntityType;
import com.helger.peppol.businesscard.generic.PDBusinessEntity;
import com.helger.peppol.businesscard.generic.PDContact;
import com.helger.peppol.businesscard.generic.PDIdentifier;
import com.helger.peppol.businesscard.generic.PDName;
import com.helger.peppol.businesscard.v3.PD3BusinessEntityType;

/**
* This class represents a single Business Card entity - a part of a Business
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import com.helger.commons.id.IHasID;
import com.helger.commons.id.factory.GlobalIDFactory;
import com.helger.commons.string.ToStringGenerator;
import com.helger.pd.businesscard.generic.PDIdentifier;
import com.helger.pd.businesscard.v3.PD3APIHelper;
import com.helger.pd.businesscard.v3.PD3IdentifierType;
import com.helger.peppol.businesscard.generic.PDIdentifier;
import com.helger.peppol.businesscard.v3.PD3APIHelper;
import com.helger.peppol.businesscard.v3.PD3IdentifierType;

/**
* A single business card identifier.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
import com.helger.commons.string.ToStringGenerator;
import com.helger.json.IJsonObject;
import com.helger.json.JsonObject;
import com.helger.pd.businesscard.generic.PDName;
import com.helger.pd.businesscard.v3.PD3APIHelper;
import com.helger.pd.businesscard.v3.PD3MultilingualNameType;
import com.helger.peppol.businesscard.generic.PDName;
import com.helger.peppol.businesscard.v3.PD3APIHelper;
import com.helger.peppol.businesscard.v3.PD3MultilingualNameType;

/**
* Generic name.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@
import com.helger.commons.statistics.IMutableStatisticsHandlerKeyedCounter;
import com.helger.commons.statistics.IStatisticsHandlerKeyedCounter;
import com.helger.commons.statistics.StatisticsManager;
import com.helger.pd.businesscard.generic.PDBusinessCard;
import com.helger.pd.businesscard.generic.PDBusinessEntity;
import com.helger.pd.businesscard.v3.PD3BusinessCardType;
import com.helger.peppol.businesscard.generic.PDBusinessCard;
import com.helger.peppol.businesscard.generic.PDBusinessEntity;
import com.helger.peppol.businesscard.v3.PD3BusinessCardType;
import com.helger.peppolid.IParticipantIdentifier;
import com.helger.peppolid.factory.IIdentifierFactory;
import com.helger.phoss.smp.domain.SMPMetaManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@
import com.helger.commons.io.resource.FileSystemResource;
import com.helger.commons.string.StringHelper;
import com.helger.http.basicauth.BasicAuthClientCredentials;
import com.helger.pd.businesscard.v1.PD1APIHelper;
import com.helger.pd.businesscard.v1.PD1BusinessCardType;
import com.helger.pd.businesscard.v1.PD1BusinessEntityType;
import com.helger.pd.businesscard.v2.PD2APIHelper;
import com.helger.pd.businesscard.v2.PD2BusinessCardType;
import com.helger.pd.businesscard.v2.PD2BusinessEntityType;
import com.helger.pd.businesscard.v3.PD3APIHelper;
import com.helger.pd.businesscard.v3.PD3BusinessCardType;
import com.helger.pd.businesscard.v3.PD3BusinessEntityType;
import com.helger.peppol.businesscard.v1.PD1APIHelper;
import com.helger.peppol.businesscard.v1.PD1BusinessCardType;
import com.helger.peppol.businesscard.v1.PD1BusinessEntityType;
import com.helger.peppol.businesscard.v2.PD2APIHelper;
import com.helger.peppol.businesscard.v2.PD2BusinessCardType;
import com.helger.peppol.businesscard.v2.PD2BusinessEntityType;
import com.helger.peppol.businesscard.v3.PD3APIHelper;
import com.helger.peppol.businesscard.v3.PD3BusinessCardType;
import com.helger.peppol.businesscard.v3.PD3BusinessEntityType;
import com.helger.peppolid.IParticipantIdentifier;
import com.helger.peppolid.factory.PeppolIdentifierFactory;
import com.helger.peppolid.simple.participant.SimpleParticipantIdentifier;
Expand Down Expand Up @@ -81,9 +81,9 @@ public final class BusinessCardInterfaceTest
public final SMPServerRESTTestRule m_aRule = new SMPServerRESTTestRule (new FileSystemResource ("src/test/resources/test-smp-server-xml-peppol.properties"));

private final ObjectFactory m_aObjFactory = new ObjectFactory ();
private final com.helger.pd.businesscard.v1.ObjectFactory m_aBC1ObjFactory = new com.helger.pd.businesscard.v1.ObjectFactory ();
private final com.helger.pd.businesscard.v2.ObjectFactory m_aBC2ObjFactory = new com.helger.pd.businesscard.v2.ObjectFactory ();
private final com.helger.pd.businesscard.v3.ObjectFactory m_aBC3ObjFactory = new com.helger.pd.businesscard.v3.ObjectFactory ();
private final com.helger.peppol.businesscard.v1.ObjectFactory m_aBC1ObjFactory = new com.helger.peppol.businesscard.v1.ObjectFactory ();
private final com.helger.peppol.businesscard.v2.ObjectFactory m_aBC2ObjFactory = new com.helger.peppol.businesscard.v2.ObjectFactory ();
private final com.helger.peppol.businesscard.v3.ObjectFactory m_aBC3ObjFactory = new com.helger.peppol.businesscard.v3.ObjectFactory ();

@Nonnull
private static Builder _addCredentials (@Nonnull final Builder aBuilder)
Expand Down Expand Up @@ -129,8 +129,8 @@ public void testGetCreateV1GetDeleteGet ()
try
{
// Create SG
aResponseMsg = _addCredentials (aTarget.path (sPI)
.request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (aSG)));
aResponseMsg = _addCredentials (aTarget.path (sPI).request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (
aSG)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get SG - must work
Expand All @@ -155,9 +155,8 @@ public void testGetCreateV1GetDeleteGet ()
aBE.setGeographicalInformation ("Berlin");
aBC.addBusinessEntity (aBE);

aResponseMsg = _addCredentials (aTarget.path ("businesscard")
.path (sPI)
.request ()).put (Entity.xml (m_aBC1ObjFactory.createBusinessCard (aBC)));
aResponseMsg = _addCredentials (aTarget.path ("businesscard").path (sPI).request ()).put (Entity.xml (
m_aBC1ObjFactory.createBusinessCard (aBC)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get BC - must work (always V3)
Expand All @@ -174,9 +173,8 @@ public void testGetCreateV1GetDeleteGet ()
aBE.setCountryCode ("SE");
aBE.setGeographicalInformation ("Stockholm");
aBC.addBusinessEntity (aBE);
aResponseMsg = _addCredentials (aTarget.path ("businesscard")
.path (sPI)
.request ()).put (Entity.xml (m_aBC1ObjFactory.createBusinessCard (aBC)));
aResponseMsg = _addCredentials (aTarget.path ("businesscard").path (sPI).request ()).put (Entity.xml (
m_aBC1ObjFactory.createBusinessCard (aBC)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get BC - must work (always V3)
Expand Down Expand Up @@ -228,8 +226,8 @@ public void testGetCreateV2GetDeleteGet ()
try
{
// Create SG
aResponseMsg = _addCredentials (aTarget.path (sPI)
.request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (aSG)));
aResponseMsg = _addCredentials (aTarget.path (sPI).request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (
aSG)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get SG - must work
Expand All @@ -254,9 +252,8 @@ public void testGetCreateV2GetDeleteGet ()
aBE.setGeographicalInformation ("Berlin");
aBC.addBusinessEntity (aBE);

aResponseMsg = _addCredentials (aTarget.path ("businesscard")
.path (sPI)
.request ()).put (Entity.xml (m_aBC2ObjFactory.createBusinessCard (aBC)));
aResponseMsg = _addCredentials (aTarget.path ("businesscard").path (sPI).request ()).put (Entity.xml (
m_aBC2ObjFactory.createBusinessCard (aBC)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get BC - must work (always V3)
Expand All @@ -273,9 +270,8 @@ public void testGetCreateV2GetDeleteGet ()
aBE.setCountryCode ("SE");
aBE.setGeographicalInformation ("Stockholm");
aBC.addBusinessEntity (aBE);
aResponseMsg = _addCredentials (aTarget.path ("businesscard")
.path (sPI)
.request ()).put (Entity.xml (m_aBC2ObjFactory.createBusinessCard (aBC)));
aResponseMsg = _addCredentials (aTarget.path ("businesscard").path (sPI).request ()).put (Entity.xml (
m_aBC2ObjFactory.createBusinessCard (aBC)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get BC - must work (always V3)
Expand Down Expand Up @@ -327,8 +323,8 @@ public void testGetCreateV3GetDeleteGet ()
try
{
// Create SG
aResponseMsg = _addCredentials (aTarget.path (sPI)
.request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (aSG)));
aResponseMsg = _addCredentials (aTarget.path (sPI).request ()).put (Entity.xml (m_aObjFactory.createServiceGroup (
aSG)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get SG - must work
Expand All @@ -353,9 +349,8 @@ public void testGetCreateV3GetDeleteGet ()
aBE.setGeographicalInformation ("Berlin");
aBC.addBusinessEntity (aBE);

aResponseMsg = _addCredentials (aTarget.path ("businesscard")
.path (sPI)
.request ()).put (Entity.xml (m_aBC3ObjFactory.createBusinessCard (aBC)));
aResponseMsg = _addCredentials (aTarget.path ("businesscard").path (sPI).request ()).put (Entity.xml (
m_aBC3ObjFactory.createBusinessCard (aBC)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get BC - must work (always V3)
Expand All @@ -372,9 +367,8 @@ public void testGetCreateV3GetDeleteGet ()
aBE.setCountryCode ("SE");
aBE.setGeographicalInformation ("Stockholm");
aBC.addBusinessEntity (aBE);
aResponseMsg = _addCredentials (aTarget.path ("businesscard")
.path (sPI)
.request ()).put (Entity.xml (m_aBC3ObjFactory.createBusinessCard (aBC)));
aResponseMsg = _addCredentials (aTarget.path ("businesscard").path (sPI).request ()).put (Entity.xml (
m_aBC3ObjFactory.createBusinessCard (aBC)));
_testResponseJerseyClient (aResponseMsg, 200);

// Get BC - must work (always V3)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

import com.helger.commons.annotation.Nonempty;
import com.helger.commons.mime.CMimeType;
import com.helger.pd.businesscard.v3.PD3BusinessCardMarshaller;
import com.helger.pd.businesscard.v3.PD3BusinessCardType;
import com.helger.peppol.businesscard.v3.PD3BusinessCardMarshaller;
import com.helger.peppol.businesscard.v3.PD3BusinessCardType;
import com.helger.phoss.smp.app.SMPWebAppConfiguration;
import com.helger.phoss.smp.domain.SMPMetaManager;
import com.helger.phoss.smp.exception.SMPPreconditionFailedException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
import com.helger.commons.http.CHttp;
import com.helger.commons.io.stream.StreamHelper;
import com.helger.commons.state.ESuccess;
import com.helger.pd.businesscard.generic.PDBusinessCard;
import com.helger.pd.businesscard.helper.PDBusinessCardHelper;
import com.helger.peppol.businesscard.generic.PDBusinessCard;
import com.helger.peppol.businesscard.helper.PDBusinessCardHelper;
import com.helger.phoss.smp.app.SMPWebAppConfiguration;
import com.helger.phoss.smp.domain.SMPMetaManager;
import com.helger.phoss.smp.exception.SMPBadRequestException;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@
import com.helger.json.IJsonObject;
import com.helger.json.serialize.JsonWriter;
import com.helger.json.serialize.JsonWriterSettings;
import com.helger.pd.businesscard.generic.PDBusinessCard;
import com.helger.pd.businesscard.helper.PDBusinessCardHelper;
import com.helger.peppol.businesscard.generic.PDBusinessCard;
import com.helger.peppol.businesscard.helper.PDBusinessCardHelper;
import com.helger.peppol.sml.ESMPAPIType;
import com.helger.peppolid.IParticipantIdentifier;
import com.helger.peppolid.factory.IIdentifierFactory;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@
import com.helger.json.JsonObject;
import com.helger.json.serialize.JsonWriter;
import com.helger.json.serialize.JsonWriterSettings;
import com.helger.pd.businesscard.generic.PDBusinessCard;
import com.helger.pd.businesscard.helper.PDBusinessCardHelper;
import com.helger.peppol.businesscard.generic.PDBusinessCard;
import com.helger.peppol.businesscard.helper.PDBusinessCardHelper;
import com.helger.peppol.sml.ESMPAPIType;
import com.helger.peppolid.CIdentifier;
import com.helger.peppolid.IParticipantIdentifier;
Expand Down
14 changes: 10 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

<properties>
<log4j.version>2.21.1</log4j.version>
<protobuf.version>3.24.1</protobuf.version>
<protobuf.version>3.25.0</protobuf.version>
</properties>

<dependencyManagement>
Expand Down Expand Up @@ -126,14 +126,20 @@
<dependency>
<groupId>com.helger.peppol</groupId>
<artifactId>peppol-commons-parent-pom</artifactId>
<version>9.0.8</version>
<version>9.1.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<!--error in 9.1.0 parent pom -->
<dependency>
<groupId>com.helger.peppol</groupId>
<artifactId>peppol-directory-businesscard</artifactId>
<version>9.1.0</version>
</dependency>
<dependency>
<groupId>com.helger</groupId>
<artifactId>phoss-directory-parent-pom</artifactId>
<version>0.12.2</version>
<version>0.13.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand All @@ -150,7 +156,7 @@
<dependency>
<groupId>com.fasterxml.jackson</groupId>
<artifactId>jackson-bom</artifactId>
<version>2.15.2</version>
<version>2.15.3</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down

0 comments on commit 653c01b

Please sign in to comment.