|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object infoservice.mailsystem.central.CommandFactory
public class CommandFactory
This class finds the correct implementation of the reply-generating class depending on the subject of the received mail.
Field Summary | |
---|---|
private static int |
COMMAND_BANMESSAGE
The command code for the BanWarning command. |
private static int |
COMMAND_GETFORWARDER
The command code of the GetForwarder command. |
private static int |
COMMAND_GETHELP
The command code of the GetHelp command. |
private static int |
DEFAULT_COMMAND
The default command to use, if we could not find a matching command in the subject line of the received mail. |
private static java.util.Locale |
DEFAULT_LANGUAGE
The default language to use, if no language code to use could be found in the subject line of the received mail. |
Constructor Summary | |
---|---|
CommandFactory()
|
Method Summary | |
---|---|
static AbstractMailSystemCommand |
getCommandImplementation(java.lang.String a_mailSubject,
boolean a_banMessage)
This method finds the matching command implementation and reply language depending on the subject line of the received mail. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.Locale DEFAULT_LANGUAGE
private static final int COMMAND_GETHELP
private static final int COMMAND_GETFORWARDER
private static final int COMMAND_BANMESSAGE
private static final int DEFAULT_COMMAND
Constructor Detail |
---|
public CommandFactory()
Method Detail |
---|
public static AbstractMailSystemCommand getCommandImplementation(java.lang.String a_mailSubject, boolean a_banMessage)
a_mailSubject
- The subject line of a received mail.a_banMessage
- If this value is true, the command in the subject line is ignored and the
ban message implementation is returned. Only the preferred language is
tried to obtain from the subject line. If this value is false, the
command and the preferred language is read from the subject line and
the corresponding command implementation is returned.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |