de.danet.an.workflow.api
Class PrioritizedMessage

java.lang.Object
  extended byde.danet.an.workflow.api.PrioritizedMessage
All Implemented Interfaces:
java.io.Serializable

public class PrioritizedMessage
extends java.lang.Object
implements java.io.Serializable

This class presents a prioritized message that will be internationalized using the specified resource bundle and the referenced entry. For details see the description of its class contructor.

See Also:
Serialized Form

Nested Class Summary
static class PrioritizedMessage.Priority
          This class represents the priority of a given message.
 
Constructor Summary
PrioritizedMessage(PrioritizedMessage.Priority priority, java.lang.String message)
          Constructs a prioritized message.
PrioritizedMessage(PrioritizedMessage.Priority priority, java.lang.String message, java.lang.Object[] data)
          Constructs a prioritized message.
 
Method Summary
 java.lang.String message()
          Returns the message.
 java.lang.String message(java.util.Locale locale)
          Returns the message.
 PrioritizedMessage.Priority priority()
          Returns the priority of the message.
 java.lang.String toString()
          Returns a string representation of the message.
 java.lang.String unmappedMessage()
          Returns the message that it is not internationalized.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PrioritizedMessage

public PrioritizedMessage(PrioritizedMessage.Priority priority,
                          java.lang.String message)
Constructs a prioritized message. If the message has the format "a.resource.bundle.base.name#key" it is interpreted as the base name of a ReosurceBundle and the key of an entry in this resource bundle.

Parameters:
priority - the priority of the given message.
message - a message or a resource and key reference.
See Also:
message()

PrioritizedMessage

public PrioritizedMessage(PrioritizedMessage.Priority priority,
                          java.lang.String message,
                          java.lang.Object[] data)
Constructs a prioritized message. If the message has the format "a.resource.bundle.base.name#key" it is interpreted as the base name of a ReosurceBundle and the key of an entry in this resource bundle.

If the parameter data is not null, the message (or the string looked up in the resource bundle) will be fomatted using MessageFormat.format.

Parameters:
priority - the priority of the given message.
message - a message or a resource and key reference.
data - additional data used when formatting the message.
See Also:
message()
Method Detail

priority

public PrioritizedMessage.Priority priority()
Returns the priority of the message.

Returns:
the priority of the message.

message

public java.lang.String message()
Returns the message. If the message has the format "a.resource.bundle.base.name#key", it will be internationalized using the specified resource bundle and the referenced entry with the default Locale.

Returns:
the message.
See Also:
message(Locale)

message

public java.lang.String message(java.util.Locale locale)
Returns the message. If the message has the format "a.resource.bundle.base.name#key", it will be internationalized using the specified resource bundle and the referenced entry using the given Locale.

Parameters:
locale - the Locale to be used for resource bundle lookup.
Returns:
the message.

unmappedMessage

public java.lang.String unmappedMessage()
Returns the message that it is not internationalized.

Returns:
the message.

toString

public java.lang.String toString()
Returns a string representation of the message.

Returns:
a string representation.