Skip to content

Commit

Permalink
Updated to peppol-commons 9.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phax committed Jan 2, 2024
1 parent 7f74a05 commit ccff246
Show file tree
Hide file tree
Showing 33 changed files with 56 additions and 54 deletions.
2 changes: 1 addition & 1 deletion phase4-bdew-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-bdew-client</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-cef-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-cef-client</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-dynamic-discovery/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-dynamic-discovery</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-entsog-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-entsog-client</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-eudamed-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-eudamed-client</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-lib/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-lib</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-peppol-client/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-peppol-client</artifactId>
<packaging>bundle</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
import com.helger.commons.state.ETriState;
import com.helger.commons.string.StringHelper;
import com.helger.diver.api.version.VESID;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.peppol.sbdh.payload.PeppolSBDHPayloadBinaryMarshaller;
import com.helger.peppol.sbdh.payload.PeppolSBDHPayloadTextMarshaller;
import com.helger.peppol.sbdh.spec12.BinaryContentType;
Expand Down Expand Up @@ -117,7 +117,7 @@ private static StandardBusinessDocument _createSBD (@Nonnull final IParticipantI
@Nonnull final Element aPayloadElement,
final boolean bClonePayloadElement)
{
final PeppolSBDHDocument aData = new PeppolSBDHDocument (IF);
final PeppolSBDHData aData = new PeppolSBDHData (IF);
aData.setSender (aSenderID.getScheme (), aSenderID.getValue ());
aData.setReceiver (aReceiverID.getScheme (), aReceiverID.getValue ());
aData.setDocumentType (aDocTypeID.getScheme (), aDocTypeID.getValue ());
Expand Down Expand Up @@ -1424,7 +1424,7 @@ public SBDHBuilder payload (@Nonnull final byte [] aSBDHBytes)
* @see #countryC1(String)
*/
@Nonnull
public SBDHBuilder payloadAndMetadata (@Nonnull final PeppolSBDHDocument aSBDH)
public SBDHBuilder payloadAndMetadata (@Nonnull final PeppolSBDHData aSBDH)
{
ValueEnforcer.notNull (aSBDH, "SBDH");
return senderParticipantID (aSBDH.getSenderAsIdentifier ()).receiverParticipantID (aSBDH.getReceiverAsIdentifier ())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void main (final String [] args)
"cert",
"peppol",
KeyStoreHelper.loadKeyStore (PeppolKeyStoreHelper.TRUSTSTORE_TYPE,
PeppolKeyStoreHelper.Config2018.TRUSTSTORE_PILOT_CLASSPATH,
PeppolKeyStoreHelper.Config2018.TRUSTSTORE_AP_PILOT_CLASSPATH,
PeppolKeyStoreHelper.TRUSTSTORE_PASSWORD)
.getKeyStore ());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public static void main (final String [] args)
"1",
"peppol",
KeyStoreHelper.loadKeyStore (PeppolKeyStoreHelper.TRUSTSTORE_TYPE,
PeppolKeyStoreHelper.Config2018.TRUSTSTORE_PILOT_CLASSPATH,
PeppolKeyStoreHelper.Config2018.TRUSTSTORE_AP_PILOT_CLASSPATH,
PeppolKeyStoreHelper.TRUSTSTORE_PASSWORD)
.getKeyStore ());

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.slf4j.LoggerFactory;

import com.helger.commons.io.resource.FileSystemResource;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.peppol.sbdh.read.PeppolSBDHDocumentReader;
import com.helger.peppol.sml.ESML;
import com.helger.peppolid.factory.PeppolIdentifierFactory;
Expand Down Expand Up @@ -61,7 +61,7 @@ public static void main (final String [] args)

