* <H3>Properties</H3>
* <DL>
* <DT> -.port <DD>Service port number. (Default:8725)
+ * <DT> -.ssl <DD>Service port use SSL. (Default:false) //Not use yet.
* <DT> -.enableRemoteConnect <DD>Permit connect from remote host. (Default:false)
* <DT> -.serverHost <DD>STMP Server host name. (Default:mail)
* <DT> -.serverPort <DD>STMP Server port. (Default:25)
+ * <DT> -.serverSSL <DD>SMTP Server port use SSL. (Default:false)
* <DT> -.confirm.timeout <DD> Confirm auto push OK timeput (Default:0 = forever)
* <DT> -.ladp <DD>If "true" use LDAP search. (Default:false)
* <DT> -.ldap.providerUrl <DD>LDAP Provider URL (Default:ldap://localhost:389
public class ApplicationProperties {
private static final String PREFIX = "org.jent.checksmtp";
private static final String SMTP_PORT = PREFIX + ".port";
+ private static final String SMTP_SSL = PREFIX + ".SSL";
private static final String SMTP_ENEBLE_REMOTE_CONNECT = PREFIX + ".enableRemoteConnect";
private static final String SMTP_SERVER_HOST = PREFIX + ".serverHost";
private static final String SMTP_SERVER_PORT = PREFIX + ".serverPort";
+ private static final String SMTP_SERVER_SSL = PREFIX + ".serverSSL";
private static final String CONFIRM_TIMEOUT = PREFIX + ".confirmTimeout";
private static final String LDAP_PREFIX = PREFIX + ".ldap";
private static final String LDAP_PROVIDER_URL = LDAP_PREFIX + ".providerUrl";
public static int getSmtpServerPort() {
return Integer.parseInt(applicationProperties.getProperty(SMTP_SERVER_PORT, "25"));
}
-
+
public static void setSmtpServerPort(int port) {
applicationProperties.setProperty(SMTP_SERVER_PORT, new Integer(port).toString());
}
+
+ public static boolean getSmtpServerSSL() {
+ //getProperty(str) default value is null. valueOf(null) retrun FALSE.
+ return Boolean.valueOf(applicationProperties.getProperty(SMTP_SERVER_SSL)).booleanValue();
+ }
+
+ public static void setSmtpServerSSL(boolean ssl) {
+ applicationProperties.setProperty(SMTP_SERVER_SSL, Boolean.toString(ssl));
+ }
public static int getSmtpPort() {
return Integer.parseInt(applicationProperties.getProperty(SMTP_PORT, "8725"));
public static void setSmtpPort(int port) {
applicationProperties.setProperty(SMTP_PORT, new Integer(port).toString());
}
-
+
+ public static boolean getSmtpSSL() {
+ return Boolean.valueOf(applicationProperties.getProperty(SMTP_SSL)).booleanValue();
+ }
+
+ public static void setSmtpSSL(boolean ssl) {
+ applicationProperties.setProperty(SMTP_SSL, Boolean.toString(ssl));
+ }
+
public static boolean getSmtpEnebleRemoteConnect() {
String str = applicationProperties.getProperty(SMTP_ENEBLE_REMOTE_CONNECT);
- return new Boolean(str).booleanValue();
+ return Boolean.valueOf(str).booleanValue();
}
public static void setSmtpEnableRemoteConnect(boolean obj) {
}
public static boolean getLdapIsSjis() {
- return new Boolean(applicationProperties.getProperty(LDAP_IS_SJIS)).booleanValue();
+ return Boolean.valueOf(applicationProperties.getProperty(LDAP_IS_SJIS)).booleanValue();
}
public static void setLdapIsSjis(boolean obj) {
public static boolean getLdap() {
String str = applicationProperties.getProperty(LDAP_PREFIX);
- Boolean flg = new Boolean(str);
+ //the value true if the string is ignoring case "true".
+ Boolean flg = Boolean.valueOf(str);
return flg.booleanValue();
}