Interface IBDXR2ServiceMetadataProvider

All Known Implementing Classes:
BDXR2Client, BDXR2ClientReadOnly

public interface IBDXR2ServiceMetadataProvider
Abstract interface to retrieve a service metadata instance.
Since:
7.0.6
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default com.helger.xsds.bdxr.smp2.ac.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.
    This is a specification compliant method.
    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.
    default byte[]
    getEndpointCertificateBytes(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID, com.helger.peppolid.IProcessIdentifier aProcessID, com.helger.peppol.smp.ISMPTransportProfile aTransportProfile)
    Get the certificate bytes from the specified endpoint.
    com.helger.xsds.bdxr.smp2.ServiceMetadataType
    getServiceMetadataOrNull(com.helger.peppolid.IParticipantIdentifier aServiceGroupID, com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID)
    Gets a signed service metadata object given by its service group id and its document type.
    This is a specification compliant method.
  • Method Details

    • getServiceMetadataOrNull

      @Nullable com.helger.xsds.bdxr.smp2.ServiceMetadataType getServiceMetadataOrNull(@Nonnull com.helger.peppolid.IParticipantIdentifier aServiceGroupID, @Nonnull com.helger.peppolid.IDocumentTypeIdentifier aDocumentTypeID) throws SMPClientException
      Gets a signed service metadata object given by its service group id and its document type.
      This is a specification compliant method.
      Parameters:
      aServiceGroupID - The ID of the service group to query. May not be null.
      aDocumentTypeID - The document type of the service metadata to retrieve. May not be null.
      Returns:
      A service metadata object or null if no such registration is present.
      Throws:
      SMPClientException - in case something goes wrong
    • getEndpoint

      @Nullable default com.helger.xsds.bdxr.smp2.ac.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 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:
    • 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 is a specification compliant method.
      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.
    • getEndpointCertificateBytes

      @Nullable default byte[] getEndpointCertificateBytes(@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 bytes 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.
      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.
    • 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.
      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