Interface IPeppolURLProvider

All Superinterfaces:
ISMPURLProvider
All Known Implementing Classes:
PeppolNaptrURLProvider, PeppolURLProvider

public interface IPeppolURLProvider extends ISMPURLProvider
Base interface for a customizable URL provider so that different URL encoding schemes can be used.
Author:
Philip Helger
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    getDNSNameOfParticipant(com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, com.helger.peppol.sml.ISMLInfo aSMLInfo)
    Get DNS record from ParticipantIdentifier.
    Example PEPPOL PI iso6523-actorid-upis::0010:1234 using BDX scheme would result in B-<hash over PI-Value>.<PI-Scheme>.<sml-zone-name> .
    getDNSNameOfParticipant(com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, String sSMLZoneName)
    Get DNS record from ParticipantIdentifier.
    Example PEPPOL PI iso6523-actorid-upis::0010:1234 using BDX scheme would result in B-<hash over PI-Value>.<PI-Scheme>.<sml-zone-name> .
    default URI
    getSMPURIOfParticipant(com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, String sSMLZoneName)
    Get the SMP URI of the passed participant ID in the provided SML DNS zone name.

    Methods inherited from interface com.helger.smpclient.url.ISMPURLProvider

    getSMPURIOfParticipant, getSMPURLOfParticipant, getSMPURLOfParticipant
  • Method Details

    • getDNSNameOfParticipant

      @Nonnull String getDNSNameOfParticipant(@Nonnull com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, @Nullable String sSMLZoneName) throws SMPDNSResolutionException
      Get DNS record from ParticipantIdentifier.
      Example PEPPOL PI iso6523-actorid-upis::0010:1234 using BDX scheme would result in B-<hash over PI-Value>.<PI-Scheme>.<sml-zone-name> . This method ensures that the hash value is created from the UTF-8 lower case value of the identifier. The result string never ends with a dot!
      Parameters:
      aParticipantIdentifier - Participant identifier. May not be null.
      sSMLZoneName - e.g. sml.peppolcentral.org.. May be empty. If it is not empty, it must end with a dot!
      Returns:
      DNS record. It does not contain any prefix like http:// or any path suffix. It is the plain DNS host name. Since version 1.1.4 this method returns the DNS name without the trailing dot!
      Throws:
      SMPDNSResolutionException - If the URL resolution failed.
      IllegalArgumentException - In case one argument is invalid
    • getDNSNameOfParticipant

      @Nonnull default String getDNSNameOfParticipant(@Nonnull com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, @Nonnull com.helger.peppol.sml.ISMLInfo aSMLInfo) throws SMPDNSResolutionException
      Get DNS record from ParticipantIdentifier.
      Example PEPPOL PI iso6523-actorid-upis::0010:1234 using BDX scheme would result in B-<hash over PI-Value>.<PI-Scheme>.<sml-zone-name> . This method ensures that the hash value is created from the UTF-8 lower case value of the identifier. The result string never ends with a dot!
      Parameters:
      aParticipantIdentifier - Participant identifier. May not be null.
      aSMLInfo - The SML information object to be used. May not be null.
      Returns:
      DNS record
      Throws:
      SMPDNSResolutionException - If the URL resolution failed.
    • getSMPURIOfParticipant

      @Nonnull default URI getSMPURIOfParticipant(@Nonnull com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, @Nullable String sSMLZoneName) throws SMPDNSResolutionException
      Description copied from interface: ISMPURLProvider
      Get the SMP URI of the passed participant ID in the provided SML DNS zone name.
      Specified by:
      getSMPURIOfParticipant in interface ISMPURLProvider
      Parameters:
      aParticipantIdentifier - The participant ID. May not be null.
      sSMLZoneName - The SML zone to use. May be null.
      Returns:
      A new URI starting with "http://" and never ending with a slash.
      Throws:
      SMPDNSResolutionException - If the URL resolution failed.
      See Also: