View Javadoc
1   /*
2    * Copyright 2008-2016 Brian Thomas Matthews
3    *
4    * Licensed under the Apache License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    *
8    *     http://www.apache.org/licenses/LICENSE-2.0
9    *
10   * Unless required by applicable law or agreed to in writing, software
11   * distributed under the License is distributed on an "AS IS" BASIS,
12   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13   * See the License for the specific language governing permissions and
14   * limitations under the License.
15   */
16  
17  package com.btmatthews.maven.plugins.ldap;
18  
19  import com.btmatthews.utils.monitor.Server;
20  
21  import java.io.File;
22  
23  /**
24   * The interface that must be implemented by LDAP servers.
25   *
26   * @author <a href="mailto:brian@btmatthews.com">Brian Matthews</a>
27   * @since 1.1.1
28   */
29  public interface LDAPServer extends Server {
30  
31      /**
32       * Name of the parameter that specifies the root distinguished name.
33       */
34      String ROOT = "root";
35      /**
36       * Name of the parameter that specifies the object classes used when creating the root distinguished name.
37       */
38      String OBJECT_CLASSES = "objectClasses";
39      /**
40       * The name of the parameter that specifies the identity used to authenticate connections.
41       */
42      String AUTH_DN = "authDn";
43      /**
44       * The name of the parameter that specifies the credentials used for authentication.
45       */
46      String PASSWD = "passwd";
47      /**
48       * The name of the parameter that specifies a working/scratch directory that can be used by the plugin.
49       */
50      String WORK_DIR = "workingDirectory";
51      /**
52       * The name of the parameter that specifies an LDIF file containing seed data.
53       */
54      String LDIF_FILE = "ldifFile";
55      /**
56       * The name of the parameter that specifies the port on which the LDAP service will listen for traffic.
57       */
58      String LDAP_PORT = "ldapPort";
59  
60      /**
61       * Get the configured directory root.
62       *
63       * @return The directory root.
64       */
65      String getRoot();
66  
67      /**
68       * Get the distinguished name of the admin account.
69       *
70       * @return The distinguished name of the admin account.
71       */
72      String getAuthDn();
73  
74      /**
75       * Get the password for the admin account.
76       *
77       * @return The password for the admin account.
78       */
79      String getPasswd();
80  
81      /**
82       * Get the working directory used to create temporary files.
83       *
84       * @return The working directory.
85       */
86      File getWorkingDirectory();
87  
88      /**
89       * Get the LDIF file that contains the data used to seed the directory.
90       *
91       * @return The LDIF file.
92       */
93      File getLdifFile();
94  
95      /**
96       * Get the port on which the LDAP server is listening.
97       *
98       * @return The port.
99       */
100     int getServerPort();
101 }