1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.bo.impl; |
17 | |
|
18 | |
import java.util.List; |
19 | |
|
20 | |
import javax.persistence.Transient; |
21 | |
|
22 | |
import org.apache.commons.lang.StringUtils; |
23 | |
import org.kuali.rice.kim.bo.Person; |
24 | |
import org.kuali.rice.kim.bo.role.impl.KimPermissionImpl; |
25 | |
import org.kuali.rice.kim.impl.group.GroupBo; |
26 | |
import org.kuali.rice.kim.impl.role.RoleBo; |
27 | |
import org.kuali.rice.kim.util.KimConstants; |
28 | |
import org.springframework.util.AutoPopulatingList; |
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | 0 | public class PermissionImpl extends KimPermissionImpl { |
34 | |
|
35 | |
private static final long serialVersionUID = 1L; |
36 | 0 | @Transient |
37 | |
List<RoleBo> assignedToRoles = new AutoPopulatingList(RoleBo.class); |
38 | |
@Transient |
39 | |
protected String assignedToRoleNamespaceForLookup; |
40 | |
@Transient |
41 | |
protected String assignedToRoleNameForLookup; |
42 | |
@Transient |
43 | |
protected RoleBo assignedToRole; |
44 | |
@Transient |
45 | |
protected String assignedToPrincipalNameForLookup; |
46 | |
@Transient |
47 | |
protected Person assignedToPrincipal; |
48 | |
@Transient |
49 | |
protected String assignedToGroupNamespaceForLookup; |
50 | |
@Transient |
51 | |
protected String assignedToGroupNameForLookup; |
52 | |
@Transient |
53 | |
protected GroupBo assignedToGroup; |
54 | |
@Transient |
55 | |
protected String attributeName; |
56 | |
@Transient |
57 | |
protected String attributeValue; |
58 | |
@Transient |
59 | |
protected String detailCriteria; |
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | |
public String getAssignedToRolesToDisplay() { |
65 | 0 | StringBuffer assignedToRolesToDisplay = new StringBuffer(); |
66 | 0 | for(RoleBo roleImpl: assignedToRoles){ |
67 | 0 | assignedToRolesToDisplay.append(getRoleDetailsToDisplay(roleImpl)); |
68 | |
} |
69 | 0 | return StringUtils.chomp( assignedToRolesToDisplay.toString(), KimConstants.KimUIConstants.COMMA_SEPARATOR); |
70 | |
} |
71 | |
|
72 | |
public String getRoleDetailsToDisplay(RoleBo roleImpl){ |
73 | 0 | return roleImpl.getNamespaceCode().trim()+" "+roleImpl.getName().trim()+KimConstants.KimUIConstants.COMMA_SEPARATOR; |
74 | |
} |
75 | |
|
76 | |
|
77 | |
|
78 | |
|
79 | |
public String getAssignedToGroupNameForLookup() { |
80 | 0 | return this.assignedToGroupNameForLookup; |
81 | |
} |
82 | |
|
83 | |
|
84 | |
|
85 | |
|
86 | |
public void setAssignedToGroupNameForLookup(String assignedToGroupNameForLookup) { |
87 | 0 | this.assignedToGroupNameForLookup = assignedToGroupNameForLookup; |
88 | 0 | } |
89 | |
|
90 | |
|
91 | |
|
92 | |
|
93 | |
public String getAssignedToGroupNamespaceForLookup() { |
94 | 0 | return this.assignedToGroupNamespaceForLookup; |
95 | |
} |
96 | |
|
97 | |
|
98 | |
|
99 | |
|
100 | |
public void setAssignedToGroupNamespaceForLookup( |
101 | |
String assignedToGroupNamespaceForLookup) { |
102 | 0 | this.assignedToGroupNamespaceForLookup = assignedToGroupNamespaceForLookup; |
103 | 0 | } |
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
public String getAssignedToPrincipalNameForLookup() { |
109 | 0 | return this.assignedToPrincipalNameForLookup; |
110 | |
} |
111 | |
|
112 | |
|
113 | |
|
114 | |
|
115 | |
public void setAssignedToPrincipalNameForLookup( |
116 | |
String assignedToPrincipalNameForLookup) { |
117 | 0 | this.assignedToPrincipalNameForLookup = assignedToPrincipalNameForLookup; |
118 | 0 | } |
119 | |
|
120 | |
|
121 | |
|
122 | |
|
123 | |
public String getAssignedToRoleNameForLookup() { |
124 | 0 | return this.assignedToRoleNameForLookup; |
125 | |
} |
126 | |
|
127 | |
|
128 | |
|
129 | |
|
130 | |
public void setAssignedToRoleNameForLookup(String assignedToRoleNameForLookup) { |
131 | 0 | this.assignedToRoleNameForLookup = assignedToRoleNameForLookup; |
132 | 0 | } |
133 | |
|
134 | |
|
135 | |
|
136 | |
|
137 | |
public String getAssignedToRoleNamespaceForLookup() { |
138 | 0 | return this.assignedToRoleNamespaceForLookup; |
139 | |
} |
140 | |
|
141 | |
|
142 | |
|
143 | |
|
144 | |
public void setAssignedToRoleNamespaceForLookup( |
145 | |
String assignedToRoleNamespaceForLookup) { |
146 | 0 | this.assignedToRoleNamespaceForLookup = assignedToRoleNamespaceForLookup; |
147 | 0 | } |
148 | |
|
149 | |
|
150 | |
|
151 | |
|
152 | |
public String getAttributeValue() { |
153 | 0 | return this.attributeValue; |
154 | |
} |
155 | |
|
156 | |
|
157 | |
|
158 | |
|
159 | |
public void setAttributeValue(String attributeValue) { |
160 | 0 | this.attributeValue = attributeValue; |
161 | 0 | } |
162 | |
|
163 | |
|
164 | |
|
165 | |
|
166 | |
public List<RoleBo> getAssignedToRoles() { |
167 | 0 | return this.assignedToRoles; |
168 | |
} |
169 | |
|
170 | |
|
171 | |
|
172 | |
|
173 | |
public void setAssignedToRoles(List<RoleBo> assignedToRoles) { |
174 | 0 | this.assignedToRoles = assignedToRoles; |
175 | 0 | } |
176 | |
|
177 | |
|
178 | |
|
179 | |
|
180 | |
public GroupBo getAssignedToGroup() { |
181 | 0 | return this.assignedToGroup; |
182 | |
} |
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | |
public void setAssignedToGroup(GroupBo assignedToGroup) { |
188 | 0 | this.assignedToGroup = assignedToGroup; |
189 | 0 | } |
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
public Person getAssignedToPrincipal() { |
195 | 0 | return this.assignedToPrincipal; |
196 | |
} |
197 | |
|
198 | |
|
199 | |
|
200 | |
|
201 | |
public void setAssignedToPrincipal(Person assignedToPrincipal) { |
202 | 0 | this.assignedToPrincipal = assignedToPrincipal; |
203 | 0 | } |
204 | |
|
205 | |
|
206 | |
|
207 | |
|
208 | |
public RoleBo getAssignedToRole() { |
209 | 0 | return this.assignedToRole; |
210 | |
} |
211 | |
|
212 | |
|
213 | |
|
214 | |
|
215 | |
public void setAssignedToRole(RoleBo assignedToRole) { |
216 | 0 | this.assignedToRole = assignedToRole; |
217 | 0 | } |
218 | |
|
219 | |
public String getDetailCriteria() { |
220 | 0 | return this.detailCriteria; |
221 | |
} |
222 | |
|
223 | |
public void setDetailCriteria(String detailCriteria) { |
224 | 0 | this.detailCriteria = detailCriteria; |
225 | 0 | } |
226 | |
|
227 | |
|
228 | |
|
229 | |
|
230 | |
public String getAttributeName() { |
231 | 0 | return this.attributeName; |
232 | |
} |
233 | |
|
234 | |
|
235 | |
|
236 | |
|
237 | |
public void setAttributeName(String attributeName) { |
238 | 0 | this.attributeName = attributeName; |
239 | 0 | } |
240 | |
|
241 | |
} |