-
Notifications
You must be signed in to change notification settings - Fork 48
Migrations
Philip Helger edited this page Nov 12, 2024
·
20 revisions
This page contains everything necessary related to migrating phase4 versions
-
The
phase4-profile-bpc
submodule was removed in favour ofphase4-profile-dbnalliance
-
The
phase4-spring-boot-demo
submodule was removed in favour of https://github.com/phax/phase4-peppol-standalone -
All deprecated methods marked for removal have been removed
-
Configuration related changes
- The configuration files
private-crypto.properties
andcrypto.properties
are deprecated. Please move the properties toapplication.properties
, environment variables or Java system properties instead. - The configuration property
phase4.profile
was renamed tophase4.default.profile
- the old property is still evaluated as a secondary option
- The configuration files
-
Here are the main coding related changes
- Renamed packages
- Renamed package
com.helger.phase4.error
tocom.helger.phase4.model.error
- Renamed package
com.helger.phase4.http
tocom.helger.phase4.messaging.http
- Renamed package
com.helger.phase4.messaging.domain
tocom.helger.phase4.model.message
- Renamed package
- Moved classes
- Moved classes from
com.helger.phase4.servlet
tocom.helger.phase4.incoming
- Moved classes from
com.helger.phase4.servlet.mgr
tocom.helger.phase4.incoming.mgr
- Moved classes from
com.helger.phase4.servlet.soap
tocom.helger.phase4.incoming.soap
- Moved classes from
com.helger.phase4.servlet.spi
tocom.helger.phase4.incoming.spi
- Moved class
AbstractAS4RawResponseConsumer
tocom.helger.phase4.sender
- Moved class
AS4IncomingDumperFileBased.IFileProvider
toIAS4IncomingDumperFileProvider
- Moved class
AS4OutgoingDumperFileBased.IFileProvider
toIAS4OutgoingDumperFileProvider
- Moved class
AS4RequestHandler.ISoapProcessingFinalizedCallback
toIAS4SoapProcessingFinalizedCallback
- Moved class
ESoapVersion
to com.helger.phase4.model` - Moved classes
IAS4IncomingSecurityConfiguration
andAS4IncomingSecurityConfiguration
tocom.helger.phase4.incoming.crypto
- Moved class
IAS4IncomingMessageMetadata
tocom.helger.phase4.incoming
- Moved class
IAS4RawResponseConsumer
tocom.helger.phase4.sender
- Moved class
IAS4SignalMessageConsumer
tocom.helger.phase4.incoming
- Moved class
IAS4UserMessageConsumer
tocom.helger.phase4.incoming
- Moved classes from
- Renamed classes
- Renamed class
AbstractAS4UserMessageBuilder.ESimpleUserMessageSendResult
toEAS4UserMessageSendResult
- Renamed class
AS4DuplicateManager
toAS4DuplicateManagerXML
- Renamed class
AS4MessageState
toAS4IncomingMessageState
- Renamed class
AS4MessagingHelper
toAS4IncomingHelper
- And moved to
com.helger.phase4.incoming
- And moved to
- Renamed class
AS4ServletMessageProcessorManager
toAS4IncomingMessageProcessorManager
- Renamed class
AS4ServletPullRequestProcessorManager
toAS4IncomingPullRequestProcessorManager
- Renamed class
AS4SingleSOAPHeader
toAS4SingleSoapHeader
(casing only) - Renamed class
AS4XServletHandler.IHandlerCustomizer
toIAS4ServletRequestHandlerCustomizer
- Made method
customizeAfterHandling
non-default
- Made method
- Renamed class
DefaultPModeResolver
toAS4DefaultPModeResolver
- Renamed SPI class
IAS4ServletMessageProcessorSPI
toIAS4IncomingMessageProcessorSPI
- Was also moved to a different package - see above
- Made method
IAS4IncomingMessageProcessorSPI
non-default
- Renamed SPI class
IAS4ServletPullRequestProcessorSPI
toIAS4IncomingPullRequestProcessorSPI
- Was also moved to a different package - see above
- Renamed class
IAS4MessageState
toIAS4IncomingMessageState
- Renamed class
IPModeResolver
toIAS4PModeResolver
- Renamed class
ISOAPHeaderElementProcessor
toISoapHeaderElementProcessor
(casing only) - Renamed class
MimeMessageCreator
toAS4MimeMessageHelper
- Renamed class
MPCManager
toMPCManagerXML
- Renamed class
Phase4PeppolServletConfiguration
toPhase4PeppolDefaultReceiverConfiguration
- Renamed class
Phase4PeppolReceiverCheckData
toPhase4PeppolReceiverConfiguration
- Renamed class
Phase4PeppolSender.Builder
toPhase4PeppolSender.PeppolUserMessageBuilder
- Renamed class
Phase4PeppolSender.SBDHBuilder
toPhase4PeppolSender.PeppolUserMessageSBDHBuilder
- Renamed class
PModeManager
toPModeManagerXML
- Renamed class
SoapMimeMultipart
toAS4SoapMimeMultipart
- Renamed class
SOAPHeaderElementProcessorExtractEbms3Messaging
toSoapHeaderElementProcessorExtractEbms3Messaging
(casing only) - Renamed class
SOAPHeaderElementProcessorRegistry
toSoapHeaderElementProcessorRegistry
(casing only) - Renamed class
SOAPHeaderElementProcessorWSS4J
toSoapHeaderElementProcessorWSS4J
(casing only)
- Renamed class
- Removed classes
- Removed class
Phase4PeppolClientException
- Removed class
- Altered classes
- Added template parameter to class
AbstractAS4IncomingDumperWithHeaders
- Added template parameter to class
AbstractAS4OutgoingDumperWithHeaders
- Removed constant
DefaultPModeResolver.DEFAULT_PMODE_RESOLVER
in favour of new instances with an AS4 profile ID
- Added template parameter to class
- Moved methods
- Moved methods
AS4ReceiptMessage.getAllDSigReferenceNodes
andAS4ReceiptMessage.getAllDSigReferences
to classMessageHelperMethods
- Moved all setters from
AS4XServletHandler
toAS4RequestHandler
- Moved method
IAS4ResponseAbstraction.wrap
toAS4XServletHandler.createResponseAbstraction
- Moved methods
MessageHelperMethods.forEachHeaderAndRemoveAfterwards
andMessageHelperMethods.getAndRemoveAllHeaders
to classAS4MimeMessageHelper
- Moved methods
- Renamed methods
- Renamed methods
AbstractAS4Client.(get|set)AS4CryptoFactory*
to(get|set)CryptoFactory...
- Renamed methods
AS4ClientBuiltMessage.getCustomHeaders
togetAllCustomHttpHeaders
- Renamed method
AS4ClientErrorMessage.isReceiptShouldBeSigned
toisErrorShouldBeSigned
- Renamed method
AS4ClientSentMessage.getResponse
togetResponseContent
- Renamed method
AS4ClientSentMessage.hasResponse
tohasResponseContent
- Renamed method
AS4Configuration.getAS4ProfileID
togetDefaultAS4ProfileID
- Renamed method
AS4ProfileSelector.getAS4ProfileID
togetDefaultAS4ProfileID
- Renamed methods
AS4ProfileSelector.(get|set)CustomAS4ProfileID
to(get|set)CustomDefaultAS4ProfileID
- Renamed methods
AS4XServletHandler.(get|set)HandlerCustomizer
to(get|set)RequestHandlerCustomizer
- Renamed method
IAS4IncomingDumperFileProvider.getFilename
togetDefaultDirectoryAndFilename
- Renamed method
IAS4OutgoingDumperFileProvider.getFilename
togetDefaultDirectoryAndFilename
- Renamed method
IPModeResolver.getPModeOfID
tofindPMode
- Renamed methods
- Altered methods
- Extended method
AS4DumpReader.decryptAS4In
to include an AS4 profile ID parameter - Made method
IAS4CryptoFactory.getKeyPasswordPerAlias(String)
non-default - Made method
IAS4IncomingDumper.onEndRequest
non-default and added optional "caughtException" parameter - Made method
IAS4OutgoingDumper.onEndRequest
non-default and added optional "caughtException" parameter - Extended method
IAS4ProfileValidator.validatePMode
with an additional parameter to differentiate UserMessage and SignalMessage
- Extended method
- Removed methods
- Removed method
IAS4ProfileManager.hasDefaultProfile
- Removed method
IAS4ProfileManager.getDefaultProfileOrNull
- Removed method
IAS4ProfileManager.getDefaultProfile
- Removed method
IAS4ProfileManager.setDefaultProfileID
- Removed method
IAS4ProfileRegistrar.setDefaultProfile
- Removed method
- Renamed packages
-
The most common form of CryptoFactory creation got reworked.
Instead of
final AS4CryptoProperties aCP = new AS4CryptoProperties ().setKeyStoreType (EKeyStoreType.PKCS12)
.setKeyStorePath ("path.p12")
.setKeyStorePassword ("pw")
.setKeyAlias ("cert")
.setKeyPassword ("pw")
.setTrustStoreType (EKeyStoreType.JKS)
.setTrustStorePath ("truststore/complete-truststore.jks")
.setTrustStorePassword ("peppol");
new AS4CryptoFactoryProperties (aCP);
use this code now:
new AS4CryptoFactoryInMemoryKeyStore (KeyStoreAndKeyDescriptor.builder ()
.type (EKeyStoreType.PKCS12)
.path ("path.p12")
.password ("pw")
.keyAlias ("cert")
.keyPassword ("pw")
.build (),
TrustStoreDescriptor.builder ()
.type (EKeyStoreType.JKS)
.path ("truststore/complete-truststore.jks")
.password ("peppol")
.build ());
The major change in v2.x is the new software baseline.
- It requires at least Java 11 for building and execution
- It was updated to the JakartaEE 9 specifications
- Uses Servlet Specification 5.0.x
- All the namespaces
javax.servlet
where changed tojakarta.servlet
- Uses Eclipse Angus instead of Jakarta Mail
- The minimum requirements for application servers are
- Tomcat 10.0.x or Tomcat 10.1.x
- Jetty 11.x
All other potentially breaking changes are listed in News and noteworthy.
My personal Coding Styleguide | It is appreciated if you star the GitHub project if you like it.