SMPClientReadOnly extends AbstractGenericSMPClient <SMPClientReadOnly> implements
                               ISMPServiceGroupProvider,
                               ISMPServiceMetadataProvider { @Nullable public ServiceGroupType getServiceGroupOrNull (@Nonnull final IParticipantIdentifier aServiceGroupID) throws SMPClientException { try { return getServiceGroup (aServiceGroupID); } catch (final SMPClientNotFoundException ex) { if (LOGGER.isDebugEnabled ()) LOGGER.debug ("Found no ServiceGroup"); return null; } } SMPClientReadOnly(@Nonnull final ISMPURLProvider aURLProvider,
                            @Nonnull final IParticipantIdentifier aParticipantIdentifier,
                            @Nonnull final ISMLInfo aSMLInfo);  SMPClientReadOnly(@Nonnull final ISMPURLProvider aURLProvider,
                            @Nonnull final IParticipantIdentifier aParticipantIdentifier,
                            @Nonnull @Nonempty final String sSMLZoneName);  SMPClientReadOnly(@Nonnull final URI aSMPHost); @Nonnull ServiceGroupReferenceListType getServiceGroupReferenceList(@Nonnull final String sUserID,
                                                                     @Nonnull final BasicAuthClientCredentials aCredentials); @Nullable ServiceGroupReferenceListType getServiceGroupReferenceListOrNull(@Nonnull final String sUserID,
                                                                           @Nonnull final BasicAuthClientCredentials aCredentials); @Nonnull CompleteServiceGroupType getCompleteServiceGroup(@Nonnull final String sCompleteURI); @Nonnull CompleteServiceGroupType getCompleteServiceGroup(@Nonnull final IParticipantIdentifier aServiceGroupID); @Nullable CompleteServiceGroupType getCompleteServiceGroupOrNull(@Nonnull final IParticipantIdentifier aServiceGroupID); @Nonnull ServiceGroupType getServiceGroup(@Nonnull final IParticipantIdentifier aServiceGroupID); @Nullable ServiceGroupType getServiceGroupOrNull(@Nonnull final IParticipantIdentifier aServiceGroupID); @Nonnull static ICommonsList <IDocumentTypeIdentifier> getAllDocumentTypes(@Nullable final ServiceGroupType aSG); @Nonnull static ICommonsList <IDocumentTypeIdentifier> getAllDocumentTypes(@Nullable final ServiceGroupType aSG,
                                                                            @Nonnull final IIdentifierFactory aIdentifierFactory,
                                                                            @Nullable final Consumer <String> aUnhandledHrefHandler); @Nonnull SignedServiceMetadataType getServiceMetadata(@Nonnull final IParticipantIdentifier aServiceGroupID,
                                                       @Nonnull final IDocumentTypeIdentifier aDocumentTypeID); @Nullable SignedServiceMetadataType getServiceMetadataOrNull(@Nonnull final IParticipantIdentifier aServiceGroupID,
                                                             @Nonnull final IDocumentTypeIdentifier aDocumentTypeID); @Nullable static EndpointType getEndpoint(@Nonnull final SignedServiceMetadataType aSignedServiceMetadata,
                                          @Nonnull final IProcessIdentifier aProcessID,
                                          @Nonnull final ISMPTransportProfile aTransportProfile); @Nullable static String getEndpointAddress(@Nullable final EndpointType aEndpoint); @Nullable static String getEndpointCertificateString(@Nullable final EndpointType aEndpoint); @Nullable static X509Certificate getEndpointCertificate(@Nullable final EndpointType aEndpoint); @Nonnull static CompleteServiceGroupType getCompleteServiceGroupByDNS(@Nonnull final ISMPURLProvider aURLProvider,
                                                                       @Nonnull final ISMLInfo aSMLInfo,
                                                                       @Nonnull final IParticipantIdentifier aServiceGroupID); @Nonnull static ServiceGroupType getServiceGroupByDNS(@Nonnull final ISMPURLProvider aURLProvider,
                                                       @Nonnull final ISMLInfo aSMLInfo,
                                                       @Nonnull final IParticipantIdentifier aServiceGroupID); @Nonnull static SignedServiceMetadataType getServiceRegistrationByDNS(@Nonnull final ISMPURLProvider aURLProvider,
                                                                       @Nonnull final ISMLInfo aSMLInfo,
                                                                       @Nonnull final IParticipantIdentifier aServiceGroupID,
                                                                       @Nonnull final IDocumentTypeIdentifier aDocumentTypeID); static final String URL_PART_COMPLETE; static final String URL_PART_LIST; static final String URL_PART_SERVICES; }
@Test public void testGetSMPHostURI_Peppol () throws SMPClientException, SMPDNSResolutionException { final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:test"); final SMPClientReadOnly aSMPClient = new SMPClientReadOnly (PeppolURLProvider.INSTANCE, aPI, ESML.DIGIT_TEST); assertEquals ("http: aSMPClient.getSMPHostURI ()); assertNotNull (aSMPClient.getServiceGroupOrNull (aPI)); }
@Test @Ignore @IgnoredNaptrTest public void testGetSMPHostURI_BDXR () throws SMPClientException, SMPDNSResolutionException { final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9915:test"); final SMPClientReadOnly aSMPClient = new SMPClientReadOnly (BDXLURLProvider.INSTANCE, aPI, ESML.DIGIT_TEST); assertEquals ("http: assertNotNull (aSMPClient.getServiceGroupOrNull (aPI)); }
@Test public void testGetSMPHostURI_Peppol_WithBOM () throws SMPClientException, SMPDNSResolutionException { final IParticipantIdentifier aPI = PeppolIdentifierFactory.INSTANCE.createParticipantIdentifierWithDefaultScheme ("9917:5504033150"); final SMPClientReadOnly aSMPClient = new SMPClientReadOnly (PeppolURLProvider.INSTANCE, aPI, ESML.DIGIT_PRODUCTION); assertEquals ("http: aSMPClient.getSMPHostURI ()); assertNotNull (aSMPClient.getServiceGroupOrNull (aPI)); }