Class AS4EndpointDetailProviderPeppol

java.lang.Object
com.helger.phase4.dynamicdiscovery.AS4EndpointDetailProviderPeppol
All Implemented Interfaces:
IAS4EndpointDetailProvider

public class AS4EndpointDetailProviderPeppol extends Object implements IAS4EndpointDetailProvider
Implementation of IAS4EndpointDetailProvider using a Peppol SMP Client to determine this information from an endpoint.
Since:
0.10.6
Author:
Philip Helger
  • Field Details

    • DEFAULT_WILDCARD_SELECTION_MODE

      @Deprecated(forRemoval=true, since="3.0.0") public static final com.helger.smpclient.peppol.PeppolWildcardSelector.EMode DEFAULT_WILDCARD_SELECTION_MODE
      Deprecated, for removal: This API element is subject to removal in a future version.
    • DEFAULT_TRANSPORT_PROFILE

      public static final com.helger.peppol.smp.ISMPTransportProfile DEFAULT_TRANSPORT_PROFILE
  • Constructor Details

    • AS4EndpointDetailProviderPeppol

      public AS4EndpointDetailProviderPeppol(@Nonnull com.helger.smpclient.peppol.ISMPServiceGroupProvider aServiceGroupProvider, @Nonnull com.helger.smpclient.peppol.ISMPExtendedServiceMetadataProvider aServiceMetadataProvider)
  • Method Details

    • getServiceGroupProvider

      @Nonnull public final com.helger.smpclient.peppol.ISMPServiceGroupProvider getServiceGroupProvider()
      Returns:
      The service group provider passed in the constructor. Never null.
    • getServiceMetadataProvider

      @Nonnull public final com.helger.smpclient.peppol.ISMPServiceMetadataProvider getServiceMetadataProvider()
      Returns:
      The service metadata provider passed in the constructor. Never null.
    • isUsePFUOI430

      public final boolean isUsePFUOI430()
      Returns:
      true to use Peppol Policy for use of Identifiers v4.3.0 logic, false to use v4.2.0 logic.
      Since:
      3.0.7
    • setUsePFUOI430

      @Nonnull public final AS4EndpointDetailProviderPeppol setUsePFUOI430(boolean b)
      Parameters:
      b - true to use Peppol Policy for use of Identifiers v4.3.0 logic, false to use v4.2.0 logic.
      Returns:
      this for chaining
      Since:
      3.0.7
    • getWildcardSelectionMode

      @Nonnull @Deprecated(forRemoval=true, since="3.0.0") @DevelopersNote("This was valid for Policy for use of Identifiers 4.2.0. This is no longer valid with PFUOI 4.3.0 from May 15th 2025") public final com.helger.smpclient.peppol.PeppolWildcardSelector.EMode getWildcardSelectionMode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Returns:
      The Peppol SMP wildcard selection to be used for document type resolution, if a wildcard document type identifier is used. Defaults to DEFAULT_WILDCARD_SELECTION_MODE.
    • setWildcardSelectionMode

      @Nonnull @Deprecated(forRemoval=true, since="3.0.0") @DevelopersNote("This was valid for Policy for use of Identifiers 4.2.0. This is no longer valid with PFUOI 4.3.0 from May 15th 2025") public final AS4EndpointDetailProviderPeppol setWildcardSelectionMode(@Nonnull com.helger.smpclient.peppol.PeppolWildcardSelector.EMode eWildcardSelectionMode)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Change the Peppol SMP wildcard selection to be used for document type resolution, if a wildcard document type identifier is used. This only has an effect if it is called prior to init(IDocumentTypeIdentifier, IProcessIdentifier, IParticipantIdentifier).
      Parameters:
      eWildcardSelectionMode - The wildcard selection mode to be used. May not be null.
      Returns:
      this for chaining.
    • getTransportProfile

      @Nonnull public final com.helger.peppol.smp.ISMPTransportProfile getTransportProfile()
      Returns:
      The transport profile to be used. Defaults to DEFAULT_TRANSPORT_PROFILE.
    • setTransportProfile

      @Nonnull public final AS4EndpointDetailProviderPeppol setTransportProfile(@Nonnull com.helger.peppol.smp.ISMPTransportProfile aTP)
      Change the transport profile to be used. This only has an effect if it is called prior to init(IDocumentTypeIdentifier, IProcessIdentifier, IParticipantIdentifier).
      Parameters:
      aTP - The transport profile to be used. May not be null.
      Returns:
      this for chaining.
    • getEndpoint

      @Nullable public final com.helger.xsds.peppol.smp1.EndpointType getEndpoint()
      Returns:
      The endpoint resolved. May only be non-null after init(IDocumentTypeIdentifier, IProcessIdentifier, IParticipantIdentifier) was called.
    • resolvedBusdoxServiceMetadata

      @Nullable @OverrideOnDemand protected com.helger.xsds.peppol.smp1.SignedServiceMetadataType resolvedBusdoxServiceMetadata(@Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID) throws com.helger.smpclient.exception.SMPClientException
      Throws:
      com.helger.smpclient.exception.SMPClientException
    • resolvedWildcardServiceMetadata

      @Nullable @OverrideOnDemand protected com.helger.xsds.peppol.smp1.SignedServiceMetadataType resolvedWildcardServiceMetadata(@Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID) throws com.helger.smpclient.exception.SMPClientException
      Throws:
      com.helger.smpclient.exception.SMPClientException
    • resolvedSchemeSpecificServiceMetadata

      @Nullable @OverrideOnDemand protected com.helger.xsds.peppol.smp1.SignedServiceMetadataType resolvedSchemeSpecificServiceMetadata(@Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID) throws com.helger.smpclient.exception.SMPClientException
      Throws:
      com.helger.smpclient.exception.SMPClientException
    • init

      public void init(@Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcID, @Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID) throws com.helger.phase4.util.Phase4Exception
      Description copied from interface: IAS4EndpointDetailProvider
      The initialization method is always called, before the details are queried. This method may be called multiple times, so you may cache internally.
      Specified by:
      init in interface IAS4EndpointDetailProvider
      Parameters:
      aDocTypeID - document type ID. May not be null.
      aProcID - Process ID. May not be null.
      aReceiverID - Participant ID of the receiver. May not be null.
      Throws:
      com.helger.phase4.util.Phase4Exception - in case of error
    • getReceiverAPCertificate

      @Nullable public X509Certificate getReceiverAPCertificate() throws com.helger.phase4.util.Phase4Exception
      Specified by:
      getReceiverAPCertificate in interface IAS4EndpointDetailProvider
      Returns:
      The X509 AP Certificate of the receiver. May be null if it could not be acquired.
      Throws:
      com.helger.phase4.util.Phase4Exception - In case of an error in determining the certificate.
    • getReceiverAPEndpointURL

      @Nonnull @Nonempty public String getReceiverAPEndpointURL() throws com.helger.phase4.util.Phase4Exception
      Specified by:
      getReceiverAPEndpointURL in interface IAS4EndpointDetailProvider
      Returns:
      The AS4 endpoint URL of the receiver. May neither be null nor empty.
      Throws:
      com.helger.phase4.util.Phase4Exception - In case of an error in determining the endpoint URL.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • create

      @Nonnull public static AS4EndpointDetailProviderPeppol create(@Nonnull com.helger.smpclient.peppol.SMPClientReadOnly aSMPClient)
      Create a new AS4EndpointDetailProviderPeppol based on the provided SMP client.
      Parameters:
      aSMPClient - The SMP client to use. May not be null
      Returns:
      Never null.
      Since:
      2.8.1