Uses of Class
com.composum.sling.core.logging.Message
-
Packages that use Message Package Description com.composum.sling.core.logging com.composum.sling.core.servlet -
-
Uses of Message in com.composum.sling.core.logging
Fields in com.composum.sling.core.logging with type parameters of type Message Modifier and Type Field Description protected @NotNull com.google.gson.TypeAdapter<Message>
MessageTypeAdapterFactory.MessageTypeAdapter. defaultGsonAdapter
protected @Nullable List<Message>
Message. details
protected static Comparator<Message>
MessageContainer. MESSAGE_TIME_COMPARATOR
Used to sort messages by their time.protected @Nullable List<Message>
MessageContainer. messages
Methods in com.composum.sling.core.logging that return Message Modifier and Type Method Description @NotNull Message
Message. addDetail(@NotNull Message detailMessage)
Adds a detailmessage.Message
Message. clone()
static @NotNull Message
Message. debug(@NotNull String text, Object... arguments)
Convenience-method - constructs withdebug(java.lang.String, java.lang.Object...)
.static @NotNull Message
Message. error(@NotNull String text, Object... arguments)
Convenience-method - constructs witherror(java.lang.String, java.lang.Object...)
.static @NotNull Message
Message. info(@NotNull String text, Object... arguments)
Convenience-method - constructs withinfo(java.lang.String, java.lang.Object...)
.@NotNull Message
Message. logInto(@Nullable org.slf4j.Logger log)
Logs the message into the specified logger.@NotNull Message
Message. logInto(@Nullable org.slf4j.Logger log, @Nullable Throwable cause)
Logs the message into the specified logger, including the {cause}'s stacktrace.protected Message
Message. prepareForJsonSerialization(org.apache.sling.api.SlingHttpServletRequest request)
protected @NotNull Message
MessageTypeAdapterFactory.MessageTypeAdapter. prepareI18nMessage(@NotNull Message value)
Message
MessageTypeAdapterFactory.MessageTypeAdapter. read(com.google.gson.stream.JsonReader in)
@NotNull Message
Message. setCategory(@Nullable String category)
Sets the optional category: can optionally be used to categorize messages for filtering / sorting.@NotNull Message
Message. setContext(@Nullable String context)
Sets a context: a context of the message, such as the dialog tab in a validation message.@NotNull Message
Message. setLabel(@Nullable String label)
Sets the optional context: a label of the field which the message is about, primarily in validation messages.@NotNull Message
Message. setLogLevel(@Nullable Message.Level logLevel)
Sets the level with which we will log the message ifMessageContainer
has a logger.@NotNull Message
Message. setPath(@Nullable String path)
Sets the optional resource path this message is about, and returns this message for builder style construction.static Message
Message. validationError(@Nullable String context, @Nullable String label, @NotNull String text, Object... args)
Convenience-method - constructs a validation message (which is logged only at level debug) witherror(java.lang.String, java.lang.Object...)
.static Message
Message. validationInfo(@Nullable String context, @Nullable String label, @NotNull String text, Object... args)
Convenience-method - constructs a validation message (which is logged only at level debug) withinfo(java.lang.String, java.lang.Object...)
.static Message
Message. validationWarn(@Nullable String context, @Nullable String label, @NotNull String text, Object... args)
Convenience-method - constructs a validation message (which is logged only at level debug) withwarn(java.lang.String, java.lang.Object...)
.static @NotNull Message
Message. warn(@NotNull String text, Object... arguments)
Convenience-method - constructs withwarn(java.lang.String, java.lang.Object...)
.Methods in com.composum.sling.core.logging that return types with arguments of type Message Modifier and Type Method Description @NotNull List<Message>
Message. getDetails()
Optional unmodifiable collection of detail messages describing the problem further.@NotNull List<Message>
MessageContainer. getMessages()
A (unmodifiable) snapshot of the list of messages.Iterator<Message>
MessageContainer. iterator()
Iterates over a readonly view.Spliterator<Message>
MessageContainer. spliterator()
Iterates over a readonly view.Methods in com.composum.sling.core.logging with parameters of type Message Modifier and Type Method Description @NotNull MessageContainer
MessageContainer. add(@Nullable Message message)
Adds a message to the container, and logs it into the logger if one was specified for this container.@NotNull MessageContainer
MessageContainer. add(@Nullable Message message, @Nullable Throwable throwable)
Adds a message to the container, and logs it into the logger if one was specified for this container.@NotNull Message
Message. addDetail(@NotNull Message detailMessage)
Adds a detailmessage.protected @NotNull Message
MessageTypeAdapterFactory.MessageTypeAdapter. prepareI18nMessage(@NotNull Message value)
void
MessageTypeAdapterFactory.MessageTypeAdapter. write(com.google.gson.stream.JsonWriter out, Message value)
Method parameters in com.composum.sling.core.logging with type arguments of type Message Modifier and Type Method Description void
MessageContainer. forEach(Consumer<? super Message> action)
Iterates over a readonly view.Constructor parameters in com.composum.sling.core.logging with type arguments of type Message Constructor Description MessageTypeAdapter(@NotNull com.google.gson.Gson gson, @NotNull com.google.gson.TypeAdapter<Message> defaultGsonAdapter)
-
Uses of Message in com.composum.sling.core.servlet
Methods in com.composum.sling.core.servlet that return Message Modifier and Type Method Description @NotNull Message
Status. addMessage(@NotNull Message message)
Adds the message and returns it.@NotNull Message
Status. addValidationMessage(@NotNull Message.Level level, @Nullable String context, @Nullable String label, @NotNull String text, Object... args)
For use with validation messages: add context and label, too.protected Message
TranslationServlet.TranslateStatus. parseMessage(Map<String,Object> data)
Reads a message from the input format.Message
Status. shortMessage(@NotNull Message.Level level, @NotNull String text, Object... args)
Adds a message with minimum information.Methods in com.composum.sling.core.servlet with parameters of type Message Modifier and Type Method Description @NotNull Message
Status. addMessage(@NotNull Message message)
Adds the message and returns it.
-