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