Skip to content

Commit 9c08fa4

Browse files
committed
Version bump and cleansing
1 parent 11b68ef commit 9c08fa4

File tree

7 files changed

+80
-28
lines changed

7 files changed

+80
-28
lines changed

phase4-lib/src/main/java/com/helger/phase4/client/AbstractAS4RawResponseConsumer.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
* Abstract base implementation of <code>IAS4RawResponseConsumer</code> to
2626
* provide basic customizability.
2727
*
28+
* @param <IMPLTYPE>
29+
* Implementation type
2830
* @author Philip Helger
2931
* @since 0.13.0
3032
*/

phase4-profile-eespa/src/main/java/com/helger/phase4/profile/eespa/AS4EESPAProfileRegistarSPI.java

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,10 @@
3333
* Library specific implementation of {@link IAS4ProfileRegistrarSPI}.
3434
*
3535
* @author OpusCapita
36+
* @deprecated For removal since 1.4.6
3637
*/
3738
@IsSPIImplementation
39+
@Deprecated
3840
public final class AS4EESPAProfileRegistarSPI implements IAS4ProfileRegistrarSPI
3941
{
4042
public static final String AS4_PROFILE_ID_ACCEPTANCE = "eespa-acc";
@@ -50,13 +52,20 @@ public void registerAS4Profile (@Nonnull final IAS4ProfileRegistrar aRegistrar)
5052
{
5153
final IAS4ProfilePModeProvider aDefaultPModeProviderAcc = (i,
5254
r,
53-
a) -> EESPAPMode.createEESPAPMode (i, r, a, PMODE_ID_PROVIDER, true, false);
54-
final IAS4ProfilePModeProvider aDefaultPModeProviderProd = (i, r, a) -> EESPAPMode.createEESPAPMode (i,
55-
r,
56-
a,
57-
PMODE_ID_PROVIDER,
58-
false,
59-
false);
55+
a) -> EESPAPMode.createEESPAPMode (i,
56+
r,
57+
a,
58+
PMODE_ID_PROVIDER,
59+
true,
60+
false);
61+
final IAS4ProfilePModeProvider aDefaultPModeProviderProd = (i,
62+
r,
63+
a) -> EESPAPMode.createEESPAPMode (i,
64+
r,
65+
a,
66+
PMODE_ID_PROVIDER,
67+
false,
68+
false);
6069

6170
if (LOGGER.isDebugEnabled ())
6271
LOGGER.debug ("Registering phase4 profile '" + AS4_PROFILE_ID_ACCEPTANCE + "'");

phase4-profile-eespa/src/main/java/com/helger/phase4/profile/eespa/EESPACompatibilityValidator.java

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@
5353
* Validate certain requirements imposed by the EESPA project.
5454
*
5555
* @author OpusCapita
56+
* @deprecated For removal since 1.4.6
5657
*/
58+
@Deprecated
5759
public class EESPACompatibilityValidator implements IAS4ProfileValidator
5860
{
5961
public EESPACompatibilityValidator ()
@@ -111,7 +113,10 @@ private static void _checkIfLegIsValid (@Nonnull final ErrorList aErrorList,
111113
final ESoapVersion eSOAPVersion = aLegProtocol.getSoapVersion ();
112114
if (!eSOAPVersion.isAS4Default ())
113115
{
114-
aErrorList.add (_createError (sFieldPrefix + "SoapVersion '" + eSOAPVersion.getVersion () + "' is unsupported"));
116+
aErrorList.add (_createError (sFieldPrefix +
117+
"SoapVersion '" +
118+
eSOAPVersion.getVersion () +
119+
"' is unsupported"));
115120
}
116121
}
117122

@@ -233,7 +238,8 @@ private static void _checkIfLegIsValid (@Nonnull final ErrorList aErrorList,
233238
if (aErrorHandling.isReportProcessErrorNotifyConsumerDefined ())
234239
{
235240
if (!aErrorHandling.isReportProcessErrorNotifyConsumer ())
236-
aErrorList.add (_createWarn (sFieldPrefix + "ErrorHandling.Report.ProcessErrorNotifyConsumer should be 'true'"));
241+
aErrorList.add (_createWarn (sFieldPrefix +
242+
"ErrorHandling.Report.ProcessErrorNotifyConsumer should be 'true'"));
237243
}
238244
else
239245
{
@@ -243,7 +249,8 @@ private static void _checkIfLegIsValid (@Nonnull final ErrorList aErrorList,
243249
if (aErrorHandling.isReportProcessErrorNotifyProducerDefined ())
244250
{
245251
if (!aErrorHandling.isReportProcessErrorNotifyProducer ())
246-
aErrorList.add (_createWarn (sFieldPrefix + "ErrorHandling.Report.ProcessErrorNotifyProducer should be 'true'"));
252+
aErrorList.add (_createWarn (sFieldPrefix +
253+
"ErrorHandling.Report.ProcessErrorNotifyProducer should be 'true'"));
247254
}
248255
else
249256
{

phase4-profile-eespa/src/main/java/com/helger/phase4/profile/eespa/EESPAPMode.java

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@
4949
* PMode creation code.
5050
*
5151
* @author OpusCapita
52+
* @deprecated For removal since 1.4.6
5253
*/
5354
@Immutable
55+
@Deprecated
5456
public final class EESPAPMode
5557
{
5658
public static final String DEFAULT_AGREEMENT_ID_ACCEPTANCE = "urn:fdc:eespa.eu:2018:agreements:mifa:test";
@@ -128,7 +130,11 @@ public static PModeReceptionAwareness generatePModeReceptionAwareness ()
128130
final int nMaxRetries = 1;
129131
final long nRetryIntervalMS = 10_000;
130132
final ETriState eDuplicateDetection = ETriState.TRUE;
131-
return new PModeReceptionAwareness (eReceptionAwareness, eRetry, nMaxRetries, nRetryIntervalMS, eDuplicateDetection);
133+
return new PModeReceptionAwareness (eReceptionAwareness,
134+
eRetry,
135+
nMaxRetries,
136+
nRetryIntervalMS,
137+
eDuplicateDetection);
132138
}
133139

134140
@Nonnull

phase4-profile-eespa/src/test/java/com/helger/phase4/profile/eespa/EESPACompatibilityValidatorTest.java

Lines changed: 40 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,9 @@
5959
* would be redundant in the profiles.
6060
*
6161
* @author Philip Helger
62+
* @deprecated For removal since 1.4.6
6263
*/
64+
@Deprecated
6365
public final class EESPACompatibilityValidatorTest
6466
{
6567
@ClassRule
@@ -132,15 +134,25 @@ public void testValidatePModeNoProtocolAddress ()
132134
@Test
133135
public void testValidatePModeProtocolAddressIsNotHttp ()
134136
{
135-
m_aPMode.setLeg1 (new PModeLeg (PModeLegProtocol.createForDefaultSoapVersion ("ftp://test.com"), null, null, null, null));
137+
m_aPMode.setLeg1 (new PModeLeg (PModeLegProtocol.createForDefaultSoapVersion ("ftp://test.com"),
138+
null,
139+
null,
140+
null,
141+
null));
136142
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
137-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("AddressProtocol 'ftp' is unsupported")));
143+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
144+
.contains ("AddressProtocol 'ftp' is unsupported")));
138145
}
139146

140147
@Test
141148
public void testValidatePModeProtocolSOAP11NotAllowed ()
142149
{
143-
m_aPMode.setLeg1 (new PModeLeg (new PModeLegProtocol ("https://test.com", ESoapVersion.SOAP_11), null, null, null, null));
150+
m_aPMode.setLeg1 (new PModeLeg (new PModeLegProtocol ("https://test.com",
151+
ESoapVersion.SOAP_11),
152+
null,
153+
null,
154+
null,
155+
null));
144156
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
145157
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("SoapVersion '1.1' is unsupported")));
146158
}
@@ -171,7 +183,8 @@ public void testValidatePModeSecurityWrongX509SignatureAlgorithm ()
171183
null,
172184
aSecurityLeg));
173185
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
174-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains (ECryptoAlgorithmSign.RSA_SHA_256.getID ())));
186+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
187+
.contains (ECryptoAlgorithmSign.RSA_SHA_256.getID ())));
175188
}
176189

