summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Lenz <thomas.lenz@egiz.gv.at>2019-08-19 16:29:56 +0200
committerThomas Lenz <thomas.lenz@egiz.gv.at>2019-08-19 16:29:56 +0200
commitecd4b586e450c4fba05db4c3539f9a898eace594 (patch)
tree8114daf2be00100cbcef19ed9fe75f2a44a3e258
parentdad84a8755546aea38b5fc90fa78c2aa1c01beb9 (diff)
downloadEAAF-Components-ecd4b586e450c4fba05db4c3539f9a898eace594.tar.gz
EAAF-Components-ecd4b586e450c4fba05db4c3539f9a898eace594.tar.bz2
EAAF-Components-ecd4b586e450c4fba05db4c3539f9a898eace594.zip
add new method to IStatusMessenger
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java13
-rw-r--r--eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java8
2 files changed, 21 insertions, 0 deletions
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java
index fef65b28..04323dea 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java
@@ -26,6 +26,9 @@
*******************************************************************************/
package at.gv.egiz.eaaf.core.api;
+import javax.annotation.Nonnull;
+import javax.annotation.Nullable;
+
public interface IStatusMessenger {
//internal error codes defined in EAAFCore
@@ -50,8 +53,18 @@ public interface IStatusMessenger {
* @param parameters The parameters to fill in into the message arguments.
* @return The formatted message.
*/
+ @Nonnull
public String getMessage(String messageId, Object[] parameters);
+ /**
+ * Get the message corresponding to a given message ID.
+ *
+ * @param messageId The ID of the message.
+ * @param parameters The parameters to fill in into the message arguments.
+ * @return The formatted message, or <code>null</code> if no message was fround
+ */
+ @Nullable
+ public String getMessageWithoutDefault(String messageId, Object[] parameters);
/**
* Get external errorCode from from Exception
diff --git a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java
index f8390002..19bc9951 100644
--- a/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java
+++ b/eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java
@@ -39,6 +39,13 @@ public class DummyStatusMessager implements IStatusMessenger {
}
@Override
+ public String getMessageWithoutDefault(String messageId, Object[] parameters) {
+ return getMessage(messageId, parameters);
+
+ }
+
+
+ @Override
public String getResponseErrorCode(Throwable throwable) {
return "No StatusMessager-Backend available!";
@@ -50,4 +57,5 @@ public class DummyStatusMessager implements IStatusMessenger {
}
+
}