Package com.helger.smpclient.bdxr2
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 TypeMethodDescriptiondefault com.helger.xsds.bdxr.smp2.ac.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.
This is a specification compliant method.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 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.ServiceMetadataTypegetServiceMetadataOrNull(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 benull.aDocumentTypeID- The document type of the service metadata to retrieve. May not benull.- Returns:
- A service metadata object or
nullif 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 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:
-
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 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.
-
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 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.
-
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 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
-