Coalevo Logo

net.coalevo.messaging.model
Interface InteractiveMessage

All Superinterfaces:
EventInfo, Identifiable, Message
All Known Subinterfaces:
EditableInteractiveMessage

public interface InteractiveMessage
extends Message

Defines the interface for a InteractiveMessage.

Version:
1.0.0 (25/02/2009)
Author:
Dieter Wimberger (wimpi)

Method Summary
 java.util.Iterator<java.util.Map.Entry<java.util.Locale,java.lang.String>> getBodies()
          Returns an iterator over a set of Map.Entry instances, holding the language (=key) the body (=value) of this InteractiveMessage.
 java.lang.String getBody()
          Returns the body of this InteractiveMessage in the default or first available Locale.
 java.lang.String getBody(java.util.Locale l)
          Returns the body of this InteractiveMessage in the given Locale.
 EventInfo getEventInfo()
          Returns an unmodifiable EventInfo instance with the information from this Message.
 java.lang.String getFormattingHint()
          Return a string that indicates a way transform a message.
 java.util.Locale getLocale()
          Returns the default Locale of this Message.
 java.lang.String getSubject()
          Returns the subject of this InteractiveMessage in the default or first available Locale.
 java.lang.String getSubject(java.util.Locale l)
          Returns the subject of this InteractiveMessage in the given Locale.
 java.util.Iterator<java.util.Map.Entry<java.util.Locale,java.lang.String>> getSubjects()
          Returns an iterator over a set of Map.Entry instances, holding the language (=key) the subject (=value) of this InteractiveMessage.
 java.lang.String getThread()
          Returns the thread of this InteractiveMessage.
 InteractiveMessageType getType()
          Returns the type of this InteractiveMessage.
 boolean hasBodies()
          Tests if this InteractiveMessage has bodies in any Locale.
 boolean hasBody()
          Tests if this InteractiveMessage has a body in the default or first available Locale.
 boolean hasBody(java.util.Locale l)
          Tests if this InteractiveMessage has a body in the given Locale.
 boolean hasFormattingHint()
          Tests if this Message has a formatting hint.
 boolean hasLocale()
          Tests if this Message has a Locale.
 boolean hasSubject()
          Tests if this InteractiveMessage has a subject in the default or first available Locale.
 boolean hasSubject(java.util.Locale l)
          Tests if this InteractiveMessage has a subject in the given InteractiveMessage.
 boolean hasSubjects()
          Tests if this InteractiveMessage has subjects in any Locale.
 boolean hasThread()
          Tests if this InteractiveMessage has a thread.
 boolean isBroadcast()
          Tests if this InteractiveMessage is a broadcast.
 boolean isConfirmationRequired()
          Tests if this InteractiveMessage requires confirmation.
 boolean isThread(java.lang.String thread)
          Tests if this InteractiveMessage thread value equals the given value.
 void setType(InteractiveMessageType t)
          Sets the type of this InteractiveMessage.
 
Methods inherited from interface net.coalevo.messaging.model.Message
getFrom, getTo
 
Methods inherited from interface net.coalevo.foundation.model.Identifiable
getIdentifier
 
Methods inherited from interface net.coalevo.messaging.model.EventInfo
getCreated, getIdentifier, isMulticast
 

Method Detail

setType

void setType(InteractiveMessageType t)
Sets the type of this InteractiveMessage.

Parameters:
t - the type as InteractiveMessageType.

getType

InteractiveMessageType getType()
Returns the type of this InteractiveMessage.

Returns:
the type as InteractiveMessageType.

getThread

java.lang.String getThread()
Returns the thread of this InteractiveMessage.

Returns:
the thread of this InteractiveMessage as String.

hasThread

boolean hasThread()
Tests if this InteractiveMessage has a thread.

Returns:
true if this InteractiveMessage has a thread set, false otherwise.

isThread

boolean isThread(java.lang.String thread)
Tests if this InteractiveMessage thread value equals the given value.

