1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.security.spi;
18
19 import java.util.List;
20
21 import org.apache.jetspeed.security.GroupPrincipal;
22 import org.apache.jetspeed.security.SecurityException;
23
24 /***
25 * <p>
26 * This interface encapsulates the persistence of security groups.
27 * </p>
28 * <p>
29 * This provides a central placeholder for changing the persistence of groups
30 * security information.
31 * </p>
32 * <p>
33 * A security implementation wanting to store group security implementation in
34 * LDAP for instance would need to provide an LDAP implementation of this
35 * interface.
36 * </p>
37 *
38 * @author <a href="mailto:dlestrat@apache.org">David Le Strat </a>
39 */
40 public interface GroupSecurityHandler
41 {
42 /***
43 * <p>
44 * Gets the group principal for the group full path name {principal}.{subprincipal}.
45 * </p>
46 *
47 * @param groupFullPathName The group full path name.
48 * @return The <code>Principal</p>
49 */
50 GroupPrincipal getGroupPrincipal(String groupFullPathName);
51
52 /***
53 * <p>
54 * Sets the group principal in the backing store.
55 * </p>
56 *
57 * @param groupPrincipal The <code>GroupPrincipal</code>.
58 * @throws SecurityException Throws a {@link SecurityException}.
59 */
60 void setGroupPrincipal(GroupPrincipal groupPrincipal) throws SecurityException;
61
62 /***
63 * <p>
64 * Removes the group principal.
65 * </p>
66 *
67 * @param groupPrincipal The <code>GroupPrincipal</code>.
68 * @throws SecurityException Throws a {@link SecurityException}.
69 */
70 void removeGroupPrincipal(GroupPrincipal groupPrincipal) throws SecurityException;
71
72 /***
73 * <p>
74 * Gets the an iterator of group principals for a given filter.
75 * </p>
76 *
77 * @param filter The filter.
78 * @return The list of <code>Principal</code>
79 */
80 List getGroupPrincipals(String filter);
81
82 }