application.properties
file.
29 | *
30 | * @author Philip Helger
31 | */
32 | public final class AppConfig extends AbstractGlobalSingleton
33 | {
34 | @Deprecated
35 | @UsedViaReflection
36 | private AppConfig ()
37 | {}
38 |
39 | @Nonnull
40 | public static IConfig getConfig ()
41 | {
42 | return SharedUIConfig.getConfig ();
43 | }
44 |
45 | public static boolean isWebPageCommentingEnabled ()
46 | {
47 | return getConfig ().getAsBoolean ("webapp.pagecomments.enabled", false);
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/app/AppInternalErrorHandler.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.app;
18 |
19 | import java.util.Map;
20 |
21 | import javax.annotation.Nonnull;
22 | import javax.annotation.Nullable;
23 |
24 | import com.helger.commons.annotation.Nonempty;
25 | import com.helger.commons.email.EmailAddress;
26 | import com.helger.photon.core.interror.InternalErrorBuilder;
27 | import com.helger.photon.core.interror.InternalErrorSettings;
28 | import com.helger.photon.core.interror.callback.AbstractErrorCallback;
29 | import com.helger.photon.core.mgr.PhotonCoreManager;
30 | import com.helger.photon.core.smtp.CNamedSMTPSettings;
31 | import com.helger.photon.core.smtp.NamedSMTPSettings;
32 | import com.helger.smtp.settings.ISMTPSettings;
33 | import com.helger.web.scope.IRequestWebScopeWithoutResponse;
34 |
35 | public final class AppInternalErrorHandler extends AbstractErrorCallback
36 | {
37 | @Override
38 | protected void onError (@Nonnull final Throwable t,
39 | @Nullable final IRequestWebScopeWithoutResponse aRequestScope,
40 | @Nonnull @Nonempty final String sErrorCode,
41 | @Nullable final Map null
.
65 | * @return {@link EChange}
66 | */
67 | @Nonnull
68 | EChange setState (@Nonnull ECommentState eState);
69 |
70 | /**
71 | * @return true
if this comment was deleted
72 | */
73 | boolean isDeleted ();
74 |
75 | /**
76 | * @return How often was this commented edited. This is 0 if the comment was
77 | * just created and never edited.
78 | */
79 | @Nonnegative
80 | int getEditCount ();
81 |
82 | /**
83 | * Increment the edit count and set the last modification date time to now.
84 | */
85 | void onCommentEdited ();
86 |
87 | /**
88 | * @return How often was the entry reported as spam. Always ≥ 0.
89 | */
90 | @Nonnegative
91 | int getSpamReportCount ();
92 |
93 | /**
94 | * Increment the spam report count.
95 | */
96 | void onCommentSpamReport ();
97 |
98 | // content vars
99 |
100 | /**
101 | * @return The last modification date time or if not present the creation date
102 | * time.
103 | */
104 | @Nonnull
105 | LocalDateTime getLastChangeDateTime ();
106 |
107 | /**
108 | * @return The user who created the comment. May be null
for
109 | * public comments. One of userID or creator name must be present.
110 | */
111 | @Nullable
112 | String getUserID ();
113 |
114 | /**
115 | * @return The name of the person who created the comment. May be
116 | * null
for restricted comments. One of userID or creator
117 | * name must be present.
118 | */
119 | @Nullable
120 | String getCreatorName ();
121 |
122 | /**
123 | * @return The comment title. May be null
.
124 | */
125 | @Nullable
126 | String getTitle ();
127 |
128 | /**
129 | * @return The main comment text. May not be null
.
130 | */
131 | @Nonnull
132 | String getText ();
133 | }
134 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/domain/ICommentIterationCallback.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.domain;
18 |
19 | import javax.annotation.Nonnegative;
20 | import javax.annotation.Nonnull;
21 | import javax.annotation.Nullable;
22 |
23 | /**
24 | * Callback interface for iterating all comments within a comment thread
25 | *
26 | * @author Philip Helger
27 | */
28 | public interface ICommentIterationCallback
29 | {
30 | /**
31 | * Called for each comment within a comment thread
32 | *
33 | * @param nLevel
34 | * Current nesting level
35 | * @param aParentComment
36 | * The parent comment - is null
for the top-level entry
37 | * @param aComment
38 | * The current comment
39 | */
40 | default void onCommentStart (@Nonnegative final int nLevel, @Nullable final IComment aParentComment, @Nonnull final IComment aComment)
41 | {}
42 |
43 | /**
44 | * Called for each comment within a comment thread
45 | *
46 | * @param nLevel
47 | * Current nesting level
48 | * @param aParentComment
49 | * The parent comment - is null
for the top-level entry
50 | * @param aComment
51 | * The current comment
52 | */
53 | default void onCommentEnd (@Nonnegative final int nLevel, @Nullable final IComment aParentComment, @Nonnull final IComment aComment)
54 | {}
55 | }
56 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/domain/ICommentThread.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.domain;
18 |
19 | import java.time.LocalDateTime;
20 | import java.util.Collection;
21 |
22 | import javax.annotation.Nonnegative;
23 | import javax.annotation.Nonnull;
24 | import javax.annotation.Nullable;
25 |
26 | import com.helger.commons.annotation.MustImplementEqualsAndHashcode;
27 | import com.helger.commons.annotation.ReturnsMutableCopy;
28 | import com.helger.commons.state.EChange;
29 | import com.helger.commons.type.ITypedObject;
30 | import com.helger.tree.withid.unique.DefaultTreeWithGlobalUniqueID;
31 |
32 | /**
33 | * Interface for a single comment thread. It holds {@link IComment} objects in a
34 | * tree structured way.
35 | *
36 | * @author Philip Helger
37 | */
38 | @MustImplementEqualsAndHashcode
39 | public interface ICommentThread extends ITypedObject null
.
46 | */
47 | @Nonnull
48 | IComment getInitialComment ();
49 |
50 | /**
51 | * @return The creation date time of the first comment that started this
52 | * thread. Never null
.
53 | */
54 | @Nonnull
55 | default LocalDateTime getInitialCommentCreationDateTime ()
56 | {
57 | return getInitialComment ().getCreationDateTime ();
58 | }
59 |
60 | /**
61 | * Add a comment to this thread.
62 | *
63 | * @param aParentComment
64 | * The non-null
parent comment
65 | * @param aNewComment
66 | * The comment to be added as an answer to the the parent comment
67 | * @return the added comment
68 | */
69 | @Nonnull
70 | IComment addComment (@Nonnull IComment aParentComment, @Nonnull IComment aNewComment);
71 |
72 | /**
73 | * Delete a comment FROM this thread.
74 | *
75 | * @param sCommentID
76 | * The ID of the comment to be removed. May be null
.
77 | * @param eNewState
78 | * The new state to be set. May not be null
.
79 | * @return {@link EChange}
80 | */
81 | @Nonnull
82 | EChange updateCommentState (@Nullable String sCommentID, @Nonnull ECommentState eNewState);
83 |
84 | /**
85 | * @return The total comment count. Always ≥ 0.
86 | */
87 | @Nonnegative
88 | int getTotalCommentCount ();
89 |
90 | /**
91 | * @return A list of all comments in this thread
92 | */
93 | @Nonnull
94 | @ReturnsMutableCopy
95 | Collection null
if no such comment exists
116 | */
117 | @Nullable
118 | IComment getCommentOfID (@Nullable String sCommentID);
119 |
120 | /**
121 | * Iterate the comment tree in this thread
122 | *
123 | * @param aCallback
124 | * The callback handler to invoke. May not be null
.
125 | */
126 | void iterateAllComments (@Nonnull ICommentIterationCallback aCallback);
127 | }
128 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/ui/CCommentCSS.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.ui;
18 |
19 | import javax.annotation.concurrent.Immutable;
20 |
21 | import com.helger.html.css.DefaultCSSClassProvider;
22 | import com.helger.html.css.ICSSClassProvider;
23 |
24 | /**
25 | * CSS classes for comments
26 | *
27 | * @author Philip Helger
28 | */
29 | @Immutable
30 | public final class CCommentCSS
31 | {
32 | // Viewing
33 | public static final ICSSClassProvider CSS_CLASS_COMMENT_CONTAINER = DefaultCSSClassProvider.create ("comment-container");
34 | public static final ICSSClassProvider CSS_CLASS_COMMENT_THREAD = DefaultCSSClassProvider.create ("comment-thread");
35 | public static final ICSSClassProvider CSS_CLASS_SINGLE_COMMENT = DefaultCSSClassProvider.create ("comment-single-comment");
36 | public static final ICSSClassProvider CSS_CLASS_COMMENT_REGISTERED_USER = DefaultCSSClassProvider.create ("comment-registered-user");
37 | public static final ICSSClassProvider CSS_CLASS_COMMENT_TOOLBAR = DefaultCSSClassProvider.create ("comment-toolbar");
38 | public static final ICSSClassProvider CSS_CLASS_COMMENT_TITLE = DefaultCSSClassProvider.create ("comment-title");
39 | public static final ICSSClassProvider CSS_CLASS_COMMENT_TEXT = DefaultCSSClassProvider.create ("comment-text");
40 | public static final ICSSClassProvider CSS_CLASS_COMMENT_AUTHOR = DefaultCSSClassProvider.create ("comment-author");
41 | public static final ICSSClassProvider CSS_CLASS_COMMENT_CREATIONDT = DefaultCSSClassProvider.create ("comment-creation-datetime");
42 | public static final ICSSClassProvider CSS_CLASS_COMMENT_LAST_MODIFICATION = DefaultCSSClassProvider.create ("comment-last-modification");
43 |
44 | // Creation
45 | public static final ICSSClassProvider CSS_CLASS_COMMENT_CREATE = DefaultCSSClassProvider.create ("comment-create");
46 |
47 | private CCommentCSS ()
48 | {}
49 | }
50 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/ui/CommentAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.ui;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.Nullable;
21 |
22 | import com.helger.commons.ValueEnforcer;
23 | import com.helger.peppol.comment.domain.IComment;
24 | import com.helger.peppol.comment.domain.ICommentThread;
25 | import com.helger.photon.core.form.FormErrorList;
26 |
27 | public final class CommentAction extends FormErrorList
28 | {
29 | private final ECommentAction m_eCommentAction;
30 | private final ICommentThread m_aCommentThread;
31 | private final IComment m_aParentComment;
32 |
33 | private CommentAction (@Nonnull final ECommentAction eCommentAction,
34 | @Nullable final ICommentThread aCommentThread,
35 | @Nullable final IComment aParentComment)
36 | {
37 | ValueEnforcer.notNull (eCommentAction, "CommentAction");
38 | m_eCommentAction = eCommentAction;
39 | m_aCommentThread = aCommentThread;
40 | m_aParentComment = aParentComment;
41 | }
42 |
43 | public boolean isMatching (@Nonnull final ECommentAction eAction)
44 | {
45 | return m_eCommentAction.equals (eAction);
46 | }
47 |
48 | public boolean isMatching (@Nullable final ICommentThread aCommentThread, @Nullable final IComment aComment)
49 | {
50 | return m_aCommentThread != null &&
51 | m_aCommentThread.equals (aCommentThread) &&
52 | m_aParentComment != null &&
53 | m_aParentComment.equals (aComment);
54 | }
55 |
56 | public boolean isMatching (@Nonnull final ECommentAction eAction,
57 | @Nullable final ICommentThread aCommentThread,
58 | @Nullable final IComment aComment)
59 | {
60 | return isMatching (eAction) && isMatching (aCommentThread, aComment);
61 | }
62 |
63 | @Nonnull
64 | public ECommentAction getAction ()
65 | {
66 | return m_eCommentAction;
67 | }
68 |
69 | @Nullable
70 | public ICommentThread getCommentThread ()
71 | {
72 | return m_aCommentThread;
73 | }
74 |
75 | @Nullable
76 | public IComment getParentComment ()
77 | {
78 | return m_aParentComment;
79 | }
80 |
81 | @Nonnull
82 | public static CommentAction createGeneric (@Nonnull final ECommentAction eCommentAction)
83 | {
84 | return new CommentAction (eCommentAction, null, null);
85 | }
86 |
87 | @Nonnull
88 | public static CommentAction createForComment (@Nonnull final ECommentAction eCommentAction,
89 | @Nonnull final ICommentThread aCommentThread,
90 | @Nonnull final IComment aParentComment)
91 | {
92 | ValueEnforcer.notNull (aCommentThread, "CommentThread");
93 | ValueEnforcer.notNull (aParentComment, "ParentComment");
94 | return new CommentAction (eCommentAction, aCommentThread, aParentComment);
95 | }
96 | }
97 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/ui/CommentFormErrors.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.ui;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.Nullable;
21 |
22 | import com.helger.commons.ValueEnforcer;
23 | import com.helger.peppol.comment.domain.IComment;
24 | import com.helger.peppol.comment.domain.ICommentThread;
25 | import com.helger.photon.core.form.FormErrorList;
26 |
27 | public final class CommentFormErrors extends FormErrorList
28 | {
29 | private final ICommentThread m_aCommentThread;
30 | private final IComment m_aParentComment;
31 |
32 | private CommentFormErrors (@Nullable final ICommentThread aCommentThread, @Nullable final IComment aParentComment)
33 | {
34 | m_aCommentThread = aCommentThread;
35 | m_aParentComment = aParentComment;
36 | }
37 |
38 | public boolean isForNewThread ()
39 | {
40 | return m_aCommentThread == null;
41 | }
42 |
43 | public boolean isReplyTo (@Nullable final ICommentThread aCommentThread, @Nullable final IComment aComment)
44 | {
45 | return m_aCommentThread != null &&
46 | m_aCommentThread.equals (aCommentThread) &&
47 | m_aParentComment != null &&
48 | m_aParentComment.equals (aComment);
49 | }
50 |
51 | @Nullable
52 | public ICommentThread getCommentThread ()
53 | {
54 | return m_aCommentThread;
55 | }
56 |
57 | @Nullable
58 | public IComment getParentComment ()
59 | {
60 | return m_aParentComment;
61 | }
62 |
63 | @Nonnull
64 | public static CommentFormErrors createForNewThread ()
65 | {
66 | return new CommentFormErrors (null, null);
67 | }
68 |
69 | @Nonnull
70 | public static CommentFormErrors createForReply (@Nonnull final ICommentThread aCommentThread, @Nonnull final IComment aParentComment)
71 | {
72 | ValueEnforcer.notNull (aCommentThread, "CommentThread");
73 | ValueEnforcer.notNull (aParentComment, "ParentComment");
74 | return new CommentFormErrors (aCommentThread, aParentComment);
75 | }
76 | }
77 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/ui/CommentSecurity.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.ui;
18 |
19 | import javax.annotation.concurrent.Immutable;
20 |
21 | import com.helger.peppol.app.CPPApp;
22 | import com.helger.photon.security.login.LoggedInUserManager;
23 | import com.helger.photon.security.util.SecurityHelper;
24 |
25 | @Immutable
26 | public final class CommentSecurity
27 | {
28 | private CommentSecurity ()
29 | {}
30 |
31 | public static boolean canCurrentUserPostComments ()
32 | {
33 | return LoggedInUserManager.getInstance ().isUserLoggedInInCurrentSession ();
34 | }
35 |
36 | public static boolean isCurrentUserCommentModerator ()
37 | {
38 | return SecurityHelper.hasCurrentUserRole (CPPApp.ROLE_COMMENT_MODERATOR_ID);
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/ui/ECommentAction.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.ui;
18 |
19 | public enum ECommentAction
20 | {
21 | NONE,
22 | CREATE_THREAD,
23 | ADD_COMMENT,
24 | DELETE_COMMENT;
25 | }
26 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/comment/ui/ECommentText.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.comment.ui;
18 |
19 | import java.util.Locale;
20 |
21 | import javax.annotation.Nonnull;
22 | import javax.annotation.Nullable;
23 |
24 | import com.helger.commons.annotation.Translatable;
25 | import com.helger.commons.text.IMultilingualText;
26 | import com.helger.commons.text.display.IHasDisplayTextWithArgs;
27 | import com.helger.commons.text.resolve.DefaultTextResolver;
28 | import com.helger.commons.text.util.TextHelper;
29 |
30 | @Translatable
31 | public enum ECommentText implements IHasDisplayTextWithArgs
32 | {
33 | MSG_IS_DELETED ("[gelöscht] ", "[deleted] "),
34 | MSG_BY (" von ", " by "),
35 | MSG_SEPARATOR_AUTHOR_TITLE (" - ", " - "),
36 | TOOLTIP_RESPONSE ("Auf diesen Kommentar antworten", "Reply to this comment"),
37 | TOOLTIP_DELETE ("Diesen Kommentar löschen", "Delete this comment"),
38 | TOOLTIP_HOST ("Quell-Host: {0}", "Original host: {0}"),
39 | MSG_LAST_MODIFICATION ("Letzte Änderung: {0}", "Last modification: {0}"),
40 | MSG_EDITED_AND_LAST_MODIFICATION ("{0} mal bearbeitet. Zuletzt: {1}", "Edited {0} times. Last modification: {1}"),
41 | MSG_CREATE_COMMENT ("Neuen Kommentar erstellen", "Create new comment"),
42 | MSG_LOGIN_TO_COMMENT ("Sie müssen angemeldet sein, um einen Kommentar zu verfassen!", "You must be logged in to post a comment!"),
43 |
44 | MSG_FIELD_AUTHOR ("Ihr Name", "Your name"),
45 | DESC_FIELD_AUTHOR ("Geben Sie Ihren Namen an. Ohne den Namen kann der Kommentar nicht gespeichert werden",
46 | "Provide your name here. The comment cannot be saved without a name"),
47 | MSG_FIELD_TITLE ("Titel", "Title"),
48 | DESC_FIELD_TITLE ("Geben Sie den Titel des Kommentars an. Dieser kann auch leer bleiben",
49 | "Provide the title/subject of your comment. The title is optional and you're not required to insert any text here"),
50 | MSG_FIELD_TEXT ("Ihr Kommentar", "Your comment"),
51 | DESC_FIELD_TEXT ("Geben Sie Ihren Kommentar in diesem Feld an. Es können mehrere Zeilen verwendet werden, HTML Code wird jedoch nicht interpretiert",
52 | "Provide your comment here. It can have multiple lines but HTML code is not interpreted at all!"),
53 |
54 | MSG_COMMENT_SAVE_SUCCESS ("Ihr Kommentar wurde erfolgreich gespeichert!", "Your comment was successfully saved!"),
55 | MSG_COMMENT_SAVE_FAILURE ("Ihr Kommentar konnte nicht gespeichert werden!", "Your comment could not be saved!"),
56 | MSG_ERR_COMMENT_NO_TEXT ("Der Text darf nicht leer sein. Geben Sie einen Text an!",
57 | "The comment text may not be empty. Provide a comment text!"),
58 | MSG_ERR_COMMENT_NO_AUTHOR ("Ihr Name darf nicht leer sein. Geben Sie Ihre Namen an!", "Your name may not be empty. Provide your name!"),
59 |
60 | MSG_COMMENT_DELETE_SUCCESS ("Der Kommentar wurde erfolgreich gelöscht!", "The comment was successfully deleted!"),
61 | MSG_COMMENT_DELETE_FAILURE ("Der Kommentar konnte nicht gelöscht werden!", "The comment could not be deleted!");
62 |
63 | private final IMultilingualText m_aTP;
64 |
65 | private ECommentText (@Nonnull final String sDE, @Nonnull final String sEN)
66 | {
67 | m_aTP = TextHelper.create_DE_EN (sDE, sEN);
68 | }
69 |
70 | @Nullable
71 | public String getDisplayText (@Nonnull final Locale aContentLocale)
72 | {
73 | return DefaultTextResolver.getTextStatic (this, m_aTP, aContentLocale);
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/crm/CRMGroup.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.crm;
18 |
19 | import javax.annotation.Nonnull;
20 |
21 | import com.helger.commons.ValueEnforcer;
22 | import com.helger.commons.annotation.Nonempty;
23 | import com.helger.commons.state.EChange;
24 | import com.helger.commons.string.ToStringGenerator;
25 | import com.helger.commons.type.ObjectType;
26 | import com.helger.photon.security.object.StubObject;
27 | import com.helger.tenancy.AbstractBusinessObject;
28 |
29 | public class CRMGroup extends AbstractBusinessObject implements ICRMGroup
30 | {
31 | public static final ObjectType OT_CRM_GROUP = new ObjectType ("crm-group");
32 |
33 | private String m_sDisplayName;
34 | private String m_sSenderEmailAddress;
35 |
36 | public CRMGroup (@Nonnull @Nonempty final String sDisplayName, @Nonnull @Nonempty final String sSenderEmailAddress)
37 | {
38 | this (StubObject.createForCurrentUser (), sDisplayName, sSenderEmailAddress);
39 | }
40 |
41 | CRMGroup (@Nonnull @Nonempty final StubObject aStubObject,
42 | @Nonnull @Nonempty final String sDisplayName,
43 | @Nonnull @Nonempty final String sSenderEmailAddress)
44 | {
45 | super (aStubObject);
46 | setDisplayName (sDisplayName);
47 | setSenderEmailAddress (sSenderEmailAddress);
48 | }
49 |
50 | @Nonnull
51 | public ObjectType getObjectType ()
52 | {
53 | return OT_CRM_GROUP;
54 | }
55 |
56 | @Nonnull
57 | @Nonempty
58 | public String getDisplayName ()
59 | {
60 | return m_sDisplayName;
61 | }
62 |
63 | @Nonnull
64 | public EChange setDisplayName (@Nonnull @Nonempty final String sDisplayName)
65 | {
66 | ValueEnforcer.notEmpty (sDisplayName, "DisplayName");
67 | if (sDisplayName.equals (m_sDisplayName))
68 | return EChange.UNCHANGED;
69 | m_sDisplayName = sDisplayName;
70 | return EChange.CHANGED;
71 | }
72 |
73 | @Nonnull
74 | @Nonempty
75 | public String getSenderEmailAddress ()
76 | {
77 | return m_sSenderEmailAddress;
78 | }
79 |
80 | @Nonnull
81 | public EChange setSenderEmailAddress (@Nonnull @Nonempty final String sSenderEmailAddress)
82 | {
83 | ValueEnforcer.notEmpty (sSenderEmailAddress, "SenderEmailAddress");
84 | if (sSenderEmailAddress.equals (m_sSenderEmailAddress))
85 | return EChange.UNCHANGED;
86 | m_sSenderEmailAddress = sSenderEmailAddress;
87 | return EChange.CHANGED;
88 | }
89 |
90 | @Override
91 | public String toString ()
92 | {
93 | return ToStringGenerator.getDerived (super.toString ())
94 | .append ("DisplayName", m_sDisplayName)
95 | .append ("SenderEmailAddress", m_sSenderEmailAddress)
96 | .getToString ();
97 | }
98 | }
99 |
--------------------------------------------------------------------------------
/src/main/java/com/helger/peppol/crm/CRMGroupManager.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (C) 2014-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.peppol.crm;
18 |
19 | import javax.annotation.Nonnull;
20 | import javax.annotation.Nullable;
21 | import javax.annotation.concurrent.ThreadSafe;
22 |
23 | import com.helger.commons.annotation.Nonempty;
24 | import com.helger.commons.state.EChange;
25 | import com.helger.dao.DAOException;
26 | import com.helger.photon.audit.AuditHelper;
27 | import com.helger.photon.io.dao.AbstractPhotonMapBasedWALDAO;
28 | import com.helger.photon.security.object.BusinessObjectHelper;
29 |
30 | /**
31 | * Manager for {@link CRMGroup} instances.
32 | *
33 | * @author Philip Helger
34 | * @see com.helger.peppol.app.mgr.PPMetaManager
35 | */
36 | @ThreadSafe
37 | public final class CRMGroupManager extends AbstractPhotonMapBasedWALDAO null
.
45 | * @return Unified email address.
46 | */
47 | @Nonnull
48 | static String getUnifiedEmailAddress (@Nonnull final String sEmailAddress)
49 | {
50 | return sEmailAddress.trim ().toLowerCase (Locale.US);
51 | }
52 |
53 | @Nullable
54 | ESalutation getSalutation ();
55 |
56 | @Nullable
57 | String getSalutationID ();
58 |
59 | @Nullable
60 | String getSalutationDisplayName (@Nonnull Locale aContentLocale);
61 |
62 | @Nonnull
63 | @Nonempty
64 | String getName ();
65 |
66 | @Nonnull
67 | @Nonempty
68 | String getEmailAddress ();
69 |
70 | @Nonnull
71 | @ReturnsMutableCopy
72 | ICommonsSet
20 | This article outlines the required minimum firewall openings for default Peppol components.
21 | This list does not consider application specific firewall requirements.
22 | Please also remember the "connect once, connect everywhere" principle of Peppol, meaning that every
23 | Peppol AccessPoint (AP) MUST be capable of exchanging business documents with any other Peppol AP.
24 |
443
to *
(all IPs) - for sending messages to another AP80
to *
(all IPs) - for querying any SMP and to download CRL files from http://pki-crl.symauth.com/443
to Peppol Directory
51 | directory.peppol.eu
test-directory.peppol.eu
443
to SMK/SML
57 | edelivery.tech.ec.europa.eu
acc.edelivery.tech.ec.europa.eu
443
from *
(all IPs) - for receiving messages from another AP80
from *
(all IPs) - for being queried from any AP20 | This page contains some general thought about the Message Level Response (MLR) and eventual successors. 21 |
22 | 23 |
28 | The MLR is a message between End Users (C1 and C4) executed by Service Providers (C2 and C3).
29 | The official specification can be found at
30 | https://docs.peppol.eu/poacc/upgrade-3/profiles/36-mlr/.
31 | The MLR is a regular Peppol document like Invoice or Order and as such needs to be transmitted like any other Peppol document
32 | wrapped in an SBDH and send via AS4.
33 | The MLR is an optional document and is NOT mandatory. So not every sender of a business document supports the reception of MLRs.
34 | To check if MLR reception is supported, an SMP lookup is needed.
35 | Please note that the usage of C1, C2, C3 and C4 should be reversed to be precise but in this document, the usage of
36 | C1, C2, C3 and C4 always refers to the role for the transmission of the source document to avoid confusion.
37 | Please note, that an MLR message can be send as a response to any business document as long as its reception is supported.
38 |
43 | The scope in which the MLR MAY be used is clearly defined in the 44 | specification chapter 2.2. 45 | As the sender is obliged to only send valid (=validated) content, validation on receiver side is an optional task. 46 | And don't mix MLR with BLR (Business Level Response - e.g. Invoice Response) because they have different meanings. 47 |
48 | 49 |52 | The following process description shows a best practice process proposal. 53 | The assumption is, that receiver side validation was performed and the response should be transmitted back to C1. 54 |
55 | 56 |SignalMessage
with an Error
element inside
77 | My peppol-commons project received an extension
78 | to deal with MLR in the peppol-mlr
module. It allows to create the MLR payload in a consistent way.
79 | For the SMP lookup the same project has a peppol-smp-client
module.
80 | Wrapping the MLR in SBDH and sending the message can be done with any compliant Peppol AS4 solution like phase4.
81 |
Currently in the process of specification. More when ready.
86 | 87 |88 | The intention of the MLS is to be a message between C2 and C3 instead of a message between C1 and C4 like the MLR. 89 | This makes it easier to mandate it, because only Service Providers are forced to support it. 90 |
91 | 92 | -------------------------------------------------------------------------------- /src/main/resources/viewpages/en/docs_sml_support.xml: -------------------------------------------------------------------------------- 1 | 19 |20 | This page explains how and when to get support for SML issues. The support is handled 21 | by DIGIT eDelivery SUPPORT. You can reach them by email 22 | (EC-EDELIVERY-SUPPORT[AT]ec.europa.eu - replace [AT] with @ - changed in September 2022!) 23 | as well as by phone 24 | (phone number was send out to TICC mailing list on June 9th 2015). 25 |
26 | 27 |33 | | Standard Service | 34 |Standby Service | 35 |||
---|---|---|---|---|
Priority | 38 |Serivce Level | 39 |Target | 40 |Serivce Level | 41 |Target | 42 |
Critical | 47 |
48 | 2 working hours
49 | 4 working hours
50 | |
51 |
52 | 80%
53 | 80%
54 | |
55 |
56 | 4 hours
57 | |
58 |
59 | 90%
60 | |
61 |
Urgent | 64 |
65 | 4 working hours
66 | 6 working hours
67 | |
68 |
69 | 80%
70 | 80%
71 | |
72 |
73 | 8 hours
74 | |
75 |
76 | 80%
77 | |
78 |
Normal | 81 |
82 | 10 working hours
83 | 20 working hours
84 | |
85 |
86 | 80%
87 | 80%
88 | |
89 |
90 | NA – will be handled the next morning/day
91 | |
92 |
93 | NA
94 | |
95 |
Low | 98 |
99 | 20 working hours
100 | 40 working hours
101 | |
102 |
103 | 80%
104 | 80%
105 | |
106 |
107 | NA – will be handled the next morning/day
108 | |
109 |
110 | NA
111 | |
112 |
138 | Note: During the Standby only calls are supported, emails will be treated the next day at 08:00 AM 139 |
140 | -------------------------------------------------------------------------------- /src/main/resources/viewpages/en/docs_software_vendors.xml: -------------------------------------------------------------------------------- 1 | 19 |
20 | This page contains a list of software and vendors that are known to support Peppol and/or eDelivery functionality.
21 | The list on this page is not complete.
22 | No guarantee on anything on this page.
23 | If you want to be included, or you are a vendor and want something changed, ping me.
24 |
Other software lists:
27 |This chapter deals with AS4 solutions only.
37 | 38 |This chapter deals with Service Metadata Publisher (SMP) solutions only.
50 | 51 |This chapter deals with validation solutions only.
59 | 60 |This chapter deals with hosted Peppol solutions only
70 | 71 |This chapter deals with ERP solutions only
81 | 82 |20 | This page is supposed to contain technical information for Peppol implementers. 21 | This page is brought to you by Philip Helger. 22 | I was working for the Austrian Government, being the technical lead for e-Rechnung.gv.at the eInvoicing solution of the Austrian government. 23 | Since 2019 I am a freelancer and working on Peppol and eInvoicing projects. 24 |
25 | 26 |27 | This page is currently divided into the following sections: 28 |
29 |65 | The following general purpose Peppol links may also be of interest for you: 66 |
67 |77 | Note: the complete source code of this web site can be found on 78 | GitHub. 79 |
80 | -------------------------------------------------------------------------------- /src/main/webapp/WEB-INF/sun-jaxws.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 |")
54 | .append (aEntry.getID ().getAsSingleID ())
55 | .append ("
- ")
56 | .append (aEntry.getDisplayName ())
57 | .append (sAliasHint)
58 | .append (aEntry.getStatus ().isDeprecated () ? " (Deprecated)" : "")
59 | .append ("