1/*2 * Licensed to the Apache Software Foundation (ASF) under one or more3 * contributor license agreements. See the NOTICE file distributed with4 * this work for additional information regarding copyright ownership.5 * The ASF licenses this file to You under the Apache License, Version 2.06 * (the "License"); you may not use this file except in compliance with7 * the License. You may obtain a copy of the License at8 *9 * http://www.apache.org/licenses/LICENSE-2.010 *11 * Unless required by applicable law or agreed to in writing, software12 * 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 and15 * limitations under the License.16 */17packageorg.apache.jetspeed.security.impl;
1819import java.security.Principal;
20import java.util.prefs.Preferences;
2122import org.apache.jetspeed.security.Group;
2324/***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 */28publicclassGroupImpl implements Group
29 {
30/***31 * <p>Default constructor.</p>32 */33publicGroupImpl()
34 {
35 }
3637/***38 * <p>{@link Group} constructor given a group principal and preferences.</p>39 * @param groupPrincipal The group principal.40 * @param preferences The preferences.41 */42publicGroupImpl(Principal groupPrincipal, Preferences preferences)
43 {
44this.groupPrincipal = groupPrincipal;
45this.preferences = preferences;
46 }
4748private Principal groupPrincipal;
4950/***51 * @see org.apache.jetspeed.security.Group#getPrincipal()52 */53public Principal getPrincipal()
54 {
55returnthis.groupPrincipal;
56 }
5758/***59 * @see org.apache.jetspeed.security.Group#setPrincipal(java.security.Principal)60 */61publicvoid setPrincipal(Principal groupPrincipal)
62 {
63this.groupPrincipal = groupPrincipal;
64 }
6566private Preferences preferences;
6768/***69 * @see org.apache.jetspeed.security.Group#getPreferences()70 */71public Preferences getPreferences()
72 {
73returnthis.preferences;
74 }
7576/***77 * @see org.apache.jetspeed.security.Group#setPreferences(java.util.prefs.Preferences)78 */79publicvoid setPreferences(Preferences preferences)
80 {
81this.preferences = preferences;
82 }
8384 }