public class Message extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static org.josef.util.Message.MessageType |
DEBUG
A debug message.
|
static org.josef.util.Message.MessageType |
ERROR
An error message.
|
static org.josef.util.Message.MessageType |
FATAL
A fatal error message.
|
static org.josef.util.Message.MessageType |
INFO
An informational message.
|
static org.josef.util.Message.MessageType |
WARNING
A warning.
|
Constructor and Description |
---|
Message(org.josef.util.Message.MessageType type,
CResourceBundle resourceBundle,
String messageKey,
Object... messageArguments)
Constructs a message of the supplied type from the supplied resourceBundle, messageKey and optional messageArguments.
|
Message(org.josef.util.Message.MessageType type,
String message)
Constructs a message of the supplied type, using the supplied (localized) message.
|
Modifier and Type | Method and Description |
---|---|
String |
getMessage()
Gets the localized message.
|
org.josef.util.Message.MessageType |
getType()
Gets the type of message.
|
String |
toString()
Creates a String representation of this object.
|
public static final org.josef.util.Message.MessageType DEBUG
public static final org.josef.util.Message.MessageType INFO
public static final org.josef.util.Message.MessageType WARNING
public static final org.josef.util.Message.MessageType ERROR
public static final org.josef.util.Message.MessageType FATAL
public Message(org.josef.util.Message.MessageType type, CResourceBundle resourceBundle, String messageKey, Object... messageArguments)
type
- Message type.resourceBundle
- Resource bundle containing the message.messageKey
- Key to the resource bundle.messageArguments
- Optional Message arguments that are substituted in the retrieved String resource.IllegalArgumentException
- When the supplied messageKey is empty.NullPointerException
- When either the supplied type, resourceBundle or messageKey is null.public Message(org.josef.util.Message.MessageType type, String message)
type
- Message type.message
- The (localized) message.IllegalArgumentException
- When the supplied message is empty.NullPointerException
- When either the supplied type or message is null.public org.josef.util.Message.MessageType getType()
public String getMessage()
Copyright © 2008–2018. All rights reserved.