Package com.helger.smpclient.url
Interface IPeppolURLProvider
- All Superinterfaces:
ISMPURLProvider
- All Known Implementing Classes:
PeppolNaptrURLProvider,PeppolURLProvider
Base interface for a customizable URL provider so that different URL encoding
schemes can be used.
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringgetDNSNameOfParticipant(com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, com.helger.peppol.sml.ISMLInfo aSMLInfo) Get DNS record from ParticipantIdentifier.
Example PEPPOL PIiso6523-actorid-upis::0010:1234using BDX scheme would result inB-<hash over PI-Value>.<PI-Scheme>.<sml-zone-name>.getDNSNameOfParticipant(com.helger.peppolid.IParticipantIdentifier aParticipantIdentifier, String sSMLZoneName) Get DNS record from ParticipantIdentifier.
Example PEPPOL PIiso6523-actorid-upis::0010:1234using BDX scheme would result inB-<hash over PI-Value>.<PI-Scheme>.<sml-zone-name>.default URIgetSMPURIOfParticipant(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 PIiso6523-actorid-upis::0010:1234using BDX scheme would result inB-<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 benull.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 PIiso6523-actorid-upis::0010:1234using BDX scheme would result inB-<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 benull.aSMLInfo- The SML information object to be used. May not benull.- 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:ISMPURLProviderGet the SMP URI of the passed participant ID in the provided SML DNS zone name.- Specified by:
getSMPURIOfParticipantin interfaceISMPURLProvider- Parameters:
aParticipantIdentifier- The participant ID. May not benull.sSMLZoneName- The SML zone to use. May benull.- Returns:
- A new URI starting with "http://" and never ending with a slash.
- Throws:
SMPDNSResolutionException- If the URL resolution failed.- See Also:
-