null
nor empty.
41 | * @param aException
42 | * The exception that occurred. May not be null
.
43 | */
44 | void onException (@Nonnull IParticipantIdentifier aParticipantID, @Nonnull String sContext, @Nonnull Throwable aException);
45 | }
46 |
--------------------------------------------------------------------------------
/phoss-directory-client/src/main/java/com/helger/pd/client/PDClientResponseHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.client;
18 |
19 | import java.io.IOException;
20 | import java.nio.charset.Charset;
21 | import java.nio.charset.StandardCharsets;
22 |
23 | import javax.annotation.Nonnull;
24 | import javax.annotation.Nullable;
25 |
26 | import org.apache.hc.client5.http.ClientProtocolException;
27 | import org.apache.hc.client5.http.HttpResponseException;
28 | import org.apache.hc.core5.http.ClassicHttpResponse;
29 | import org.apache.hc.core5.http.ContentType;
30 | import org.apache.hc.core5.http.HttpEntity;
31 | import org.apache.hc.core5.http.io.HttpClientResponseHandler;
32 |
33 | import com.helger.commons.state.ESuccess;
34 | import com.helger.httpclient.HttpClientHelper;
35 |
36 | /**
37 | * Special response handler for PD client
38 | *
39 | * @author Philip Helger
40 | */
41 | public class PDClientResponseHandler implements HttpClientResponseHandler /businesscard
27 | * API is queried. Nevertheless for testing purposes it may be possible to
28 | * provide mock data.
29 | *
30 | * @author Philip Helger
31 | */
32 | @FunctionalInterface
33 | public interface IPDBusinessCardProvider
34 | {
35 | /**
36 | * Get the {@link PDExtendedBusinessCard} for the given participant ID.
37 | *
38 | * @param aParticipantID
39 | * Peppol participant ID. May not be null
.
40 | * @return null
if no business card exists for the provided
41 | * participant ID.
42 | */
43 | @Nullable
44 | PDExtendedBusinessCard getBusinessCard (@Nonnull IParticipantIdentifier aParticipantID);
45 | }
46 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/businesscard/PDSMPHttpResponseHandlerBusinessCard.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.businesscard;
18 |
19 | import java.io.IOException;
20 | import java.nio.charset.Charset;
21 | import java.nio.charset.StandardCharsets;
22 |
23 | import javax.annotation.Nonnull;
24 | import javax.annotation.Nullable;
25 |
26 | import org.apache.hc.client5.http.ClientProtocolException;
27 | import org.apache.hc.core5.http.ContentType;
28 | import org.apache.hc.core5.http.HttpEntity;
29 |
30 | import com.helger.commons.io.stream.StreamHelper;
31 | import com.helger.httpclient.HttpClientHelper;
32 | import com.helger.peppol.businesscard.generic.PDBusinessCard;
33 | import com.helger.peppol.businesscard.helper.PDBusinessCardHelper;
34 | import com.helger.smpclient.httpclient.AbstractSMPResponseHandler;
35 |
36 | /**
37 | * Handle unsigned SMP responses and interpret as PD v1 or v2 or v3.
38 | *
39 | * @author Philip Helger
40 | */
41 | final class PDSMPHttpResponseHandlerBusinessCard extends AbstractSMPResponseHandler null
on failure and must not be null
on
62 | * success.
63 | */
64 | @Nullable
65 | public String getClientID ()
66 | {
67 | return m_sClientID;
68 | }
69 |
70 | /**
71 | * Create client certificate validation success
72 | *
73 | * @param sClientID
74 | * Client ID to use. May neither be null
nor empty.
75 | * @return Never null
.
76 | */
77 | @Nonnull
78 | public static ClientCertificateValidationResult createSuccess (@Nonnull @Nonempty final String sClientID)
79 | {
80 | ValueEnforcer.notEmpty (sClientID, "ClientID");
81 | return new ClientCertificateValidationResult (true, sClientID);
82 | }
83 |
84 | /**
85 | * Create client certificate validation failure
86 | *
87 | * @return Never null
.
88 | */
89 | @Nonnull
90 | public static ClientCertificateValidationResult createFailure ()
91 | {
92 | return new ClientCertificateValidationResult (false, null);
93 | }
94 | }
95 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/config/IndexerMicroTypeConverterRegistrar.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.config;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.concurrent.Immutable;
21 |
22 | import com.helger.commons.annotation.IsSPIImplementation;
23 | import com.helger.pd.indexer.index.IndexerWorkItem;
24 | import com.helger.pd.indexer.index.IndexerWorkItemMicroTypeConverter;
25 | import com.helger.pd.indexer.reindex.ReIndexWorkItem;
26 | import com.helger.pd.indexer.reindex.ReIndexWorkItemMicroTypeConverter;
27 | import com.helger.xml.microdom.convert.IMicroTypeConverterRegistrarSPI;
28 | import com.helger.xml.microdom.convert.IMicroTypeConverterRegistry;
29 |
30 | /**
31 | * Implementation of {@link IMicroTypeConverterRegistrarSPI} for Peppol
32 | * Directory indexer types
33 | *
34 | * @author Philip Helger
35 | */
36 | @Immutable
37 | @IsSPIImplementation
38 | public final class IndexerMicroTypeConverterRegistrar implements IMicroTypeConverterRegistrarSPI
39 | {
40 | public void registerMicroTypeConverter (@Nonnull final IMicroTypeConverterRegistry aRegistry)
41 | {
42 | aRegistry.registerMicroElementTypeConverter (IndexerWorkItem.class, new IndexerWorkItemMicroTypeConverter ());
43 | aRegistry.registerMicroElementTypeConverter (ReIndexWorkItem.class, new ReIndexWorkItemMicroTypeConverter ());
44 | }
45 | }
46 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/index/EIndexerWorkItemType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.index;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.Nullable;
21 |
22 | import com.helger.commons.annotation.Nonempty;
23 | import com.helger.commons.id.IHasID;
24 | import com.helger.commons.lang.EnumHelper;
25 | import com.helger.commons.name.IHasDisplayName;
26 |
27 | /**
28 | * The work item types to use.
29 | *
30 | * @author Philip Helger
31 | */
32 | public enum EIndexerWorkItemType implements IHasID null
.
48 | */
49 | @Nonnull
50 | IParticipantIdentifier getParticipantID ();
51 |
52 | /**
53 | * @return The action type to execute. Never null
.
54 | */
55 | @Nonnull
56 | EIndexerWorkItemType getType ();
57 |
58 | /**
59 | * @return The ID of the client (=SMP; based on the provided client
60 | * certificate) that requested this action. Never null
.
61 | */
62 | @Nonnull
63 | @Nonempty
64 | String getOwnerID ();
65 |
66 | /**
67 | * @return The IP address/host name of the host requesting this work item. If
68 | * this action is triggered by the scheduled SML exchange, this should
69 | * be {@value #REQUESTING_HOST_SML}
.
70 | */
71 | @Nonnull
72 | String getRequestingHost ();
73 |
74 | /**
75 | * @return A special pre-build log prefix used when logging something about
76 | * this object.
77 | */
78 | @Nonnull
79 | @Nonempty
80 | default String getLogText ()
81 | {
82 | return getOwnerID () + "@" + getType () + "[" + getParticipantID ().getURIEncoded () + "]";
83 | }
84 |
85 | /**
86 | * @return The information of this as a {@link PDStoredMetaData} object to be
87 | * used by the storage engine.
88 | */
89 | @Nonnull
90 | @ReturnsMutableCopy
91 | default PDStoredMetaData getAsMetaData ()
92 | {
93 | return new PDStoredMetaData (getCreationDateTime (), getOwnerID (), getRequestingHost ());
94 | }
95 |
96 | @Nonnull
97 | @Nonempty
98 | default String getDisplayName ()
99 | {
100 | return getLogText ();
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/ILuceneAnalyzerProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.lucene;
18 |
19 | import java.io.IOException;
20 |
21 | import javax.annotation.Nullable;
22 |
23 | import org.apache.lucene.analysis.Analyzer;
24 |
25 | /**
26 | * Lucene {@link Analyzer} retrieval interface
27 | *
28 | * @author Philip Helger
29 | */
30 | @FunctionalInterface
31 | public interface ILuceneAnalyzerProvider
32 | {
33 | /**
34 | * Get the Lucene Analyzer to use
35 | *
36 | * @return The Analyzer to use. May be null
if the underlying
37 | * Analyzer is already closed
38 | * @throws IOException
39 | * In case of a Lucene error
40 | */
41 | @Nullable
42 | Analyzer getAnalyzer () throws IOException;
43 | }
44 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/lucene/ILuceneDocumentProvider.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.lucene;
18 |
19 | import java.io.IOException;
20 |
21 | import javax.annotation.Nullable;
22 |
23 | import org.apache.lucene.document.Document;
24 |
25 | /**
26 | * {@link Document} retrieval interface
27 | *
28 | * @author Philip Helger
29 | */
30 | @FunctionalInterface
31 | public interface ILuceneDocumentProvider
32 | {
33 | /**
34 | * Get the Lucene document from the document ID
35 | *
36 | * @param nDocID
37 | * Internal Lucene Document ID
38 | * @return The Document or null
.
39 | * @throws IOException
40 | * In case of a Lucene error
41 | */
42 | @Nullable
43 | Document getDocument (int nDocID) throws IOException;
44 | }
45 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/mgr/IPDStorageManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.mgr;
18 |
19 | import java.io.Closeable;
20 | import java.io.IOException;
21 |
22 | import javax.annotation.CheckForSigned;
23 | import javax.annotation.Nonnull;
24 | import javax.annotation.Nullable;
25 |
26 | import com.helger.commons.state.ESuccess;
27 | import com.helger.pd.indexer.businesscard.PDExtendedBusinessCard;
28 | import com.helger.pd.indexer.storage.PDStoredMetaData;
29 | import com.helger.peppolid.IParticipantIdentifier;
30 |
31 | /**
32 | * The abstract storage manager interface. It contains all the actions that can
33 | * be performed with business cards.
34 | *
35 | * @author Philip Helger
36 | */
37 | public interface IPDStorageManager extends Closeable
38 | {
39 | /**
40 | * Create a new entry or update an existing entry.
41 | *
42 | * @param aParticipantID
43 | * Participant identifier it is all about.
44 | * @param aExtBI
45 | * The extended business card with the document type identifiers.
46 | * @param aMetaData
47 | * The additional meta data to be stored.
48 | * @return {@link ESuccess#SUCCESS} upon success, {@link ESuccess#FAILURE} on
49 | * error.
50 | * @throws IOException
51 | * in case of IO error
52 | */
53 | @Nonnull
54 | ESuccess createOrUpdateEntry (@Nonnull IParticipantIdentifier aParticipantID,
55 | @Nonnull PDExtendedBusinessCard aExtBI,
56 | @Nonnull PDStoredMetaData aMetaData) throws IOException;
57 |
58 | /**
59 | * Delete an existing entry (not recoverable).
60 | *
61 | * @param aParticipantID
62 | * Participant ID to be deleted.
63 | * @param aMetaData
64 | * The entry metadata. Basically only for logging purposes. May be
65 | * null
.
66 | * @param bVerifyOwner
67 | * true
if the owner should be considered,
68 | * false
if not.
69 | * @return The number of deleted entries, or -1 in case of failure
70 | * @throws IOException
71 | * in case of IO error
72 | */
73 | @CheckForSigned
74 | int deleteEntry (@Nonnull IParticipantIdentifier aParticipantID,
75 | @Nullable PDStoredMetaData aMetaData,
76 | boolean bVerifyOwner) throws IOException;
77 | }
78 |
--------------------------------------------------------------------------------
/phoss-directory-indexer/src/main/java/com/helger/pd/indexer/reindex/IReIndexWorkItemList.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.indexer.reindex;
18 |
19 | import java.util.function.Predicate;
20 |
21 | import javax.annotation.Nonnegative;
22 | import javax.annotation.Nonnull;
23 | import javax.annotation.Nullable;
24 |
25 | import com.helger.commons.annotation.ReturnsMutableCopy;
26 | import com.helger.commons.collection.impl.ICommonsList;
27 | import com.helger.commons.state.EChange;
28 |
29 | /**
30 | * Base interface for {@link ReIndexWorkItem} objects.
31 | *
32 | * @author Philip Helger
33 | */
34 | public interface IReIndexWorkItemList
35 | {
36 | /**
37 | * @return A list of all re-index items currently in the list. Never
38 | * null
but maybe empty.
39 | */
40 | @Nonnull
41 | @ReturnsMutableCopy
42 | ICommonsList extends IReIndexWorkItem> getAllItems ();
43 |
44 | /**
45 | * @return The number of contained items. Always ≥ 0.
46 | */
47 | @Nonnegative
48 | int getItemCount ();
49 |
50 | /**
51 | * Get the item with the specified ID.
52 | *
53 | * @param sID
54 | * The ID to search. May be null
.
55 | * @return null
if no such item exists.
56 | */
57 | @Nullable
58 | IReIndexWorkItem getItemOfID (@Nullable String sID);
59 |
60 | /**
61 | * Find and remove the first work item matching the provided predicate.
62 | *
63 | * @param aFilter
64 | * The predicate to use. May not be null
.
65 | * @return null
if no such entry exists.
66 | */
67 | @Nullable
68 | IReIndexWorkItem getAndRemoveEntry (@Nonnull Predicate super IReIndexWorkItem> aFilter);
69 |
70 | @Nonnull
71 | default EChange deleteItem (@Nullable final String sID)
72 | {
73 | return EChange.valueOf (sID != null && getAndRemoveEntry (x -> x.getID ().equals (sID)) != null);
74 | }
75 |
76 | /**
77 | * Remove all work items matching the provided predicate.
78 | *
79 | * @param aFilter
80 | * The predicate to use. May not be null
.
81 | * @return null
if no such entry exists.
82 | */
83 | @Nonnull
84 | @ReturnsMutableCopy
85 | ICommonsList null
.
71 | */
72 | @Nonnull
73 | public IMimeType getMimeType ()
74 | {
75 | return m_aMimeType;
76 | }
77 |
78 | /**
79 | * @return The filename extension for this output format. Neither
80 | * null
nor empty and always starting with a dot!
81 | */
82 | @Nonnull
83 | @Nonempty
84 | public String getFileExtension ()
85 | {
86 | return m_sFileExtension;
87 | }
88 |
89 | @Nullable
90 | public static EPDOutputFormat getFromIDCaseInsensitiveOrNull (@Nullable final String sID)
91 | {
92 | return EnumHelper.getFromIDCaseInsensitiveOrNull (EPDOutputFormat.class, sID);
93 | }
94 |
95 | @Nullable
96 | public static EPDOutputFormat getFromIDCaseInsensitiveOrDefault (@Nullable final String sID, @Nullable final EPDOutputFormat eDefault)
97 | {
98 | return EnumHelper.getFromIDCaseInsensitiveOrDefault (EPDOutputFormat.class, sID, eDefault);
99 | }
100 | }
101 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/search/EPDSearchFieldName.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.search;
18 |
19 | import java.util.Locale;
20 |
21 | import javax.annotation.Nonnull;
22 | import javax.annotation.Nullable;
23 |
24 | import com.helger.commons.text.IMultilingualText;
25 | import com.helger.commons.text.display.IHasDisplayText;
26 | import com.helger.commons.text.resolve.DefaultTextResolver;
27 | import com.helger.commons.text.util.TextHelper;
28 |
29 | /**
30 | * Multilingual names for {@link EPDSearchField}.
31 | *
32 | * @author Philip Helger
33 | */
34 | public enum EPDSearchFieldName implements IHasDisplayText
35 | {
36 | GENERIC ("Allgemeiner Suchtext", "Generic search text"),
37 | PARTICIPANT_ID ("Teilnehmer ID", "Participant ID"),
38 | NAME ("Name", "Name"),
39 | COUNTRY ("Land", "Country"),
40 | GEO_INFO ("Geographische Information", "Geographical information"),
41 | IDENTIFIER ("Andere ID", "Additional identifiers"),
42 | WEBSITE ("Website", "Web site"),
43 | CONTACT ("Kontaktperson", "Contact person"),
44 | ADDITIONAL_INFORMATION ("Freitext", "Additional information"),
45 | REGISTRATION_DATE ("Registrierungsdatum", "Registration date"),
46 | DOCUMENT_TYPE ("Dokumentenart", "Document type");
47 |
48 | private final IMultilingualText m_aTP;
49 |
50 | private EPDSearchFieldName (@Nonnull final String sDE, @Nonnull final String sEN)
51 | {
52 | m_aTP = TextHelper.create_DE_EN (sDE, sEN);
53 | }
54 |
55 | @Nullable
56 | public String getDisplayText (@Nonnull final Locale aContentLocale)
57 | {
58 | return DefaultTextResolver.getTextStatic (this, m_aTP, aContentLocale);
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/search/ESearchOperatorText.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.search;
18 |
19 | import java.util.Locale;
20 |
21 | import javax.annotation.Nonnull;
22 | import javax.annotation.Nullable;
23 |
24 | import com.helger.commons.text.IMultilingualText;
25 | import com.helger.commons.text.display.IHasDisplayText;
26 | import com.helger.commons.text.resolve.DefaultTextResolver;
27 | import com.helger.commons.text.util.TextHelper;
28 |
29 | /**
30 | * Multilingual names for {@link ESearchOperator}.
31 | *
32 | * @author Philip Helger
33 | */
34 | public enum ESearchOperatorText implements IHasDisplayText
35 | {
36 | /** Equals */
37 | EQ ("="),
38 | /** Not equals */
39 | NE ("!="),
40 | /** Lower than */
41 | LT ("<"),
42 | /** Lower or equal */
43 | LE ("<="),
44 | /** Greater than */
45 | GT (">"),
46 | /** Greater or equal */
47 | GE (">="),
48 | /** Is empty */
49 | EMPTY ("leer", "empty"),
50 | /** Is not empty */
51 | NOT_EMPTY ("gesetzt", "not empty"),
52 | /** String contains */
53 | STRING_CONTAINS ("enthält", "contains"),
54 | /** String starts with */
55 | STRING_STARTS_WITH ("beginnt mit", "starts with"),
56 | /** String ends with */
57 | STRING_ENDS_WITH ("endet mit", "ends with"),
58 | /** String matches regular expression */
59 | STRING_REGEX ("entspricht regulärem Ausdruck", "matches regular expression"),
60 | /** Int even */
61 | INT_EVEN ("gerade", "even"),
62 | /** Int odd */
63 | INT_ODD ("ungerade", "odd"),
64 | /** Year of date */
65 | DATE_YEAR ("Jahr", "year"),
66 | /** Month of date */
67 | DATE_MONTH ("Monat", "month"),
68 | /** Day of date */
69 | DATE_DAY ("Tag", "day"),
70 | /** Year and month of date */
71 | DATE_YEAR_MONTH ("Jahr und Monat", "year and month"),
72 | /** Month and day of date */
73 | DATE_MONTH_DAY ("Monat und Tag", "month and day"),
74 | /** Hour of time */
75 | TIME_HOUR ("Stunde", "hour"),
76 | /** Minute of time */
77 | TIME_MINUTE ("Minute", "minute"),
78 | /** Second of time */
79 | TIME_SECOND ("Sekunde", "second");
80 |
81 | private final IMultilingualText m_aTP;
82 |
83 | private ESearchOperatorText (@Nonnull final String sGeneric)
84 | {
85 | this (sGeneric, sGeneric);
86 | }
87 |
88 | private ESearchOperatorText (@Nonnull final String sDE, @Nonnull final String sEN)
89 | {
90 | m_aTP = TextHelper.create_DE_EN (sDE, sEN);
91 | }
92 |
93 | @Nullable
94 | public String getDisplayText (@Nonnull final Locale aContentLocale)
95 | {
96 | return DefaultTextResolver.getTextStatic (this, m_aTP, aContentLocale);
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/search/SearchRateLimit.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.search;
18 |
19 | import java.time.Duration;
20 |
21 | import javax.annotation.Nullable;
22 |
23 | import org.slf4j.Logger;
24 | import org.slf4j.LoggerFactory;
25 |
26 | import com.helger.pd.indexer.settings.PDServerConfiguration;
27 |
28 | import es.moki.ratelimitj.core.limiter.request.RequestLimitRule;
29 | import es.moki.ratelimitj.core.limiter.request.RequestRateLimiter;
30 | import es.moki.ratelimitj.inmemory.request.InMemorySlidingWindowRequestRateLimiter;
31 |
32 | public final class SearchRateLimit
33 | {
34 | // Before the Instance, because it is used in the constructor
35 | private static final Logger LOGGER = LoggerFactory.getLogger (SearchRateLimit.class);
36 | public static final SearchRateLimit INSTANCE = new SearchRateLimit ();
37 |
38 | private final RequestRateLimiter m_aRequestRateLimiter;
39 |
40 | private SearchRateLimit ()
41 | {
42 | final long nRequestsPerSec = PDServerConfiguration.getRESTAPIMaxRequestsPerSecond ();
43 | if (nRequestsPerSec > 0)
44 | {
45 | // 2 request per second, per key
46 | // Note: duration must be > 1 second
47 | m_aRequestRateLimiter = new InMemorySlidingWindowRequestRateLimiter (RequestLimitRule.of (Duration.ofSeconds (2),
48 | nRequestsPerSec * 2));
49 | LOGGER.info ("Installed search rate limiter with a maximum of " + nRequestsPerSec + " requests per second");
50 | }
51 | else
52 | {
53 | m_aRequestRateLimiter = null;
54 | LOGGER.info ("Search API runs without limit");
55 | }
56 | }
57 |
58 | @Nullable
59 | public RequestRateLimiter rateLimiter ()
60 | {
61 | return m_aRequestRateLimiter;
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/AppRootServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import com.helger.commons.http.EHttpMethod;
20 | import com.helger.photon.core.servlet.AbstractPublicApplicationServlet;
21 | import com.helger.photon.core.servlet.RootXServletHandler;
22 | import com.helger.xservlet.AbstractXServlet;
23 |
24 | public class AppRootServlet extends AbstractXServlet
25 | {
26 | public AppRootServlet ()
27 | {
28 | handlerRegistry ().registerHandler (EHttpMethod.GET, new RootXServletHandler (AbstractPublicApplicationServlet.SERVLET_DEFAULT_PATH));
29 | handlerRegistry ().copyHandlerToAll (EHttpMethod.GET);
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/ExportServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import com.helger.commons.http.EHttpMethod;
20 | import com.helger.xservlet.AbstractXServlet;
21 |
22 | /**
23 | * Simple servlet streaming files not normally visible by the web server.
24 | *
25 | * @author philip
26 | */
27 | public final class ExportServlet extends AbstractXServlet
28 | {
29 | public static final String SERVLET_DEFAULT_NAME = "export";
30 | public static final String SERVLET_DEFAULT_PATH = '/' + SERVLET_DEFAULT_NAME;
31 |
32 | public ExportServlet ()
33 | {
34 | handlerRegistry ().registerHandler (EHttpMethod.GET, new ExportDeliveryHttpHandler ());
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/PublicApplicationServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import com.helger.pd.publisher.app.pub.PublicHTMLProvider;
20 | import com.helger.photon.app.html.IHTMLProvider;
21 | import com.helger.photon.core.servlet.AbstractApplicationXServletHandler;
22 | import com.helger.photon.core.servlet.AbstractPublicApplicationServlet;
23 | import com.helger.web.scope.IRequestWebScopeWithoutResponse;
24 |
25 | public class PublicApplicationServlet extends AbstractPublicApplicationServlet
26 | {
27 | public PublicApplicationServlet ()
28 | {
29 | super (new AbstractApplicationXServletHandler ()
30 | {
31 | @Override
32 | protected IHTMLProvider createHTMLProvider (final IRequestWebScopeWithoutResponse aRequestScope)
33 | {
34 | return new PublicHTMLProvider ();
35 | }
36 | });
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/PublicParticipantServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import com.helger.commons.http.EHttpMethod;
20 | import com.helger.xservlet.AbstractXServlet;
21 |
22 | /**
23 | * The participant quick lookup servlet (issue #30). Handles only GET requests.
24 | *
25 | * @author Philip Helger
26 | */
27 | public final class PublicParticipantServlet extends AbstractXServlet
28 | {
29 | public PublicParticipantServlet ()
30 | {
31 | handlerRegistry ().registerHandler (EHttpMethod.GET, new PublicParticipantXServletHandler ());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/PublicSearchServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import com.helger.commons.http.EHttpMethod;
20 | import com.helger.xservlet.AbstractXServlet;
21 |
22 | /**
23 | * The REST search servlet. Handles only GET requests.
24 | *
25 | * @author Philip Helger
26 | */
27 | public final class PublicSearchServlet extends AbstractXServlet
28 | {
29 | public PublicSearchServlet ()
30 | {
31 | handlerRegistry ().registerHandler (EHttpMethod.GET, new PublicSearchXServletHandler ());
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/SecureApplicationServlet.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import com.helger.pd.publisher.app.secure.SecureHTMLProvider;
20 | import com.helger.photon.app.html.IHTMLProvider;
21 | import com.helger.photon.core.servlet.AbstractApplicationXServletHandler;
22 | import com.helger.photon.core.servlet.AbstractSecureApplicationServlet;
23 | import com.helger.web.scope.IRequestWebScopeWithoutResponse;
24 |
25 | /**
26 | * The servlet to show the secure application
27 | *
28 | * @author Philip Helger
29 | */
30 | public class SecureApplicationServlet extends AbstractSecureApplicationServlet
31 | {
32 | public SecureApplicationServlet ()
33 | {
34 | super (new AbstractApplicationXServletHandler ()
35 | {
36 | @Override
37 | protected IHTMLProvider createHTMLProvider (final IRequestWebScopeWithoutResponse aRequestScope)
38 | {
39 | return new SecureHTMLProvider ();
40 | }
41 | });
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/servlet/SecureLoginFilter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.servlet;
18 |
19 | import javax.annotation.Nonnull;
20 |
21 | import com.helger.commons.state.EContinue;
22 | import com.helger.pd.publisher.app.AppSecurity;
23 | import com.helger.pd.publisher.app.PDLoginManager;
24 | import com.helger.photon.core.servlet.AbstractUnifiedResponseFilter;
25 | import com.helger.photon.security.login.LoggedInUserManager;
26 | import com.helger.photon.security.util.SecurityHelper;
27 | import com.helger.servlet.response.UnifiedResponse;
28 | import com.helger.web.scope.IRequestWebScopeWithoutResponse;
29 |
30 | import jakarta.servlet.ServletException;
31 | import jakarta.servlet.http.HttpServletResponse;
32 |
33 | /**
34 | * A special servlet filter that checks that a user can only access the config
35 | * application after authenticating.
36 | *
37 | * @author Philip Helger
38 | */
39 | public final class SecureLoginFilter extends AbstractUnifiedResponseFilter
40 | {
41 | private PDLoginManager m_aLogin;
42 |
43 | @Override
44 | public void init () throws ServletException
45 | {
46 | super.init ();
47 | // Make the application login configurable if you like
48 | m_aLogin = new PDLoginManager ();
49 | }
50 |
51 | @Override
52 | @Nonnull
53 | protected EContinue handleRequest (@Nonnull final IRequestWebScopeWithoutResponse aRequestScope,
54 | @Nonnull final UnifiedResponse aUnifiedResponse) throws ServletException
55 | {
56 | if (m_aLogin.checkUserAndShowLogin (aRequestScope, aUnifiedResponse).isBreak ())
57 | {
58 | // Show login screen
59 | return EContinue.BREAK;
60 | }
61 |
62 | // Check if the currently logged in user has the required roles
63 | final String sCurrentUserID = LoggedInUserManager.getInstance ().getCurrentUserID ();
64 | if (!SecurityHelper.hasUserAllRoles (sCurrentUserID, AppSecurity.REQUIRED_ROLE_IDS_CONFIG))
65 | {
66 | aUnifiedResponse.setStatus (HttpServletResponse.SC_FORBIDDEN);
67 | return EContinue.BREAK;
68 | }
69 |
70 | return EContinue.CONTINUE;
71 | }
72 | }
73 |
--------------------------------------------------------------------------------
/phoss-directory-publisher/src/main/java/com/helger/pd/publisher/ui/AbstractAppWebPage.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com)
3 | * philip[at]helger[dot]com
4 | *
5 | * Licensed under the Apache License, Version 2.0 (the "License");
6 | * you may not use this file except in compliance with the License.
7 | * You may obtain a copy of the License at
8 | *
9 | * http://www.apache.org/licenses/LICENSE-2.0
10 | *
11 | * Unless required by applicable law or agreed to in writing, software
12 | * distributed under the License is distributed on an "AS IS" BASIS,
13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 | * See the License for the specific language governing permissions and
15 | * limitations under the License.
16 | */
17 | package com.helger.pd.publisher.ui;
18 |
19 | import javax.annotation.Nonnull;
20 |
21 | import com.helger.commons.annotation.Nonempty;
22 | import com.helger.photon.bootstrap4.pages.AbstractBootstrapWebPage;
23 | import com.helger.photon.uicore.page.WebPageExecutionContext;
24 |
25 | public abstract class AbstractAppWebPage extends AbstractBootstrapWebPage 21 | phoss Directory is a Open Source Software developed on behalf of 22 | OpenPeppol AISBL. 23 |
24 | 25 |26 | OpenPeppol is not liable for the data published in the Peppol Directory. 27 | All information presented here is automatically assembled from information 28 | provided by Peppol SMPs and is only collected and indexed for searchability. 29 |
30 | 31 |33 | The source code of phoss Directory can be found on 34 | GitHub phax/phoss-directory. 35 | The source code is licensed under the Apache 2.0 license. 36 |
37 |38 | Original development by Philip Helger for Peppol Directory. 39 |
40 | -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/resources/viewpages/en/docs_export_all.xml: -------------------------------------------------------------------------------- 1 | 19 |20 | The Directory allows you to download all data contained. 21 |
22 | 23 |application/xml
.22 | The Peppol Directory offers the following possibilities to search for participant information: 23 |
24 | 25 |22 | The Peppol Directory contains information about entities participating in the Peppol network. 23 | It is intended to support business cases that are concerned with finding Peppol participants registered 24 | on the Peppol network in order to start exchanging business documents with them. 25 |
26 | 27 |28 | The Peppol Directory aggregates public information from SMPs (Service Metadata Publisher) and provides them 29 | centrally in a structured way. 30 |
31 | 32 |35 | This page is intended for all users that are trying to locate their business partners in the Peppol network. 36 | Both for onboarding as well for extending the scope of document exchange. 37 |
38 | 39 |42 | Currently the publication of Peppol participant information in an SMP happens on a voluntary basis. 43 | That implies that not all business entities are listed in the Peppol Directory which implies 44 | that if your desired partner does not show up in here it doesn't mean that the entity is not 45 | in the Peppol network! 46 | On the other hand if an entity shows up in the Peppol Directory you can be sure that the 47 | participant is a participant of the Peppol network. 48 |
49 | 50 |53 | The current administrative policy of the Peppol network requires that only Document Receiving capabilities 54 | of Peppol participants are registered on the network. 55 | There are plans to expand this in future to also encompass Document senders. 56 |
57 | 58 |59 | Until then, however, Peppol Directory can only natively index Receivers. 60 | Until the Peppol Policy changes, Peppol Senders without receiving capabilities 61 | would thus be invisible to Peppol Directory. 62 |
63 | 64 |65 | If a Participant has connectivity to send Peppol documents (e.g. Invoices) but not yet receive (e.g. Purchase Orders), 66 | then they still can be set up on Peppol Directory by means of a workaround 67 | (where their Peppol Provider creates a Dummy ID for indexing). 68 |
69 | -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/css/default.min.css: -------------------------------------------------------------------------------- 1 | #viewport table{margin-bottom:0 !important}#footer{display:block;background-color:#F5F5F5;border-top:1px solid #E5E5E5;margin-top:20px;padding:30px 0;text-align:center}.footer-links li{display:inline}#menu{min-width:15rem}#menu .nav>li>a{color:#716B7A;display:block;padding:5px 5px}#menu .nav>.active>a,#menu .nav>.active:hover>a,#menu .nav>.active:focus>a{background-color:rgba(0,0,0,0);border-right:1px solid #428BCA;color:#428BCA;font-weight:bold}#menu .nav .nav>li>a{font-size:90%;padding-bottom:3px;padding-left:15px;padding-top:3px}#menu .nav .nav .nav>li>a{padding-left:25px}#menu li.menu-separator{border-top:solid 1px rgba(0,0,0,0.125);padding-top:6px}.big-query-image-container{width:100%;height:200px}.big-query-image{width:100%;height:inherit;background-size:cover;background-position:center;background-repeat:no-repeat}.big-query-box{margin-top:3em}.big-query-helptext{font-size:small;color:#fff;margin:0.5em}.big-query-buttons{margin-top:1em;text-align:center}.small-querybox{margin:10px 0}.result-doc{margin:0.5em;padding:3px}li:nth-of-type(2n+1) .result-doc{background:#ddd}div.result-doc ul{padding-left:1em}div.result-doc ul li{list-style-type:none}.result-doc-header{border-top:solid 1px black;margin:0;padding:0}.result-doc-header:first-child{border-top:none}.result-doc-header table{margin:0}.result-doc-header table tbody td{padding-top:0;padding-bottom:0;border:0}.result-doc-sdbutton{margin-top:1em;margin-left:1em}.result-panel .form-group{margin-bottom:0}.result-panel .form-group table{margin-bottom:0}.rest .item{margin:1em 0;border-top:solid 1px black}.rest .pname{font-family:Menlo,Monaco,Consolas,"Courier New",monospace;font-weight:bold;background-color:#ddd;padding:2px 4px;border-radius:4px}.rest .pdesc{background-color:#ddd;padding:2px 4px;border-radius:4px}.vertical-padded-text{padding:0.375rem 0.75rem} -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/favicon.ico -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/files/OpenPEPPOL Directory for SMP providers 2016-12-05.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/files/OpenPEPPOL Directory for SMP providers 2016-12-05.pdf -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/files/PEPPOL-EDN-Directory-1.1.1-2020-10-15.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/files/PEPPOL-EDN-Directory-1.1.1-2020-10-15.pdf -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/google9aa227895f65ee21.html: -------------------------------------------------------------------------------- 1 | 19 | google-site-verification: google9aa227895f65ee21.html -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/de4a/de4a-small-158-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/de4a/de4a-small-158-50.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/de4a/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/de4a/favicon-16x16.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/de4a/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/de4a/favicon-32x32.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/de4a/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/de4a/favicon-96x96.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/peppol/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/peppol/favicon-16x16.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/peppol/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/peppol/favicon-32x32.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/peppol/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/peppol/favicon-96x96.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/peppol/peppol-small-204-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/peppol/peppol-small-204-50.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/peppol/peppol.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/peppol/peppol.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/toop/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/toop/favicon-16x16.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/toop/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/toop/favicon-32x32.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/toop/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/toop/favicon-96x96.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/toop/toop-directory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/toop/toop-directory.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/imgs/toop/toop-small-144-50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/phax/phoss-directory/1d381e13b716f91cb156e21bda5457afd96501de/phoss-directory-publisher/src/main/webapp/imgs/toop/toop-small-144-50.png -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/js/default.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com) 3 | * philip[at]helger[dot]com 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | $('form').preventDoubleSubmission(); 18 | 19 | // Used in REST API view page only 20 | $('.tryme').each (function(){ 21 | var sHref = $(this).find ('code').eq (0).text () + '&beautify=true'; 22 | $(this).find ('a').eq (0).attr ('target', '_blank').attr ('href', sHref); 23 | }); 24 | -------------------------------------------------------------------------------- /phoss-directory-publisher/src/main/webapp/js/default.min.js: -------------------------------------------------------------------------------- 1 | $("form").preventDoubleSubmission();$(".tryme").each(function(){var a=$(this).find("code").eq(0).text()+"&beautify=true";$(this).find("a").eq(0).attr("target","_blank").attr("href",a)}); 2 | -------------------------------------------------------------------------------- /phoss-directory-publisher/src/test/java/com/helger/pd/publisher/SPITest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com) 3 | * philip[at]helger[dot]com 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.helger.pd.publisher; 18 | 19 | import org.junit.Test; 20 | 21 | import com.helger.commons.mock.SPITestHelper; 22 | import com.helger.photon.core.mock.PhotonCoreValidator; 23 | 24 | /** 25 | * Test SPI definitions and web.xml 26 | * 27 | * @author Philip Helger 28 | */ 29 | public final class SPITest 30 | { 31 | @Test 32 | public void testBasic () throws Exception 33 | { 34 | SPITestHelper.testIfAllSPIImplementationsAreValid (); 35 | PhotonCoreValidator.validateExternalResources (); 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /phoss-directory-publisher/src/test/java/com/helger/pd/publisher/jetty/JettyStopPD.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com) 3 | * philip[at]helger[dot]com 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.helger.pd.publisher.jetty; 18 | 19 | import java.io.IOException; 20 | 21 | import com.helger.photon.jetty.JettyStopper; 22 | 23 | public final class JettyStopPD 24 | { 25 | public static void main (final String [] args) throws IOException 26 | { 27 | new JettyStopper ().run (); 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /phoss-directory-publisher/src/test/java/com/helger/pd/publisher/jetty/RunInJettyPD.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (C) 2015-2025 Philip Helger (www.helger.com) 3 | * philip[at]helger[dot]com 4 | * 5 | * Licensed under the Apache License, Version 2.0 (the "License"); 6 | * you may not use this file except in compliance with the License. 7 | * You may obtain a copy of the License at 8 | * 9 | * http://www.apache.org/licenses/LICENSE-2.0 10 | * 11 | * Unless required by applicable law or agreed to in writing, software 12 | * distributed under the License is distributed on an "AS IS" BASIS, 13 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | * See the License for the specific language governing permissions and 15 | * limitations under the License. 16 | */ 17 | package com.helger.pd.publisher.jetty; 18 | 19 | import javax.annotation.concurrent.Immutable; 20 | 21 | import com.helger.httpclient.HttpDebugger; 22 | import com.helger.photon.jetty.JettyStarter; 23 | 24 | /** 25 | * Run as a standalone web application in Jetty on port 8080.null
47 | */
48 | @Nonnull
49 | public static PDSearchAPIReader null
46 | */
47 | @Nonnull
48 | public static PDSearchAPIValidator null
52 | */
53 | @Nonnull
54 | public static PDSearchAPIWriter