diff options
-rw-r--r-- | eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/api/IStatusMessenger.java | 13 | ||||
-rw-r--r-- | eaaf_core_api/src/main/java/at/gv/egiz/eaaf/core/impl/logging/DummyStatusMessager.java | 8 |
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 { } + } |