2
package org.crosswire.mail.config;
4
import org.crosswire.config.choices.AbstractChoice;
5
import org.crosswire.config.choices.BooleanChoice;
6
import org.crosswire.config.choices.IntegerChoice;
7
import org.crosswire.mail.MailCaptureListener;
10
* A collection of EMail config options for if we ever do an
11
* EMailCaptureListener.
13
* <table border='1' cellPadding='3' cellSpacing='0' width="100%">
14
* <tr><td bgColor='white'class='TableRowColor'><font size='-7'>
15
* Distribution Licence:<br />
16
* Project B is free software; you can redistribute it
17
* and/or modify it under the terms of the GNU General Public License,
18
* version 2 as published by the Free Software Foundation.<br />
19
* This program is distributed in the hope that it will be useful,
20
* but WITHOUT ANY WARRANTY; without even the implied warranty of
21
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22
* General Public License for more details.<br />
23
* The License is available on the internet
24
* <a href='http://www.gnu.org/copyleft/gpl.html'>here</a>, by writing to
25
* <i>Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
26
* MA 02111-1307, USA</i>, Or locally at the Licence link below.<br />
27
* The copyright to this program is held by it's authors.
28
* </font></td></tr></table>
29
* @see <a href='http://www.eireneh.com/servlets/Web'>Project B Home</a>
30
* @see <{docs.Licence}>
33
public class MailCaptureChoices
36
* Do we capture to email?
38
public static class CaptureEMailChoice extends BooleanChoice
40
public boolean getBoolean() { return MailCaptureListener.getHelpDeskListener(); }
41
public void setBoolean(boolean value) { MailCaptureListener.setHelpDeskListener(value); }
42
public String getHelpText() { return "Do we copy exceptions to the E-Mail system."; }
43
public int priority() { return PRIORITY_HIGHEST; }
47
* EMail - the from username
49
public static class EMailDebugChoice extends BooleanChoice
51
public void setBoolean(boolean value) { MailCaptureListener.setMailDebug(value); }
52
public boolean getBoolean() { return MailCaptureListener.getMailDebug(); }
53
public String getHelpText() { return "Do we ask the Mail system to print out debug information."; }
57
* EMail - the from address
59
public static class EMailFromAddrChoice extends AbstractChoice
61
public void setString(String value) { MailCaptureListener.setMailFromAddr(value); }
62
public String getString() { return MailCaptureListener.getMailFromAddr(); }
63
public String getHelpText() { return "The address used to send E-Mail from."; }
67
* EMail - the to address
69
public static class EMailToAddrChoice extends AbstractChoice
71
public void setString(String value) { MailCaptureListener.setMailToAddr(value); }
72
public String getString() { return MailCaptureListener.getMailToAddr(); }
73
public String getHelpText() { return "The address used to send E-Mail to."; }
79
public static class EMailServerChoice extends AbstractChoice
81
public void setString(String value) { MailCaptureListener.setMailServer(value); }
82
public String getString() { return MailCaptureListener.getMailServer(); }
83
public String getHelpText() { return "The mail server DNS name."; }
89
public static class EMailPortChoice extends IntegerChoice
91
public void setInt(int value) { MailCaptureListener.setMailPort(value); }
92
public int getInt() { return MailCaptureListener.getMailPort(); }
93
public String getHelpText() { return "The mail server port number (usually 25)."; }