Package com.helger.smpclient.peppol
Class PeppolWildcardSelector
java.lang.Object
com.helger.smpclient.peppol.PeppolWildcardSelector
Helper class to support the different ways of dealing with
peppol-doctype-wildcard scheme in combination with the busdox-docid-qns
scheme.
- Since:
- 9.2.0
- Author:
- Philip Helger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDefines the different selection modes.
This was valid for Policy for use of Identifiers 4.2.0. -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new wildcard selector using the provided operational mode. -
Method Summary
Modifier and TypeMethodDescriptionstatic com.helger.commons.state.ESuccessfindPeppolDoctypeWildcardMatch(com.helger.commons.collection.impl.ICommonsList<? extends com.helger.peppolid.IDocumentTypeIdentifier> aBaseDocTypes, com.helger.peppolid.IDocumentTypeIdentifier aSearchDocTypeValue, Consumer<? super com.helger.peppolid.IDocumentTypeIdentifier> aMatchingDocTypeConsumer) Helper method to find the best match wildcard document type identifier for PFUOI 4.3.0.voidforEachMatchingDocumentType(com.helger.commons.collection.impl.ICommonsList<? extends com.helger.peppolid.IDocumentTypeIdentifier> aBaseDocTypes, String sDocTypeValue, Function<? super com.helger.peppolid.IDocumentTypeIdentifier, com.helger.commons.state.EContinue> aMatchingDocTypeConsumer) Helper method to iterate all matching document type identifiers for PFUOI 4.2.0.getMode()toString()
-
Constructor Details
-
PeppolWildcardSelector
Create a new wildcard selector using the provided operational mode.- Parameters:
eMode- The selection mode to use. May not benull.
-
-
Method Details
-
getMode
- Returns:
- The selection mode as provided in the constructor.
-
forEachMatchingDocumentType
public void forEachMatchingDocumentType(@Nonnull com.helger.commons.collection.impl.ICommonsList<? extends com.helger.peppolid.IDocumentTypeIdentifier> aBaseDocTypes, @Nonnull @Nonempty String sDocTypeValue, @Nonnull Function<? super com.helger.peppolid.IDocumentTypeIdentifier, com.helger.commons.state.EContinue> aMatchingDocTypeConsumer) Helper method to iterate all matching document type identifiers for PFUOI 4.2.0. The preference of schemes is defined by the operational mode.- Parameters:
aBaseDocTypes- The list of document types to filter. Usually this list was obtained from an SMP query "get all receiving capabilities of participant". May not benull, but maybe empty.sDocTypeValue- The document type identifier value (!) without the scheme to search. The schemes are added internally automatically.aMatchingDocTypeConsumer- The consumer to be invoked for each match. May not benull.
-
findPeppolDoctypeWildcardMatch
@Nonnull public static com.helger.commons.state.ESuccess findPeppolDoctypeWildcardMatch(@Nonnull com.helger.commons.collection.impl.ICommonsList<? extends com.helger.peppolid.IDocumentTypeIdentifier> aBaseDocTypes, @Nonnull @Nonempty com.helger.peppolid.IDocumentTypeIdentifier aSearchDocTypeValue, @Nonnull Consumer<? super com.helger.peppolid.IDocumentTypeIdentifier> aMatchingDocTypeConsumer) Helper method to find the best match wildcard document type identifier for PFUOI 4.3.0. This method only work for peppol-doctype-wildcard scheme.- Parameters:
aBaseDocTypes- The list of document types to filter. Usually this list was obtained from an SMP query "get all receiving capabilities of participant". May not benull, but maybe empty.aSearchDocTypeValue- The document type identifier to search. It may or may not contain the Wildcard indicator.aMatchingDocTypeConsumer- The consumer to be invoked for the first match only. May not benull.- Returns:
- Non-
null.
-
toString
-