177190
@Test
@@ -185,7 +198,8 @@ public void testValidatePModeSecurityNoX509SignatureHashFunction ()
185198
null,
186199
aSecurityLeg));
187200
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
188-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("X509SignatureHashFunction is missing")));
201+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
202+
.contains ("X509SignatureHashFunction is missing")));
189203
}
190204

191205
@Test
@@ -199,7 +213,8 @@ public void testValidatePModeSecurityWrongX509SignatureHashFunction ()
199213
null,
200214
aSecurityLeg));
201215
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
202-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains (ECryptoAlgorithmSignDigest.DIGEST_SHA_256.getID ())));
216+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
217+
.contains (ECryptoAlgorithmSignDigest.DIGEST_SHA_256.getID ())));
203218
}
204219

205220
@Test
@@ -213,7 +228,8 @@ public void testValidatePModeSecurityNoX509EncryptionAlgorithm ()
213228
null,
214229
aSecurityLeg));
215230
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
216-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("X509EncryptionAlgorithm is missing")));
231+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
232+
.contains ("X509EncryptionAlgorithm is missing")));
217233
}
218234

219235
@Test
@@ -227,7 +243,8 @@ public void testValidatePModeSecurityWrongX509EncryptionAlgorithm ()
227243
null,
228244
aSecurityLeg));
229245
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
230-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains (ECryptoAlgorithmCrypt.AES_256_GCM.getID ())));
246+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
247+
.contains (ECryptoAlgorithmCrypt.AES_256_GCM.getID ())));
231248
}
232249

