1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.krad.uif.util;
17
18 import java.util.List;
19 import java.util.Map;
20
21 import org.kuali.rice.core.api.criteria.QueryByCriteria;
22 import org.kuali.rice.core.api.exception.RiceIllegalArgumentException;
23 import org.kuali.rice.core.api.exception.RiceIllegalStateException;
24 import org.kuali.rice.kim.api.common.assignee.Assignee;
25 import org.kuali.rice.kim.api.common.template.Template;
26 import org.kuali.rice.kim.api.common.template.TemplateQueryResults;
27 import org.kuali.rice.kim.api.permission.Permission;
28 import org.kuali.rice.kim.api.permission.PermissionQueryResults;
29 import org.kuali.rice.kim.api.permission.PermissionService;
30
31
32
33
34
35
36
37
38
39
40
41 public class MockPermissionService implements PermissionService {
42
43
44
45
46 @Override
47 public Permission createPermission(Permission permission) throws RiceIllegalArgumentException,
48 RiceIllegalStateException {
49 throw new UnsupportedOperationException();
50 }
51
52
53
54
55 @Override
56 public Permission updatePermission(Permission permission) throws RiceIllegalArgumentException,
57 RiceIllegalStateException {
58 throw new UnsupportedOperationException();
59 }
60
61
62
63
64
65 @Override
66 public boolean hasPermission(String principalId, String namespaceCode, String permissionName)
67 throws RiceIllegalArgumentException {
68 return true;
69 }
70
71
72
73
74
75 @Override
76 public boolean isAuthorized(String principalId, String namespaceCode, String permissionName,
77 Map<String, String> qualification) throws RiceIllegalArgumentException {
78 return true;
79 }
80
81
82
83
84
85 @Override
86 public boolean hasPermissionByTemplate(String principalId, String namespaceCode, String permissionTemplateName,
87 Map<String, String> permissionDetails) throws RiceIllegalArgumentException {
88 return true;
89 }
90
91
92
93
94
95 @Override
96 public boolean isAuthorizedByTemplate(String principalId, String namespaceCode, String permissionTemplateName,
97 Map<String, String> permissionDetails, Map<String, String> qualification)
98 throws RiceIllegalArgumentException {
99 return true;
100 }
101
102
103
104
105
106 @Override
107 public List<Assignee> getPermissionAssignees(String namespaceCode, String permissionName,
108 Map<String, String> qualification) throws RiceIllegalArgumentException {
109 throw new UnsupportedOperationException();
110 }
111
112
113
114
115
116 @Override
117 public List<Assignee> getPermissionAssigneesByTemplate(String namespaceCode, String permissionTemplateName,
118 Map<String, String> permissionDetails, Map<String, String> qualification)
119 throws RiceIllegalArgumentException {
120 throw new UnsupportedOperationException();
121 }
122
123
124
125
126
127 @Override
128 public boolean isPermissionDefined(String namespaceCode, String permissionName) throws RiceIllegalArgumentException {
129 return true;
130 }
131
132
133
134
135
136 @Override
137 public boolean isPermissionDefinedByTemplate(String namespaceCode, String permissionTemplateName,
138 Map<String, String> permissionDetails) throws RiceIllegalArgumentException {
139 return true;
140 }
141
142
143
144
145
146 @Override
147 public List<Permission> getAuthorizedPermissions(String principalId, String namespaceCode, String permissionName,
148 Map<String, String> qualification) throws RiceIllegalArgumentException {
149 throw new UnsupportedOperationException();
150 }
151
152
153
154
155
156 @Override
157 public List<Permission> getAuthorizedPermissionsByTemplate(String principalId, String namespaceCode,
158 String permissionTemplateName, Map<String, String> permissionDetails, Map<String, String> qualification)
159 throws RiceIllegalArgumentException {
160 throw new UnsupportedOperationException();
161 }
162
163
164
165
166 @Override
167 public Permission getPermission(String id) {
168 throw new UnsupportedOperationException();
169 }
170
171
172
173
174
175 @Override
176 public Permission findPermByNamespaceCodeAndName(String namespaceCode, String name)
177 throws RiceIllegalArgumentException {
178 throw new UnsupportedOperationException();
179 }
180
181
182
183
184
185 @Override
186 public List<Permission> findPermissionsByTemplate(String namespaceCode, String templateName)
187 throws RiceIllegalArgumentException {
188 throw new UnsupportedOperationException();
189 }
190
191
192
193
194 @Override
195 public Template getPermissionTemplate(String id) throws RiceIllegalArgumentException {
196 throw new UnsupportedOperationException();
197 }
198
199
200
201
202
203 @Override
204 public Template findPermTemplateByNamespaceCodeAndName(String namespaceCode, String name)
205 throws RiceIllegalArgumentException {
206 throw new UnsupportedOperationException();
207 }
208
209
210
211
212 @Override
213 public List<Template> getAllTemplates() {
214 throw new UnsupportedOperationException();
215 }
216
217
218
219
220
221 @Override
222 public List<String> getRoleIdsForPermission(String namespaceCode, String permissionName)
223 throws RiceIllegalArgumentException {
224 throw new UnsupportedOperationException();
225 }
226
227
228
229
230 @Override
231 public PermissionQueryResults findPermissions(QueryByCriteria queryByCriteria) throws RiceIllegalArgumentException {
232 throw new UnsupportedOperationException();
233 }
234
235
236
237
238 @Override
239 public TemplateQueryResults findPermissionTemplates(QueryByCriteria queryByCriteria)
240 throws RiceIllegalArgumentException {
241 throw new UnsupportedOperationException();
242 }
243
244 }