Sun Adapter for e-Mail API

com.stc.connector.emailadapter.appconn
Class EmailSystemProperties

java.lang.Object
  extended by com.stc.connector.emailadapter.appconn.EmailSystemProperties

public final class EmailSystemProperties
extends java.lang.Object

DOCUMENT ME!

Version:
$Revision: 1.3 $
Author:
James D. Tran

Field Summary
protected static java.lang.String DEFAULT_KEYSTORE
          Default keystore property
protected static java.lang.String DEFAULT_KEYSTORE_PASSWORD
          Default keystore password property
protected static java.lang.String DEFAULT_KEYSTORE_TYPE
          Default keystore type property
protected static java.lang.String DEFAULT_TRUSTSTORE
          Default truststore property
protected static java.lang.String DEFAULT_TRUSTSTORE_PASSWORD
          Default truststore password property
protected static java.lang.String DEFAULT_TRUSTSTORE_TYPE
          Default truststore type property
 
Constructor Summary
EmailSystemProperties()
           
 
Method Summary
static java.lang.String getKeyStore()
          Gets the default key store previously set.
static java.lang.String getKeyStorePassword()
          Gets the default key store password previously set.
static java.lang.String getKeyStoreType()
          Gets the default key store type previously set.
static java.lang.String getTrustStore()
          Gets the default trust store previously set.
static java.lang.String getTrustStorePassword()
          Gets the default trust store password previously set.
static java.lang.String getTrustStoreType()
          Gets the default trust store type previously set.
static void setKeyStore(java.lang.String keyStoreFile)
          Sets the default key store file.
static void setKeyStorePassword(java.lang.String keyStorePassword)
          Sets the default key store password.
static void setKeyStoreType(java.lang.String keyStoreType)
          Sets the default key store type.
static void setTrustStore(java.lang.String trustStoreFile)
          Sets the default trust store.
static void setTrustStorePassword(java.lang.String trustStorePassword)
          Sets the default trust store password.
static void setTrustStoreType(java.lang.String trustStoreType)
          Sets the default trust store type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_KEYSTORE

protected static final java.lang.String DEFAULT_KEYSTORE
Default keystore property

See Also:
Constant Field Values

DEFAULT_KEYSTORE_TYPE

protected static final java.lang.String DEFAULT_KEYSTORE_TYPE
Default keystore type property

See Also:
Constant Field Values

DEFAULT_KEYSTORE_PASSWORD

protected static final java.lang.String DEFAULT_KEYSTORE_PASSWORD
Default keystore password property

See Also:
Constant Field Values

DEFAULT_TRUSTSTORE

protected static final java.lang.String DEFAULT_TRUSTSTORE
Default truststore property

See Also:
Constant Field Values

DEFAULT_TRUSTSTORE_TYPE

protected static final java.lang.String DEFAULT_TRUSTSTORE_TYPE
Default truststore type property

See Also:
Constant Field Values

DEFAULT_TRUSTSTORE_PASSWORD

protected static final java.lang.String DEFAULT_TRUSTSTORE_PASSWORD
Default truststore password property

See Also:
Constant Field Values
Constructor Detail

EmailSystemProperties

public EmailSystemProperties()
Method Detail

setKeyStore

public static void setKeyStore(java.lang.String keyStoreFile)
                        throws java.lang.Exception
Sets the default key store file. If the default key store is not specified with this method, then the key store managed by KeyManager is empty.

Parameters:
keyStoreFile - Full path file name specifying the key store. For example, "C:\mykeystores\keystore1". See the keytool utitlity program from SUN for more detail.
Throws:
java.lang.Exception - if unable to set the default key store.

getKeyStore

public static java.lang.String getKeyStore()
Gets the default key store previously set.

Returns:
Full path file name specifying the key store if previously set; otherwise, returns null.

setKeyStoreType

public static void setKeyStoreType(java.lang.String keyStoreType)
                            throws java.lang.Exception
Sets the default key store type. If the default key store type is not set with this method, then the default key store type "jks" is used.

Parameters:
keyStoreType - The key store type. For example, "jks".
Throws:
java.lang.Exception - if unable to set the default key store type.

getKeyStoreType

public static java.lang.String getKeyStoreType()
Gets the default key store type previously set.

Returns:
The key store type that was previously set. Null if not previously set.

setKeyStorePassword

public static void setKeyStorePassword(java.lang.String keyStorePassword)
                                throws java.lang.Exception
Sets the default key store password. If the default key store password is not set with this method, then the default key store password is assumed to be "". See the keytool from SUN for more detail

Parameters:
keyStorePassword - The key store password.
Throws:
java.lang.Exception - if unable to set the default key store password.

getKeyStorePassword

public static java.lang.String getKeyStorePassword()
Gets the default key store password previously set.

Returns:
The key store password that was previously set. Null if not previously set.

setTrustStore

public static void setTrustStore(java.lang.String trustStoreFile)
                          throws java.lang.Exception
Sets the default trust store. If the default trust store is not specified with this method, then a default truststore is searched for. If a truststore named java-home/lib/security/jssecacerts is found, it is used. If not, then a truststore named java-home/lib/security/cacerts is searched for and used (if it exists). Finally, if a truststore is still not found, then the truststore managed by the TrustManager will be a new empty truststore. See the keytool utitlity program from SUN for more detail.

Parameters:
trustStoreFile - Full path file name specifying the trust store.
Throws:
java.lang.Exception - if unable to set the default trust store.

getTrustStore

public static java.lang.String getTrustStore()
Gets the default trust store previously set.

Returns:
Full path file name specifying the trust store if previously set.

setTrustStoreType

public static void setTrustStoreType(java.lang.String trustStoreType)
                              throws java.lang.Exception
Sets the default trust store type.

Parameters:
trustStoreType - The trust store type.
Throws:
java.lang.Exception - if unable to set the default key store type.

getTrustStoreType

public static java.lang.String getTrustStoreType()
Gets the default trust store type previously set.

Returns:
The trust store type that was previously set. Null if not previously set.

setTrustStorePassword

public static void setTrustStorePassword(java.lang.String trustStorePassword)
                                  throws java.lang.Exception
Sets the default trust store password. If the default trust store password is not set with this method, then the default trust store password is assumed to be "". See the keytool from SUN for more detail

Parameters:
trustStorePassword - The trust store password.
Throws:
java.lang.Exception - if unable to set the default trust store password.

getTrustStorePassword

public static java.lang.String getTrustStorePassword()
Gets the default trust store password previously set.

Returns:
The trust store password that was previously set. Null if not previously set.

Sun Adapter for e-Mail API