de.hagenah.diplomacy.game
Class JudgeEmailMessage

java.lang.Object
  extended by de.hagenah.diplomacy.game.JudgeEmailMessage

public class JudgeEmailMessage
extends java.lang.Object

An e-mail message from a judge.


Field Summary
static int TYPE_GAME
          A game message
static int TYPE_OTHER
          An other message
static int TYPE_PRESS
          A press message
static int TYPE_RESULT
          A result message
 
Constructor Summary
JudgeEmailMessage(javax.mail.Message msg, java.util.Collection judges)
          Constructor for EmailInfo.
 
Method Summary
 java.lang.String getBody()
          Returns the body of the message
 java.lang.String getDate()
          Returns the date of the message
 java.lang.String getError()
          Returns the error message or null
 java.lang.String getGame()
          Returns the game (null if Type if TYPE_OTHER)
 Judge getJudge()
          Returns the judge (can be null if there is an error)
 java.lang.String getSender()
          Returns the sender of the message
 java.lang.String getSubject()
          Returns the subject of the message
 int getType()
          Returns the type of the message (TYPE_...)
 java.lang.String toString()
          Returns a text that can be parsed by the JudgeParser class and contains all the information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE_RESULT

public static final int TYPE_RESULT
A result message

See Also:
Constant Field Values

TYPE_PRESS

public static final int TYPE_PRESS
A press message

See Also:
Constant Field Values

TYPE_GAME

public static final int TYPE_GAME
A game message

See Also:
Constant Field Values

TYPE_OTHER

public static final int TYPE_OTHER
An other message

See Also:
Constant Field Values
Constructor Detail

JudgeEmailMessage

public JudgeEmailMessage(javax.mail.Message msg,
                         java.util.Collection judges)
Constructor for EmailInfo.

Method Detail

getType

public int getType()
Returns the type of the message (TYPE_...)


getError

public java.lang.String getError()
Returns the error message or null


getSender

public java.lang.String getSender()
Returns the sender of the message


getSubject

public java.lang.String getSubject()
Returns the subject of the message


getDate

public java.lang.String getDate()
Returns the date of the message


getBody

public java.lang.String getBody()
Returns the body of the message


getJudge

public Judge getJudge()
Returns the judge (can be null if there is an error)


getGame

public java.lang.String getGame()
Returns the game (null if Type if TYPE_OTHER)


toString

public java.lang.String toString()
Returns a text that can be parsed by the JudgeParser class and contains all the information.

Overrides:
toString in class java.lang.Object