233250
@SuppressWarnings ("deprecation")
@@ -252,7 +269,8 @@ public void testValidatePModeSecurityPModeAuthorizeMandatory ()
252269
m_aPMode.getLeg1 ().getSecurity ().setPModeAuthorize (ETriState.UNDEFINED);
253270
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
254271
assertTrue ("Errors: " + m_aErrorList.toString (),
255-
m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("Security.PModeAuthorize is missing")));
272+
m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
273+
.contains ("Security.PModeAuthorize is missing")));
256274
}
257275

258276
@Test
@@ -290,10 +308,15 @@ public void testValidatePModeSecurityResponsePatternWrongBoolean ()
290308
@Test
291309
public void testValidatePModeErrorHandlingMandatory ()
292310
{
293-
m_aPMode.setLeg1 (new PModeLeg (PModeLegProtocol.createForDefaultSoapVersion ("http://test.example.org"), null, null, null, null));
311+
m_aPMode.setLeg1 (new PModeLeg (PModeLegProtocol.createForDefaultSoapVersion ("http://test.example.org"),
312+
null,
313+
null,
314+
null,
315+
null));
294316

295317
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
296-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("PMode.Leg[1].ErrorHandling is missing")));
318+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
319+
.contains ("PMode.Leg[1].ErrorHandling is missing")));
297320
}
298321

299322
@Test
@@ -306,7 +329,8 @@ public void testValidatePModeErrorHandlingReportAsResponseMandatory ()
306329
null,
307330
null));
308331
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
309-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("ErrorHandling.Report.AsResponse is missing")));
332+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
333+
.contains ("ErrorHandling.Report.AsResponse is missing")));
310334
}
311335

312336
@Test
@@ -320,7 +344,8 @@ public void testValidatePModeErrorHandlingReportAsResponseWrongValue ()
320344
null,
321345
null));
322346
VALIDATOR.validatePMode (m_aPMode, m_aErrorList);
323-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("ErrorHandling.Report.AsResponse must be 'true'")));
347+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
348+
.contains ("ErrorHandling.Report.AsResponse must be 'true'")));
324349
}
325350

326351
@Test
@@ -410,7 +435,8 @@ public void testValidateUserMessageMoreThanOnePartyID ()
410435
aUserMessage.setPartyInfo (aPartyInfo);
411436

412437
VALIDATOR.validateUserMessage (aUserMessage, m_aErrorList);
413-
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE).contains ("must contain no more than one PartyID")));
438+
assertTrue (m_aErrorList.containsAny (x -> x.getErrorText (LOCALE)
439+
.contains ("must contain no more than one PartyID")));
414440
}
415441

416442
@Test

phase4-profile-eespa/src/test/java/com/helger/phase4/profile/eespa/EESPAPModeTest.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,9 @@
3030
* Test class for class {@link EESPAPMode}.
3131
*
3232
* @author Philip Helger
33+
* @deprecated For removal since 1.4.6
3334
*/
35+
@Deprecated
3436
public final class EESPAPModeTest
3537
{
3638
@ClassRule

pom.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,8 @@
7272
<!-- wss4j 2.3.0 requires xmlsec 2.2.0 -->
7373
<!-- wss4j 2.4.0 requires xmlsec 2.3.0 -->
7474
<xmlsec.version>2.3.4</xmlsec.version>
75-
<wss4j.version>2.4.2</wss4j.version>
76-
<log4j.version>2.22.1</log4j.version>
75+
<wss4j.version>2.4.3</wss4j.version>
76+
<log4j.version>2.24.3</log4j.version>
7777
<ph-xsds.version>2.6.0</ph-xsds.version>
7878
<peppol-commons.version>8.8.6</peppol-commons.version>
7979
<spring-boot.version>2.7.18</spring-boot.version>
@@ -252,7 +252,7 @@
252252
<dependency>
253253
<groupId>commons-codec</groupId>
254254
<artifactId>commons-codec</artifactId>
255-
<version>1.15</version>
255+
<version>1.18.0</version>
256256
</dependency>
257257

258258
<dependency>

0 commit comments

Comments
 (0)