diff options
Diffstat (limited to 'pki/base/common/src/com/netscape/certsrv/ldap')
8 files changed, 74 insertions, 71 deletions
diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java index ab2d361ba..8c1d2d4a5 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapException.java @@ -17,15 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - import com.netscape.certsrv.base.EBaseException; - /** * A class that represents a Ldap exception. Various * errors can occur when interacting with a Ldap directory server. * <P> - * + * * @version $Revision$, $Date$ */ public class ELdapException extends EBaseException { @@ -37,23 +35,25 @@ public class ELdapException extends EBaseException { /** * Ldap resource class name. */ - private static final String LDAP_RESOURCES = LdapResources.class.getName(); + private static final String LDAP_RESOURCES = LdapResources.class.getName(); /** - * Constructs a Ldap exception. + * Constructs a Ldap exception. + * * @param msgFormat Resource Key, if key not present, serves as the message. - * <P> + * <P> */ public ELdapException(String msgFormat) { super(msgFormat); } /** - * Constructs a Ldap exception. + * Constructs a Ldap exception. + * * @param msgFormat Resource Key, if key not present, serves as the message. - * Include a message string parameter for variable content. + * Include a message string parameter for variable content. * @param param Message string parameter. - * <P> + * <P> */ public ELdapException(String msgFormat, String param) { super(msgFormat, param); @@ -61,19 +61,21 @@ public class ELdapException extends EBaseException { /** * Constructs a Ldap exception. + * * @param msgFormat Resource Key, if key not present, serves as the message. - * @param e Common exception. - * <P> + * @param e Common exception. + * <P> */ public ELdapException(String msgFormat, Exception e) { super(msgFormat, e); } /** - * Constructs a Ldap exception. + * Constructs a Ldap exception. + * * @param msgFormat Resource Key, if key not present, serves as the message. * @param params Array of Message string parameters. - * <P> + * <P> */ public ELdapException(String msgFormat, Object params[]) { super(msgFormat, params); @@ -81,8 +83,9 @@ public class ELdapException extends EBaseException { /** * Gets the resource bundle name + * * @return Name of the Ldap Exception resource bundle name. - * <p> + * <p> */ protected String getBundleName() { return LDAP_RESOURCES; diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java index ead1a0201..f347b1714 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ELdapServerDownException.java @@ -17,10 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - /** * This represents exception which indicates Ldap server is down. - * + * * @version $Revision$, $Date$ */ public class ELdapServerDownException extends ELdapException { @@ -32,6 +31,7 @@ public class ELdapServerDownException extends ELdapException { /** * Constructs a ldap server down exception with host & port info. + * * @param errorString Detailed error message. */ public ELdapServerDownException(String errorString) { diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java index 46082c73a..4325f077c 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapAuthInfo.java @@ -17,11 +17,9 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; - /** * Class for obtaining ldap authentication info from the configuration store. * Two types of authentication is basic and SSL client authentication. @@ -39,28 +37,30 @@ public interface ILdapAuthInfo { static public final String LDAP_BASICAUTH_STR = "BasicAuth"; static public final String LDAP_SSLCLIENTAUTH_STR = "SslClientAuth"; - static public final int LDAP_AUTHTYPE_NONE = 0; // illegal + static public final int LDAP_AUTHTYPE_NONE = 0; // illegal static public final int LDAP_AUTHTYPE_BASICAUTH = 1; static public final int LDAP_AUTHTYPE_SSLCLIENTAUTH = 2; /** * Initialize this class from the config store. + * * @param config The config store from which to initialize. * @exception EBaseException Due to failure of the initialization process. - * + * */ public void init(IConfigStore config) throws EBaseException; /** - * Initialize this class from the config store. + * Initialize this class from the config store. * Based on host, port, and secure boolean info. * which allows an actual attempt on the server to verify credentials. + * * @param config The config store from which to initialize. * @exception EBaseException Due to failure of the initialization process. - * + * */ public void init(IConfigStore config, String host, int port, boolean secure) - throws EBaseException; + throws EBaseException; /** * Reset the connection to the host @@ -68,28 +68,32 @@ public interface ILdapAuthInfo { public void reset(); /** - * Get authentication type. + * Get authentication type. + * * @return one of: <br> - * LdapAuthInfo.LDAP_AUTHTYPE_BASICAUTH or - * LdapAuthInfo.LDAP_AUTHTYPE_SSLCLIENTAUTH + * LdapAuthInfo.LDAP_AUTHTYPE_BASICAUTH or + * LdapAuthInfo.LDAP_AUTHTYPE_SSLCLIENTAUTH */ public int getAuthType(); /** * Get params for authentication. + * * @return array of parameters for this authentication as an array of Strings. */ public String[] getParms(); /** * Add password to private password data structure. + * * @param prompt Password prompt. - * @param pw Password itself. + * @param pw Password itself. */ public void addPassword(String prompt, String pw); /** * Remove password from private password data structure. + * * @param prompt Identify password to remove with prompt. */ public void removePassword(String prompt); diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java index ef3e17424..846f51749 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapBoundConnFactory.java @@ -17,9 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - - - /** * Maintains a pool of connections to the LDAP server. * CMS requests are processed on a multi threaded basis. @@ -28,7 +25,7 @@ package com.netscape.certsrv.ldap; * max size of this connection pool should be configurable. Once * the maximum limit of connections is exceeded, the factory * should provide proper synchronization to resolve contention issues. - * + * * @version $Revision$, $Date$ */ public interface ILdapBoundConnFactory extends ILdapConnFactory { diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java index f706c2ecf..738f5832d 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnFactory.java @@ -17,76 +17,81 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - import netscape.ldap.LDAPConnection; import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; - /** * Maintains a pool of connections to the LDAP server. * Multiple threads use this interface to utilize and release * the Ldap connection resources. - * + * * @version $Revision$, $Date$ */ public interface ILdapConnFactory { - /** + /** * Initialize the poll from the config store. + * * @param config The configuration substore. * @exception EBaseException On configuration error. - * @exception ELdapException On all other errors. + * @exception ELdapException On all other errors. */ - public void init(IConfigStore config) - throws EBaseException, ELdapException; + public void init(IConfigStore config) + throws EBaseException, ELdapException; /** - * - * Used for disconnecting all connections. + * + * Used for disconnecting all connections. * Used just before a subsystem * shutdown or process exit. + * * @exception EldapException on Ldap failure when closing connections. */ - public void reset() - throws ELdapException; + public void reset() + throws ELdapException; /** * Returns the number of free connections available from this pool. - * @return Integer number of free connections. - */ + * + * @return Integer number of free connections. + */ public int freeConn(); /** * Returns the number of total connections available from this pool. * Includes sum of free and in use connections. + * * @return Integer number of total connections. */ public int totalConn(); /** * Returns the maximum number of connections available from this pool. + * * @return Integer maximum number of connections. */ public int maxConn(); - /** - * Request access to a Ldap connection from the pool. - * @exception ELdapException if any error occurs, such as a + /** + * Request access to a Ldap connection from the pool. + * + * @exception ELdapException if any error occurs, such as a * @return Ldap connection object. - * connection is not available + * connection is not available */ - public LDAPConnection getConn() - throws ELdapException; + public LDAPConnection getConn() + throws ELdapException; /** * Return connection to the factory. mandatory after a getConn(). + * * @param conn Ldap connection object to be returned to the free list of the pool. * @exception ELdapException On any failure to return the connection. */ - public void returnConn(LDAPConnection conn) - throws ELdapException; + public void returnConn(LDAPConnection conn) + throws ELdapException; } diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java index 4cffbe458..aa5b388a3 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java @@ -17,15 +17,13 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; - /** * Class for reading ldap connection information from the config store. * Ldap connection info: host name, port number,whether of not it is a secure connection. - * + * * @version $Revision$, $Date$ */ public interface ILdapConnInfo { @@ -42,23 +40,23 @@ public interface ILdapConnInfo { /** * Initializes an instance from a config store. + * * @param config Configuration store. * @exception ELdapException Ldap related error found. - * @exception EBaseException Other errors and errors with params included in the config store. + * @exception EBaseException Other errors and errors with params included in the config store. */ public void init(IConfigStore config) throws EBaseException, ELdapException; /** - * Return the name of the Host. - * + * Return the name of the Host. + * */ - public String getHost(); /** * Return the port number of the host. - * + * */ public int getPort(); diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java index 8d912fc55..efa1c271e 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnModule.java @@ -17,31 +17,30 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - import com.netscape.certsrv.base.EBaseException; import com.netscape.certsrv.base.IConfigStore; import com.netscape.certsrv.base.ISubsystem; - /** * Class on behalf of the Publishing system that controls an instance of an ILdapConnFactory. * Allows a factory to be intialized and grants access * to the factory to other interested parties. - * + * * @version $Revision$, $Date$ */ - + public interface ILdapConnModule { /** * Initialize ldap publishing module with config store. + * * @param owner Entity that is interested in this instance of Publishing. * @param config Config store containing the info needed to set up Publishing. * @exception ELdapException Due to Ldap error. * @exception EBaseException Due to config value errors and all other errors. */ - public void init(ISubsystem owner, IConfigStore config) - throws EBaseException, ELdapException; + public void init(ISubsystem owner, IConfigStore config) + throws EBaseException, ELdapException; /** * Returns the internal ldap connection factory. @@ -52,10 +51,9 @@ public interface ILdapConnModule { * Use ILdapConnFactory.getConn() to get a Ldap connection to the ldap * publishing directory. * Use ILdapConnFactory.returnConn() to return the connection. - * + * * @return Instance of ILdapConnFactory. */ public ILdapConnFactory getLdapConnFactory(); } - diff --git a/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java b/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java index 261497380..332fcaddf 100644 --- a/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java +++ b/pki/base/common/src/com/netscape/certsrv/ldap/LdapResources.java @@ -17,10 +17,8 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.certsrv.ldap; - import java.util.ListResourceBundle; - /** * A resource bundle for ldap subsystem. * @@ -36,7 +34,7 @@ public class LdapResources extends ListResourceBundle { } /** - * Constants. The suffix represents the number of + * Constants. The suffix represents the number of * possible parameters. */ |