01: /*
02: * Copyright 2005-2006 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.core.bo.user;
17:
18: import java.util.List;
19:
20: /**
21: * Group of which all Kuali users are a member.
22: *
23: *
24: */
25: public class KualiUniversalGroup extends KualiGroup {
26: private static final long serialVersionUID = 1859237330240184446L;
27:
28: public static final String UNIVERSAL_GROUP_NAME = "kualiUniversalGroup";
29:
30: /**
31: * Constructs an instance of the universal group
32: */
33: public KualiUniversalGroup() {
34: super (UNIVERSAL_GROUP_NAME);
35: super
36: .setGroupDescription("Universal group (group of which all users are members)");
37: }
38:
39: /**
40: * boolean check to determine if a user is a member of a group
41: *
42: * @param kualiUser
43: * @return true if the given user is not null and has a personSystemId
44: */
45: public boolean hasMember(UniversalUser universalUser) {
46: boolean isMember = false;
47:
48: if (universalUser != null
49: && universalUser.getPersonUniversalIdentifier() != null) {
50: isMember = true;
51: }
52:
53: return isMember;
54: }
55:
56: /* illegal operations */
57: /**
58: * @return list of all kuali users
59: */
60: public List getGroupUsers() {
61: throw new UnsupportedOperationException(
62: "can't generate a list of all KualiUsers");
63: }
64:
65: /**
66: * @param groupUsers
67: */
68: public void setGroupUsers(List groupMembers) {
69: throw new UnsupportedOperationException(
70: "membership in KualiUniversalGroup cannot be directly changed");
71: }
72:
73: /**
74: * @param groupName
75: */
76: public void setGroupName(String groupName) {
77: throw new UnsupportedOperationException(
78: "KualiUniversalGroup name cannot be changed");
79: }
80:
81: /**
82: * @param groupDescription
83: */
84: public void setGroupDescription(String groupDescription) {
85: throw new UnsupportedOperationException(
86: "KualiUniversalGroup description cannot be changed");
87: }
88: }
|