Parameters:
thread - a thread identifier value as String.
Returns:
true if thread identifiers are equal, false otherwise.

getSubject

java.lang.String getSubject(java.util.Locale l)
Returns the subject of this InteractiveMessage in the given Locale.

Parameters:
l - a Locale instance.
Returns:
the subject as String.
Throws:
java.util.NoSuchElementException - if a subject for the given Locale does not exist.
See Also:
hasSubject(Locale)

getSubject

java.lang.String getSubject()
Returns the subject of this InteractiveMessage in the default or first available Locale.

Returns:
the subject as String or null if it does not exist.

getSubjects

java.util.Iterator<java.util.Map.Entry<java.util.Locale,java.lang.String>> getSubjects()
Returns an iterator over a set of Map.Entry instances, holding the language (=key) the subject (=value) of this InteractiveMessage.

Returns:
an Iterator over Map.Entry instances.

hasSubject

boolean hasSubject(java.util.Locale l)
Tests if this InteractiveMessage has a subject in the given InteractiveMessage.

Parameters:
l - a Locale instance.
Returns:
true if a subject in the given Locale exists, false otherwise.

hasSubject

boolean hasSubject()
Tests if this InteractiveMessage has a subject in the default or first available Locale.

Returns:
true if a subject in the default or first available Locale exists, false otherwise.

hasSubjects

boolean hasSubjects()
Tests if this InteractiveMessage has subjects in any Locale.

Returns:
true if subjects are available, false otherwise.

getBody

java.lang.String getBody(java.util.Locale l)
Returns the body of this InteractiveMessage in the given Locale.

Parameters:
l - a Locale instance.
Returns:
the body as String.
Throws:
java.util.NoSuchElementException - if a subject for the given Locale does not exist.
See Also:
hasBody(Locale)

getBody

java.lang.String getBody()
Returns the body of this InteractiveMessage in the default or first available Locale.

Returns:
the body as String or null if it does not exist.

getBodies

java.util.Iterator<java.util.Map.Entry<java.util.Locale,java.lang.String>> getBodies()
Returns an iterator over a set of Map.Entry instances, holding the language (=key) the body (=value) of this InteractiveMessage.

Returns:
an Iterator over Map.Entry instances.

hasBody

boolean hasBody(java.util.Locale l)
Tests if this InteractiveMessage has a body in the given Locale.

Parameters:
l - a Locale instance.
Returns:
true if a body in the given Locale exists, false otherwise.

hasBody

boolean hasBody()
Tests if this InteractiveMessage has a body in the default or first available Locale.

Returns:
true if a body in the default or first available Locale exists, false otherwise.

hasBodies

boolean hasBodies()
Tests if this InteractiveMessage has bodies in any Locale.

Returns:
true if bodies are available, false otherwise.

isConfirmationRequired

boolean isConfirmationRequired()
Tests if this InteractiveMessage requires confirmation.

Returns:
true if confirmation is required, false otherwise.

isBroadcast

boolean isBroadcast()
Tests if this InteractiveMessage is a broadcast.

Returns:
true if the message is a broadcast, false otherwise.

getLocale

java.util.Locale getLocale()
Returns the default Locale of this Message.

Returns:
an Locale instance.

hasLocale

boolean hasLocale()
Tests if this Message has a Locale.

Returns:
true if this Message has a Locale false otherwise.

getEventInfo

EventInfo getEventInfo()
Returns an unmodifiable EventInfo instance with the information from this Message.

Returns:
an unmodifiable EventInfo.

getFormattingHint

java.lang.String getFormattingHint()
Return a string that indicates a way transform a message.

Note:
This hint does not imply that the client may be able to format the message using the indicated transform.

Returns:
a string that identifies a message formatting hint.

hasFormattingHint

boolean hasFormattingHint()
Tests if this Message has a formatting hint.

Returns:
true if it has a hint, false otherwise.

Coalevo Logo

(c) 2004-2009 VFI (http://www.vfi.or.at)