Interface ISMPExtendedServiceMetadataProvider

All Superinterfaces:
ISMPServiceMetadataProvider
All Known Implementing Classes:
SMPClient, SMPClientReadOnly

public interface ISMPExtendedServiceMetadataProvider extends ISMPServiceMetadataProvider
Abstract interface to retrieve extended Peppol Service Metadata instance.
Since:
9.6.0
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.helger.xsds.peppol.smp1.EndpointType
    getEndpoint(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile)
    Retrieve the service metadata from the provided service group ID and document type ID.
    default String
    getEndpointAddress(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile)
    Get the endpoint address URI from the specified endpoint.
    default String
    getEndpointAddressAt(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, LocalDateTime aCheckDT)
    Get the endpoint address URI from the specified endpoint.
    default com.helger.xsds.peppol.smp1.EndpointType
    getEndpointAt(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, LocalDateTime aCheckDT)
    Retrieve the service metadata from the provided service group ID and document type ID.
    getEndpointCertificate(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile)
    Get the certificate from the specified endpoint.
    getEndpointCertificateAt(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, LocalDateTime aCheckDT)
    Get the certificate from the specified endpoint.
    default String
    getEndpointCertificateString(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile)
    Get the certificate string from the specified endpoint.
    default String
    getEndpointCertificateStringAt(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, LocalDateTime aCheckDT)
    Get the certificate string from the specified endpoint.
    com.helger.xsds.peppol.smp1.SignedServiceMetadataType
    getSchemeSpecificServiceMetadataOrNull(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID)
    This API is to resolve the Service Metadata based on the provided Document Type ID following the Peppol Policy for use of Identifiers 4.3.0.
    For busdox-docid-qns only exact match is supported.
    com.helger.xsds.peppol.smp1.SignedServiceMetadataType
    getWildcardServiceMetadataOrNull(com.helger.peppolid.IParticipantIdentifier aReceiverID, com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, PeppolWildcardSelector.EMode eSelectionMode)
    Wildcard aware SMP lookup for PFUOI 4.2.
    com.helger.xsds.peppol.smp1.SignedServiceMetadataType
    getWildcardServiceMetadataOrNull(com.helger.xsds.peppol.smp1.ServiceGroupType aServiceGroup, com.helger.peppolid.IParticipantIdentifier aReceiverID, com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, PeppolWildcardSelector.EMode eSelectionMode)
    Wildcard aware SMP lookup for PFUOI 4.2.

    Methods inherited from interface com.helger.smpclient.peppol.ISMPServiceMetadataProvider

    getServiceMetadata, getServiceMetadataOrNull
  • Method Details

    • getWildcardServiceMetadataOrNull

      @Nullable com.helger.xsds.peppol.smp1.SignedServiceMetadataType getWildcardServiceMetadataOrNull(@Nonnull com.helger.xsds.peppol.smp1.ServiceGroupType aServiceGroup, @Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, @Nonnull PeppolWildcardSelector.EMode eSelectionMode) throws SMPClientException
      Wildcard aware SMP lookup for PFUOI 4.2. It interprets the wildcard character (*) appropriately and tries all possibilities. Internally it searches the closest possible match using the provided selection algorithm (mode).
      Parameters:
      aServiceGroup - The service group previously queried. May not be null.
      aReceiverID - Receiver ID. May not be null.
      aDocTypeID - Source document type ID. May not be null. The document type may use any document type identifier scheme.
      eSelectionMode - The Wildcard selection mode to use. Must not be null.
      Returns:
      null if no matching SMP entry was found
      Throws:
      SMPClientException - In case of error
      Since:
      9.5.1 in this interface
      See Also:
    • getWildcardServiceMetadataOrNull

      @Nullable com.helger.xsds.peppol.smp1.SignedServiceMetadataType getWildcardServiceMetadataOrNull(@Nonnull com.helger.peppolid.IParticipantIdentifier aReceiverID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocTypeID, @Nonnull PeppolWildcardSelector.EMode eSelectionMode) throws SMPClientException
      Wildcard aware SMP lookup for PFUOI 4.2. It interprets the wildcard character (*) appropriately and tries all possibilities. Internally it works by first querying all the document types via ISMPServiceGroupProvider.getServiceGroupOrNull(IParticipantIdentifier) and afterwards find the closest possible match using the provided selection algorithm (mode). So this method calls each SMP twice.
      Parameters:
      aReceiverID - Receiver ID. May not be null.
      aDocTypeID - Source document type ID. May not be null. The document type may use any document type identifier scheme.
      eSelectionMode - The Wildcard selection mode to use. Must not be null.
      Returns:
      null if no matching SMP entry was found
      Throws:
      SMPClientException - In case of error
      Since:
      9.2.1
      See Also:
    • getEndpoint

      @Nullable default com.helger.xsds.peppol.smp1.EndpointType getEndpoint(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile) throws SMPClientException
      Retrieve the service metadata from the provided service group ID and document type ID. Than find the matching endpoint from the process ID and transport profile. This method checks the validity of the endpoint at the current point in time.
      This is a specification compliant method.
      Parameters:
      aServiceGroupID - The service group id of the service metadata to get. May not be null.
      aDocumentTypeID - The document type of the service metadata to get. May not be null.
      aProcessID - The process ID of the service metadata to get. May not be null.
      aTransportProfile - The transport profile of the service metadata to get. May not be null.
      Returns:
      The endpoint from the signed service metadata object or null if no such registration is present.
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
      See Also:
    • getEndpointAt

      @Nullable default com.helger.xsds.peppol.smp1.EndpointType getEndpointAt(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, @Nonnull LocalDateTime aCheckDT) throws SMPClientException
      Retrieve the service metadata from the provided service group ID and document type ID. Than find the matching endpoint from the process ID and transport profile.
      This is a specification compliant method.
      Parameters:
      aServiceGroupID - The service group id of the service metadata to get. May not be null.
      aDocumentTypeID - The document type of the service metadata to get. May not be null.
      aProcessID - The process ID of the service metadata to get. May not be null.
      aTransportProfile - The transport profile of the service metadata to get. May not be null.
      aCheckDT - The date and time for when the endpoint is meant to be valid if the end point contains a ServiceActivationDate and/or a ServiceExpirationDate. May not be null.
      Returns:
      The endpoint from the signed service metadata object or null if no such registration is present.
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
      Since:
      8.7.3
      See Also:
    • getEndpointAddress

      @Nullable default String getEndpointAddress(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile) throws SMPClientException
      Get the endpoint address URI from the specified endpoint. This method checks the validity of the endpoint at the current point in time.
      Parameters:
      aServiceGroupID - Service group ID. May not be null.
      aDocumentTypeID - Document type ID. May not be null.
      aProcessID - Process ID. May not be null.
      aTransportProfile - Transport profile. May not be null.
      Returns:
      null if no such endpoint exists, or if the endpoint has no endpoint address URI
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
    • getEndpointAddressAt

      @Nullable default String getEndpointAddressAt(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, @Nonnull LocalDateTime aCheckDT) throws SMPClientException
      Get the endpoint address URI from the specified endpoint.
      Parameters:
      aServiceGroupID - Service group ID. May not be null.
      aDocumentTypeID - Document type ID. May not be null.
      aProcessID - Process ID. May not be null.
      aTransportProfile - Transport profile. May not be null.
      aCheckDT - The date and time for when the endpoint is meant to be valid if the end point contains a ServiceActivationDate and/or a ServiceExpirationDate. May not be null.
      Returns:
      null if no such endpoint exists, or if the endpoint has no endpoint address URI
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
      Since:
      8.7.3
    • getEndpointCertificateString

      @Nullable default String getEndpointCertificateString(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile) throws SMPClientException
      Get the certificate string from the specified endpoint. This method checks the validity of the endpoint at the current point in time.
      Parameters:
      aServiceGroupID - Service group ID. May not be null.
      aDocumentTypeID - Document type ID. May not be null.
      aProcessID - Process ID. May not be null.
      aTransportProfile - Transport profile. May not be null.
      Returns:
      null if no such endpoint exists, or if the endpoint has no certificate
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
    • getEndpointCertificateStringAt

      @Nullable default String getEndpointCertificateStringAt(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, @Nonnull LocalDateTime aCheckDT) throws SMPClientException
      Get the certificate string from the specified endpoint.
      Parameters:
      aServiceGroupID - Service group ID. May not be null.
      aDocumentTypeID - Document type ID. May not be null.
      aProcessID - Process ID. May not be null.
      aTransportProfile - Transport profile. May not be null.
      aCheckDT - The date and time for when the endpoint is meant to be valid if the end point contains a ServiceActivationDate and/or a ServiceExpirationDate. May not be null.
      Returns:
      null if no such endpoint exists, or if the endpoint has no certificate
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
      Since:
      8.7.3
    • getEndpointCertificate

      @Nullable default X509Certificate getEndpointCertificate(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile) throws SMPClientException, CertificateException
      Get the certificate from the specified endpoint. This method checks the validity of the endpoint at the current point in time.
      Parameters:
      aServiceGroupID - Service group ID. May not be null.
      aDocumentTypeID - Document type ID. May not be null.
      aProcessID - Process ID. May not be null.
      aTransportProfile - Transport profile. May not be null.
      Returns:
      null if no such endpoint exists, or if the endpoint has no certificate
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
      CertificateException - In case the conversion from byte to X509 certificate failed
    • getEndpointCertificateAt

      @Nullable default X509Certificate getEndpointCertificateAt(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, @Nonnull com.helger.peppolid.IProcessIdentifier aProcessID, @Nonnull com.helger.peppol.smp.ISMPTransportProfile aTransportProfile, @Nonnull LocalDateTime aCheckDT) throws SMPClientException, CertificateException
      Get the certificate from the specified endpoint.
      Parameters:
      aServiceGroupID - Service group ID. May not be null.
      aDocumentTypeID - Document type ID. May not be null.
      aProcessID - Process ID. May not be null.
      aTransportProfile - Transport profile. May not be null.
      aCheckDT - The date and time for when the endpoint is meant to be valid if the end point contains a ServiceActivationDate and/or a ServiceExpirationDate. May not be null.
      Returns:
      null if no such endpoint exists, or if the endpoint has no certificate
      Throws:
      SMPClientException - in case something goes wrong
      SMPClientUnauthorizedException - A HTTP Forbidden was received, should not happen.
      SMPClientBadRequestException - The request was not well formed.
      CertificateException - In case the conversion from byte to X509 certificate failed
    • getSchemeSpecificServiceMetadataOrNull

      @Nullable com.helger.xsds.peppol.smp1.SignedServiceMetadataType getSchemeSpecificServiceMetadataOrNull(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID) throws SMPClientException
      This API is to resolve the Service Metadata based on the provided Document Type ID following the Peppol Policy for use of Identifiers 4.3.0.
      • For busdox-docid-qns only exact match is supported. Here it will directly query the Service Metadata. (1 SMP query in total)
      • For peppol-doctype both exact match and best match are supported. The wildcard indicator may or may not be present. Here it will first query the SMP for list of all document types, find the best match document type and finally do the SMP query Service Metadata. (2 SMP queries in total)
      Parameters:
      aServiceGroupID - The participant ID to lookup. May not be null.
      aDocumentTypeID - The document type to lookup. May not be null.
      Returns:
      null if no such service metadata could be found.
      Throws:
      SMPClientException - In case of error
      Since:
      9.6.0
      See Also: