01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * http://www.apache.org/licenses/LICENSE-2.0
10: *
11: * Unless required by applicable law or agreed to in writing, software
12: * distributed under the License is distributed on an "AS IS" BASIS,
13: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14: * See the License for the specific language governing permissions and
15: * limitations under the License.
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: * <p>
34: * Makes a new ldap entry for the specified principal.
35: * </p>
36: *
37: * @param principalUid The principal uid.
38: * @throws SecurityException Throws a {@link SecurityException}.
39: */
40: abstract void create(final String principalUid)
41: 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)
52: throws SecurityException;
53:
54: /**
55: * <p>
56: * Search the ldap directory for the principal.
57: * </p>
58: *
59: * @param principalUid The uid value of the principal.
60: * @param principalType The type of principal.
61: * @return All the objects of this LDAP class type.
62: */
63: Principal[] find(final String principalUid, String principalType)
64: throws SecurityException;
65:
66: /**
67: * <p>
68: * Converts the uid to an ldap acceptable name.
69: * </p>
70: *
71: * @param uid The uid.
72: * @return The converted name.
73: */
74: String convertUidToLdapAcceptableName(String uid);
75: }
|