%line | %branch | |||||||||
---|---|---|---|---|---|---|---|---|---|---|
org.apache.jetspeed.security.impl.GroupImpl |
|
|
1 | /* |
|
2 | * Licensed to the Apache Software Foundation (ASF) under one or more |
|
3 | * contributor license agreements. See the NOTICE file distributed with |
|
4 | * this work for additional information regarding copyright ownership. |
|
5 | * The ASF licenses this file to You under the Apache License, Version 2.0 |
|
6 | * (the "License"); you may not use this file except in compliance with |
|
7 | * the License. You may obtain a copy of the License at |
|
8 | * |
|
9 | * 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.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 | 0 | { |
35 | 0 | } |
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 | 0 | { |
44 | 0 | this.groupPrincipal = groupPrincipal; |
45 | 0 | this.preferences = preferences; |
46 | 0 | } |
47 | ||
48 | private Principal groupPrincipal; |
|
49 | ||
50 | /** |
|
51 | * @see org.apache.jetspeed.security.Group#getPrincipal() |
|
52 | */ |
|
53 | public Principal getPrincipal() |
|
54 | { |
|
55 | 0 | 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 | 0 | this.groupPrincipal = groupPrincipal; |
64 | 0 | } |
65 | ||
66 | private Preferences preferences; |
|
67 | ||
68 | /** |
|
69 | * @see org.apache.jetspeed.security.Group#getPreferences() |
|
70 | */ |
|
71 | public Preferences getPreferences() |
|
72 | { |
|
73 | 0 | 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 | 0 | this.preferences = preferences; |
82 | 0 | } |
83 | ||
84 | } |
This report is generated by jcoverage, Maven and Maven JCoverage Plugin. |