try
{
final PeppolSBDHDocument aSbdh = new PeppolSBDHDocumentReader (PeppolIdentifierFactory.INSTANCE).extractData (new FileSystemResource ("src/test/resources/external/examples/base-sbdh.xml"));
final PeppolSBDHData aSbdh = new PeppolSBDHDocumentReader (PeppolIdentifierFactory.INSTANCE).extractData (new FileSystemResource ("src/test/resources/external/examples/base-sbdh.xml"));
if (aSbdh == null)
throw new IllegalStateException ("Failed to read SBDH file to be send");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public void onAS4Message (final AbstractAS4Message <?> aMsg)
"1",
"peppol",
KeyStoreHelper.loadKeyStore (PeppolKeyStoreHelper.TRUSTSTORE_TYPE,
PeppolKeyStoreHelper.Config2018.TRUSTSTORE_PRODUCTION_CLASSPATH,
PeppolKeyStoreHelper.Config2018.TRUSTSTORE_AP_PRODUCTION_CLASSPATH,
PeppolKeyStoreHelper.TRUSTSTORE_PASSWORD)
.getKeyStore ());
final ESimpleUserMessageSendResult eResult;
Expand Down
2 changes: 1 addition & 1 deletion phase4-peppol-server-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-peppol-server-webapp</artifactId>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.http.HttpHeaderMap;
import com.helger.commons.io.file.SimpleFileIO;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.phase4.ebms3header.Ebms3Error;
import com.helger.phase4.ebms3header.Ebms3UserMessage;
import com.helger.phase4.messaging.IAS4IncomingMessageMetadata;
Expand All @@ -51,7 +51,7 @@ public void handleIncomingSBD (@Nonnull final IAS4IncomingMessageMetadata aMessa
@Nonnull final Ebms3UserMessage aUserMessage,
@Nonnull final byte [] aSBDBytes,
@Nonnull final StandardBusinessDocument aSBD,
@Nonnull final PeppolSBDHDocument aPeppolSBD,
@Nonnull final PeppolSBDHData aPeppolSBD,
@Nonnull final IAS4MessageState aState,
@Nonnull final ICommonsList <Ebms3Error> aProcessingErrorMessages) throws Exception
{
Expand Down
2 changes: 1 addition & 1 deletion phase4-peppol-servlet/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-peppol-servlet</artifactId>
<packaging>bundle</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@
import com.helger.commons.annotation.IsSPIInterface;
import com.helger.commons.collection.impl.ICommonsList;
import com.helger.commons.http.HttpHeaderMap;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.phase4.ebms3header.Ebms3Error;
import com.helger.phase4.ebms3header.Ebms3UserMessage;
import com.helger.phase4.messaging.IAS4IncomingMessageMetadata;
import com.helger.phase4.servlet.IAS4MessageState;
import com.helger.phase4.v3.ChangeV3;

/**
* This is the interface that must be implemented to handle incoming SBD
Expand Down Expand Up @@ -80,20 +81,21 @@ void handleIncomingSBD (@Nonnull IAS4IncomingMessageMetadata aMessageMetadata,
@Nonnull Ebms3UserMessage aUserMessage,
@Nonnull byte [] aSBDBytes,
@Nonnull StandardBusinessDocument aSBD,
@Nonnull PeppolSBDHDocument aPeppolSBD,
@Nonnull PeppolSBDHData aPeppolSBD,
@Nonnull IAS4MessageState aState,
@Nonnull ICommonsList <Ebms3Error> aProcessingErrorMessages) throws Exception;

/**
* Define if an exception from
* {@link #handleIncomingSBD(IAS4IncomingMessageMetadata, HttpHeaderMap, Ebms3UserMessage, byte[], StandardBusinessDocument, PeppolSBDHDocument, IAS4MessageState, ICommonsList)}
* {@link #handleIncomingSBD(IAS4IncomingMessageMetadata, HttpHeaderMap, Ebms3UserMessage, byte[], StandardBusinessDocument, PeppolSBDHData, IAS4MessageState, ICommonsList)}
* results in a negative AS4 response or not. By default it is not.
*
* @return <code>true</code> to convert an Exception into an AS4 Error,
* <code>false</code> if the Exception should simply be logged and
* than processing should continue.
* @since 0.12.2
*/
@ChangeV3 ("Remove Exception handling and force usage of aProcessingErrorMessages")
default boolean exceptionTranslatesToAS4Error ()
{
return false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
import com.helger.commons.lang.ServiceLoaderHelper;
import com.helger.commons.string.StringHelper;
import com.helger.jaxb.validation.WrappedCollectingValidationEventHandler;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.peppol.sbdh.read.PeppolSBDHDocumentReadException;
import com.helger.peppol.sbdh.read.PeppolSBDHDocumentReader;
import com.helger.peppol.smp.ESMPTransportProfile;
Expand Down Expand Up @@ -401,7 +401,7 @@ private static void _checkIfEndpointCertificateMatches (@Nonnull final String sL
*/
@Nullable
public static PeppolReportingItem createPeppolReportingItemForReceivedMessage (@Nonnull final Ebms3UserMessage aUserMessage,
@Nonnull final PeppolSBDHDocument aPeppolSBD,
@Nonnull final PeppolSBDHData aPeppolSBD,
@Nonnull final IAS4MessageState aState,
@Nonnull @Nonempty final String sC3ID,
@Nonnull @Nonempty final String sC4CountryCode,
Expand Down Expand Up @@ -471,11 +471,11 @@ public static PeppolReportingItem createPeppolReportingItemForReceivedMessage (@
* <code>null</code>.
* @since 2.2.2
* @see #createPeppolReportingItemForReceivedMessage(Ebms3UserMessage,
* PeppolSBDHDocument, IAS4MessageState, String, String, String)
* PeppolSBDHData, IAS4MessageState, String, String, String)
*/
@OverrideOnDemand
protected void afterSuccessfulPeppolProcessing (@Nonnull final Ebms3UserMessage aUserMessage,
@Nonnull final PeppolSBDHDocument aPeppolSBD,
@Nonnull final PeppolSBDHData aPeppolSBD,
@Nonnull final IAS4MessageState aState)
{}

Expand Down Expand Up @@ -660,7 +660,7 @@ public AS4MessageProcessorResult processAS4UserMessage (@Nonnull final IAS4Incom
final ReadAttachment aReadAttachment = aReadAttachments.getFirst ();

// Extract Peppol values from SBD
final PeppolSBDHDocument aPeppolSBD;
final PeppolSBDHData aPeppolSBD;
try
{
if (LOGGER.isDebugEnabled ())
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-bdew/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-bdew</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-bpc/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-bpc</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-cef/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-cef</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-dbnalliance/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-dbnalliance</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-eespa/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-eespa</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-entsog/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-entsog</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-profile-peppol/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-profile-peppol</artifactId>
<packaging>bundle</packaging>
Expand Down
2 changes: 1 addition & 1 deletion phase4-server-webapp/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-server-webapp</artifactId>
<packaging>war</packaging>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
import com.helger.commons.timing.StopWatch;
import com.helger.config.IConfig;
import com.helger.httpclient.response.ResponseHandlerByteArray;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.peppol.sbdh.read.PeppolSBDHDocumentReader;
import com.helger.peppol.sml.ESML;
import com.helger.peppol.smp.ESMPTransportProfile;
Expand Down Expand Up @@ -98,7 +98,7 @@ private static void _send (@Nonnull final IAS4CryptoFactory aCF, final Path aSen
else
{
// Extract Peppol specific data
final PeppolSBDHDocument aSBDH = new PeppolSBDHDocumentReader (IF).extractData (aSBD);
final PeppolSBDHData aSBDH = new PeppolSBDHDocumentReader (IF).extractData (aSBD);
final ISMPServiceMetadataProvider aSMPClient = new SMPClient (UP,
aSBDH.getReceiverAsIdentifier (),
ESML.DIGIT_TEST);
Expand Down
2 changes: 1 addition & 1 deletion phase4-spring-boot-demo/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>com.helger.phase4</groupId>
<artifactId>phase4-parent-pom</artifactId>
<version>2.6.1-SNAPSHOT</version>
<version>2.7.0-SNAPSHOT</version>
</parent>
<artifactId>phase4-spring-boot-demo</artifactId>
<name>phase4-spring-boot-demo</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
import org.unece.cefact.namespaces.sbdh.StandardBusinessDocument;

import com.helger.commons.http.HttpHeaderMap;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.phase4.ebms3header.Ebms3UserMessage;
import com.helger.phase4.messaging.IAS4IncomingMessageMetadata;
import com.helger.phase4.servlet.IAS4MessageState;
Expand All @@ -45,7 +45,7 @@ public class CustomPeppolIncomingSBDHandlerServiceImpl implements ISBDHandlerSer
private Ebms3UserMessage m_aUserMessage;
private byte [] m_aStandardBusinessDocumentBytes;
private StandardBusinessDocument m_aStandardBusinessDocument;
private PeppolSBDHDocument m_aPeppolStandardBusinessDocumentHeader;
private PeppolSBDHData m_aPeppolStandardBusinessDocumentHeader;
private IAS4MessageState m_aMessageState;

// Managed Spring fields
Expand Down Expand Up @@ -78,7 +78,7 @@ public void setStandardBusinessDocument (@Nonnull final StandardBusinessDocument
m_aStandardBusinessDocument = standardBusinessDocument;
}

public void setPeppolStandardBusinessDocumentHeader (@Nonnull final PeppolSBDHDocument peppolStandardBusinessDocumentHeader)
public void setPeppolStandardBusinessDocumentHeader (@Nonnull final PeppolSBDHData peppolStandardBusinessDocumentHeader)
{
m_aPeppolStandardBusinessDocumentHeader = peppolStandardBusinessDocumentHeader;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.unece.cefact.namespaces.sbdh.StandardBusinessDocument;

import com.helger.commons.http.HttpHeaderMap;
import com.helger.peppol.sbdh.PeppolSBDHDocument;
import com.helger.peppol.sbdh.PeppolSBDHData;
import com.helger.phase4.ebms3header.Ebms3UserMessage;
import com.helger.phase4.messaging.IAS4IncomingMessageMetadata;
import com.helger.phase4.servlet.IAS4MessageState;
Expand All @@ -40,7 +40,7 @@ public interface ISBDHandlerService

void setStandardBusinessDocumentBytes (@Nonnull byte [] standardBusinessDocumentBytes);

void setPeppolStandardBusinessDocumentHeader (@Nonnull PeppolSBDHDocument peppolStandardBusinessDocumentHeader);
void setPeppolStandardBusinessDocumentHeader (@Nonnull PeppolSBDHData peppolStandardBusinessDocumentHeader);

void setMessageState (@Nonnull IAS4MessageState messageState);

Expand Down
Loading

0 comments on commit ccff246

Please sign in to comment.