1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.security.spi.impl.ldap;
18
19 import java.security.Principal;
20
21 import org.apache.jetspeed.security.SecurityException;
22
23 /***
24 * <p>
25 * Generic DAO interface for LDAP principals.
26 * </p>
27 *
28 * @author <a href="mailto:mike.long@dataline.com">Mike Long </a>, <a
29 * href="mailto:dlestrat@apache.org">David Le Strat</a>
30 */
31 public interface LdapPrincipalDao extends LdapReadOnlyPrincipalDao
32 {
33 /***
34 * <p>
35 * Makes a new ldap entry for the specified principal.
36 * </p>
37 *
38 * @param principalUid The principal uid.
39 * @throws SecurityException Throws a {@link SecurityException}.
40 */
41 abstract void create(final String principalUid) throws SecurityException;
42
43 /***
44 * <p>
45 * Deletes a ldap entry for the specified principal.
46 * </p>
47 *
48 * @param principalUid The principal uid.
49 * @throws SecurityException Throws a {@link SecurityException}.
50 */
51 abstract void delete(final String principalUid) throws SecurityException;
52
53 /***
54 * <p>
55 * Search the ldap directory for the principal.
56 * </p>
57 *
58 * @param principalUid The uid value of the principal.
59 * @param principalType The type of principal.
60 * @return All the objects of this LDAP class type.
61 */
62 Principal[] find(final String principalUid, String principalType) throws SecurityException;
63
64 /***
65 * <p>
66 * Converts the uid to an ldap acceptable name.
67 * </p>
68 *
69 * @param uid The uid.
70 * @return The converted name.
71 */
72 String convertUidToLdapAcceptableName(String uid);
73 }