1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.security.impl;
18
19 import java.security.Principal;
20 import java.util.prefs.Preferences;
21
22 import org.apache.jetspeed.security.Group;
23
24 /***
25 * <p>A group made of a {@link org.apache.jetspeed.security.GroupPrincipal} and the user {@link Preferences}.</p>
26 * @author <a href="mailto:dlestrat@apache.org">David Le Strat</a>
27 */
28 public class GroupImpl implements Group
29 {
30 /***
31 * <p>Default constructor.</p>
32 */
33 public GroupImpl()
34 {
35 }
36
37 /***
38 * <p>{@link Group} constructor given a group principal and preferences.</p>
39 * @param groupPrincipal The group principal.
40 * @param preferences The preferences.
41 */
42 public GroupImpl(Principal groupPrincipal, Preferences preferences)
43 {
44 this.groupPrincipal = groupPrincipal;
45 this.preferences = preferences;
46 }
47
48 private Principal groupPrincipal;
49
50 /***
51 * @see org.apache.jetspeed.security.Group#getPrincipal()
52 */
53 public Principal getPrincipal()
54 {
55 return this.groupPrincipal;
56 }
57
58 /***
59 * @see org.apache.jetspeed.security.Group#setPrincipal(java.security.Principal)
60 */
61 public void setPrincipal(Principal groupPrincipal)
62 {
63 this.groupPrincipal = groupPrincipal;
64 }
65
66 private Preferences preferences;
67
68 /***
69 * @see org.apache.jetspeed.security.Group#getPreferences()
70 */
71 public Preferences getPreferences()
72 {
73 return this.preferences;
74 }
75
76 /***
77 * @see org.apache.jetspeed.security.Group#setPreferences(java.util.prefs.Preferences)
78 */
79 public void setPreferences(Preferences preferences)
80 {
81 this.preferences = preferences;
82 }
83
84 }