~sword-devel/jsword/trunk

« back to all changes in this revision

Viewing changes to jsword/java/historic/org/crosswire/mail/config/MailCaptureChoices.java

  • Committer: joe
  • Date: 2002-10-08 21:36:18 UTC
  • Revision ID: svn-v4:a88caf3b-7e0a-0410-8d0d-cecb45342206:trunk:80
big config and comment update

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
 
2
 
package org.crosswire.mail.config;
3
 
 
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;
8
 
 
9
 
/**
10
 
 * A collection of EMail config options for if we ever do an
11
 
 * EMailCaptureListener.
12
 
 *
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}>
31
 
 * @author Joe Walker
32
 
 */
33
 
public class MailCaptureChoices
34
 
{
35
 
    /**
36
 
     * Do we capture to email?
37
 
     */
38
 
    public static class CaptureEMailChoice extends BooleanChoice
39
 
    {
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; }
44
 
    }
45
 
 
46
 
    /**
47
 
     * EMail - the from username
48
 
     */
49
 
    public static class EMailDebugChoice extends BooleanChoice
50
 
    {
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."; }
54
 
    }
55
 
 
56
 
    /**
57
 
     * EMail - the from address
58
 
     */
59
 
    public static class EMailFromAddrChoice extends AbstractChoice
60
 
    {
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."; }
64
 
    }
65
 
 
66
 
    /**
67
 
     * EMail - the to address
68
 
     */
69
 
    public static class EMailToAddrChoice extends AbstractChoice
70
 
    {
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."; }
74
 
    }
75
 
 
76
 
    /**
77
 
     * EMail - the server
78
 
     */
79
 
    public static class EMailServerChoice extends AbstractChoice
80
 
    {
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."; }
84
 
    }
85
 
 
86
 
    /**
87
 
     * EMail - the port
88
 
     */
89
 
    public static class EMailPortChoice extends IntegerChoice
90
 
    {
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)."; }
94
 
    }
95
 
}