summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/certsrv/ldap/ILdapConnInfo.java
blob: f56bf4d3e0a21cec2f7699cd1e4564f13124274b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
// --- BEGIN COPYRIGHT BLOCK ---
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; version 2 of the License.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License along
// with this program; if not, write to the Free Software Foundation, Inc.,
// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
//
// (C) 2007 Red Hat, Inc.
// All rights reserved.
// --- END COPYRIGHT BLOCK ---
package com.netscape.certsrv.ldap;


import netscape.ldap.*;
import com.netscape.certsrv.base.*;
import com.netscape.certsrv.base.EPropertyNotFound;
import com.netscape.certsrv.ldap.*;


/**
 * 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 {
    public static final String PROP_HOST = "host";
    public static final String PROP_PORT = "port";
    public static final String PROP_SECURE = "secureConn";
    public static final String PROP_PROTOCOL = "version";
    public static final String PROP_FOLLOW_REFERRALS = "followReferrals";
    public static final String PROP_HOST_DEFAULT = "localhost";
    public static final String PROP_PORT_DEFAULT = "389";

    public static final int LDAP_VERSION_2 = 2;
    public static final int LDAP_VERSION_3 = 3;

    /**
     * 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. 
     */
    public void init(IConfigStore config) throws EBaseException, ELdapException;

    /**
     *  Return the name of the Host.
     *
     */

    
    public String getHost();

    /**
     * Return the port number of the host.
     *
     */
    public int getPort();

    /**
     * Return the Ldap version number of the Ldap server.
     */

    public int getVersion();

    /**
     * Return whether or not the connection is secure.
     */
    public boolean getSecure();

    /**
     * Return whether or not the server is to follow referrals
     * to other servers when servicing a query.
     */
    public boolean getFollowReferrals();

}