Package com.helger.smpclient.peppol
Interface ISMPExtendedServiceMetadataProvider
- All Superinterfaces:
ISMPServiceMetadataProvider
- All Known Implementing Classes:
SMPClient,SMPClientReadOnly
Abstract interface to retrieve extended Peppol Service Metadata instance.
- Since:
- 9.6.0
- Author:
- Philip Helger
-
Method Summary
Modifier and TypeMethodDescriptiondefault com.helger.xsds.peppol.smp1.EndpointTypegetEndpoint(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 StringgetEndpointAddress(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 StringgetEndpointAddressAt(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.EndpointTypegetEndpointAt(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.default X509CertificategetEndpointCertificate(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 X509CertificategetEndpointCertificateAt(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 StringgetEndpointCertificateString(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 StringgetEndpointCertificateStringAt(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.SignedServiceMetadataTypegetSchemeSpecificServiceMetadataOrNull(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.
Forbusdox-docid-qnsonly exact match is supported.com.helger.xsds.peppol.smp1.SignedServiceMetadataTypegetWildcardServiceMetadataOrNull(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.SignedServiceMetadataTypegetWildcardServiceMetadataOrNull(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 benull.aReceiverID- Receiver ID. May not benull.aDocTypeID- Source document type ID. May not benull. The document type may use any document type identifier scheme.eSelectionMode- The Wildcard selection mode to use. Must not benull.- Returns:
nullif 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 viaISMPServiceGroupProvider.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 benull.aDocTypeID- Source document type ID. May not benull. The document type may use any document type identifier scheme.eSelectionMode- The Wildcard selection mode to use. Must not benull.- Returns:
nullif 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 benull.aDocumentTypeID- The document type of the service metadata to get. May not benull.aProcessID- The process ID of the service metadata to get. May not benull.aTransportProfile- The transport profile of the service metadata to get. May not benull.- Returns:
- The endpoint from the signed service metadata object or
nullif no such registration is present. - Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- The document type of the service metadata to get. May not benull.aProcessID- The process ID of the service metadata to get. May not benull.aTransportProfile- The transport profile of the service metadata to get. May not benull.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 benull.- Returns:
- The endpoint from the signed service metadata object or
nullif no such registration is present. - Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- Document type ID. May not benull.aProcessID- Process ID. May not benull.aTransportProfile- Transport profile. May not benull.- Returns:
nullif no such endpoint exists, or if the endpoint has no endpoint address URI- Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- Document type ID. May not benull.aProcessID- Process ID. May not benull.aTransportProfile- Transport profile. May not benull.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 benull.- Returns:
nullif no such endpoint exists, or if the endpoint has no endpoint address URI- Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- Document type ID. May not benull.aProcessID- Process ID. May not benull.aTransportProfile- Transport profile. May not benull.- Returns:
nullif no such endpoint exists, or if the endpoint has no certificate- Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- Document type ID. May not benull.aProcessID- Process ID. May not benull.aTransportProfile- Transport profile. May not benull.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 benull.- Returns:
nullif no such endpoint exists, or if the endpoint has no certificate- Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- Document type ID. May not benull.aProcessID- Process ID. May not benull.aTransportProfile- Transport profile. May not benull.- Returns:
nullif no such endpoint exists, or if the endpoint has no certificate- Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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 benull.aDocumentTypeID- Document type ID. May not benull.aProcessID- Process ID. May not benull.aTransportProfile- Transport profile. May not benull.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 benull.- Returns:
nullif no such endpoint exists, or if the endpoint has no certificate- Throws:
SMPClientException- in case something goes wrongSMPClientUnauthorizedException- 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-qnsonly exact match is supported. Here it will directly query the Service Metadata. (1 SMP query in total) - For
peppol-doctypeboth 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 benull.aDocumentTypeID- The document type to lookup. May not benull.- Returns:
nullif no such service metadata could be found.- Throws:
SMPClientException- In case of error- Since:
- 9.6.0
- See Also:
- For
-