01: /*
02: * Copyright 2007 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: *
17: */
18: package edu.sampleu.kim.bo;
19:
20: import java.util.LinkedHashMap;
21: import java.util.List;
22:
23: import org.kuali.core.bo.BusinessObjectBase;
24:
25: public class Role extends BusinessObjectBase {
26:
27: private static final long serialVersionUID = -8535955276605020423L;
28: private Long id;
29: private String name;
30: private String description;
31: private List<User> users;
32: private List<Group> groups;
33: private List<Permission> permissions;
34:
35: public String getDescription() {
36: return description;
37: }
38:
39: public void setDescription(String description) {
40: this .description = description;
41: }
42:
43: public List<Group> getGroups() {
44: return groups;
45: }
46:
47: public void setGroups(List<Group> groups) {
48: this .groups = groups;
49: }
50:
51: public Long getId() {
52: return id;
53: }
54:
55: public void setId(Long id) {
56: this .id = id;
57: }
58:
59: public String getName() {
60: return name;
61: }
62:
63: public void setName(String name) {
64: this .name = name;
65: }
66:
67: public List<Permission> getPermissions() {
68: return permissions;
69: }
70:
71: public void setPermissions(List<Permission> permissions) {
72: this .permissions = permissions;
73: }
74:
75: public List<User> getUsers() {
76: return users;
77: }
78:
79: public void setUsers(List<User> users) {
80: this .users = users;
81: }
82:
83: protected LinkedHashMap toStringMapper() {
84: LinkedHashMap<String, Object> propMap = new LinkedHashMap<String, Object>();
85: propMap.put("id", getId());
86: propMap.put("name", getName());
87: propMap.put("description", getDescription());
88: propMap.put("users", getUsers());
89: propMap.put("groups", getGroups());
90: propMap.put("permissions", getPermissions());
91: return propMap;
92: }
93:
94: public void refresh() {
95: // not going to implement unless necessary
96: }
97:
98: }
|