com.ca.commons.jndi
Class ConnectionData

java.lang.Object
  |
  +--com.ca.commons.jndi.ConnectionData

public class ConnectionData
extends java.lang.Object

The ConnectionData inner class is used to pass connection data around. Not all fields are guaranteed to be valid values.


Field Summary
 java.lang.String aliasType
          How aliases should be handled in searches ('always'|'never'|'find'|'search').
 java.lang.String baseDN
          The base to start browsing from, e.g.'
 java.lang.String cacerts
          The file containing the trusted server certificates (no keys).
 char[] caKeystorePwd
          The password to the ca's keystore (may be null for non-client authenticated ssl).
 java.lang.String caKeystoreType
          The type of ca keystore file; e.g.
 java.lang.String clientcerts
          The file containing client certificates and private key(s).
 char[] clientKeystorePwd
          The password to the client's keystore (may be null for non-client authenticated ssl).
 java.lang.String clientKeystoreType
          The type of client keystore file; e.g.
 char[] pwd
          The Manager User's password - (is null if user is not manager).
 java.lang.String referralType
          The jndi ldap referral type: [follow:ignore:throw] (may be null - defaults to 'follow').
 boolean tracing
          Whether to set BER tracing on or not.
 java.lang.String url
          A URL of the form ldap://hostname:portnumber.
 java.lang.String userDN
          The Manager User's distinguished name (optionally null if not used).
 boolean useSSL
          Whether to use SSL (either simple or client-authenticated).
 int version
          The LDAP Version (2 or 3) being used.
 
Constructor Summary
ConnectionData()
          Empty constructor - data fields are intended to be set directly.
 
Method Summary
 void clearPasswords()
          This should be used to clear all the passwords saved in this data object when they have been used and are no longer needed... make sure however that no references to the passwords remain to be used by other parts of the program first :-)!
 java.lang.String getHost()
          Gets the host name from the url string.
 int getPort()
          Gets the port number from the url string.
 void setURL(java.lang.String host, int port)
          Sets the url from the host & port, e.g.
 java.lang.String toString()
          Returns this data object as a string (doesn't include passwords)..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

baseDN

public java.lang.String baseDN
The base to start browsing from, e.g.'o=Democorp,c=au'. (This is often reset to what the directory says the base is in practice).


version

public int version
The LDAP Version (2 or 3) being used.


url

public java.lang.String url
A URL of the form ldap://hostname:portnumber.


userDN

public java.lang.String userDN
The Manager User's distinguished name (optionally null if not used).


pwd

public char[] pwd
The Manager User's password - (is null if user is not manager).


referralType

public java.lang.String referralType
The jndi ldap referral type: [follow:ignore:throw] (may be null - defaults to 'follow').


aliasType

public java.lang.String aliasType
How aliases should be handled in searches ('always'|'never'|'find'|'search').


useSSL

public boolean useSSL
Whether to use SSL (either simple or client-authenticated).


cacerts

public java.lang.String cacerts
The file containing the trusted server certificates (no keys).


clientcerts

public java.lang.String clientcerts
The file containing client certificates and private key(s).


caKeystorePwd

public char[] caKeystorePwd
The password to the ca's keystore (may be null for non-client authenticated ssl).


clientKeystorePwd

public char[] clientKeystorePwd
The password to the client's keystore (may be null for non-client authenticated ssl).


caKeystoreType

public java.lang.String caKeystoreType
The type of ca keystore file; e.g. 'JKS', or 'PKCS12'.


clientKeystoreType

public java.lang.String clientKeystoreType
The type of client keystore file; e.g. 'JKS', or 'PKCS12'.


tracing

public boolean tracing
Whether to set BER tracing on or not. (This is a very verbose dump of all the raw ldap data as it streams past).

Constructor Detail

ConnectionData

public ConnectionData()
Empty constructor - data fields are intended to be set directly.

Method Detail

clearPasswords

public void clearPasswords()
This should be used to clear all the passwords saved in this data object when they have been used and are no longer needed... make sure however that no references to the passwords remain to be used by other parts of the program first :-)!


setURL

public void setURL(java.lang.String host,
                   int port)
Sets the url from the host & port, e.g. "ldap://" + host + ":" + port".

Parameters:
host - the host name to connect to, e.g. echidna or 168.10.5.122.
port - the host port to connect to, e.g. 19389.

getHost

public java.lang.String getHost()
Gets the host name from the url string.

Returns:
the host name for example: DEMOCORP.

getPort

public int getPort()
Gets the port number from the url string.

Returns:
the port number for example: 19389.

toString

public java.lang.String toString()
Returns this data object as a string (doesn't include passwords)..

Overrides:
toString in class java.lang.Object
Returns:
the data object as a string.