infoservice.mailsystem.central
Class AbstractMailSystemCommand

java.lang.Object
  extended by infoservice.mailsystem.central.AbstractMailSystemCommand
Direct Known Subclasses:
BanWarningCommand, GetForwarderCommand, HelpCommand

public abstract class AbstractMailSystemCommand
extends java.lang.Object

This interface specifies the methods any JAP mailsystem command has to implement.


Field Summary
private  MailMessages m_localization
          Stores the MailMessages instance used for creating localized versions of the response messages.
 
Constructor Summary
protected AbstractMailSystemCommand(MailMessages a_localization)
          Initializes a new instance of AbstractMailSystemCommand.
 
Method Summary
abstract  void createReplyMessage(javax.mail.internet.MimeMessage a_receivedMessage, javax.mail.internet.MimeMessage a_replyMessage)
          This method shall create the reply message.
protected  MailMessages getLocalization()
          Returns the MailMessages instance with the localization to use when creating response messages.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_localization

private MailMessages m_localization
Stores the MailMessages instance used for creating localized versions of the response messages.

Constructor Detail

AbstractMailSystemCommand

protected AbstractMailSystemCommand(MailMessages a_localization)
Initializes a new instance of AbstractMailSystemCommand.

Parameters:
a_localization - The MailMessages instance with the localization to use when creating the response messages.
Method Detail

createReplyMessage

public abstract void createReplyMessage(javax.mail.internet.MimeMessage a_receivedMessage,
                                        javax.mail.internet.MimeMessage a_replyMessage)
                                 throws java.lang.Exception
This method shall create the reply message. If there is something wrong with the received message (maybe invalid data) or while creating the reply, an Exception can be thrown. The children of the class must implement this method.

Parameters:
a_receivedMessage - The message the JAP mailsystem has received from a user.
a_replyMessage - A pre-initialized message (recipients and subject already set), which shall be filled with the reply.
Throws:
java.lang.Exception

getLocalization

protected MailMessages getLocalization()
Returns the MailMessages instance with the localization to use when creating response messages.

Returns:
The MailMessages instance creating localized versions of the response messages.