1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
package org.kuali.student.common.ui.server.gwt; |
17 |
|
|
18 |
|
import java.util.List; |
19 |
|
|
20 |
|
import org.apache.log4j.Logger; |
21 |
|
import org.kuali.rice.kim.service.IdentityManagementService; |
22 |
|
import org.kuali.student.common.dictionary.old.dto.ObjectStructure; |
23 |
|
import org.kuali.student.common.dictionary.service.old.DictionaryService; |
24 |
|
import org.kuali.student.common.exceptions.DoesNotExistException; |
25 |
|
import org.kuali.student.common.exceptions.InvalidParameterException; |
26 |
|
import org.kuali.student.common.exceptions.MissingParameterException; |
27 |
|
import org.kuali.student.common.exceptions.OperationFailedException; |
28 |
|
import org.kuali.student.common.search.dto.SearchCriteriaTypeInfo; |
29 |
|
import org.kuali.student.common.search.dto.SearchRequest; |
30 |
|
import org.kuali.student.common.search.dto.SearchResult; |
31 |
|
import org.kuali.student.common.search.dto.SearchResultTypeInfo; |
32 |
|
import org.kuali.student.common.search.dto.SearchTypeInfo; |
33 |
|
import org.kuali.student.common.search.service.SearchService; |
34 |
|
import org.kuali.student.common.ui.client.service.BaseRpcService; |
35 |
|
import org.kuali.student.common.util.security.SecurityUtils; |
36 |
|
|
37 |
|
import com.google.gwt.user.server.rpc.RemoteServiceServlet; |
38 |
|
|
39 |
|
|
40 |
|
|
41 |
|
|
42 |
|
|
43 |
|
|
44 |
|
@author |
45 |
|
|
46 |
|
|
|
|
| 0% |
Uncovered Elements: 76 (76) |
Complexity: 39 |
Complexity Density: 0.67 |
|
47 |
|
public abstract class BaseRpcGwtServletAbstract<SEI> extends RemoteServiceServlet implements BaseRpcService{ |
48 |
|
final Logger LOG = Logger.getLogger(BaseRpcGwtServletAbstract.class); |
49 |
|
private static final long serialVersionUID = 1L; |
50 |
|
|
51 |
|
protected SEI service; |
52 |
|
protected IdentityManagementService permissionService; |
53 |
|
|
54 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
55 |
0
|
public SEI getService(){... |
56 |
0
|
return this.service; |
57 |
|
} |
58 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
59 |
0
|
public void setService(SEI service) {... |
60 |
0
|
this.service = service; |
61 |
|
}; |
62 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
63 |
0
|
public IdentityManagementService getPermissionService() {... |
64 |
0
|
return permissionService; |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
67 |
0
|
public void setPermissionService(IdentityManagementService permissionService) {... |
68 |
0
|
this.permissionService = permissionService; |
69 |
|
} |
70 |
|
|
71 |
|
|
72 |
|
@see |
73 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
74 |
0
|
@Override... |
75 |
|
public ObjectStructure getObjectStructure(String objectTypeKey) { |
76 |
0
|
return ((DictionaryService)getService()).getObjectStructure(objectTypeKey); |
77 |
|
} |
78 |
|
|
79 |
|
|
80 |
|
@see |
81 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
82 |
0
|
@Override... |
83 |
|
public List<String> getObjectTypes() { |
84 |
0
|
return ((DictionaryService)getService()).getObjectTypes(); |
85 |
|
} |
86 |
|
|
87 |
|
|
88 |
|
@see |
89 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 5 |
Complexity Density: 0.71 |
|
90 |
0
|
@Override... |
91 |
|
public SearchCriteriaTypeInfo getSearchCriteriaType(String searchCriteriaTypeKey){ |
92 |
0
|
try { |
93 |
0
|
return ((SearchService)getService()).getSearchCriteriaType(searchCriteriaTypeKey); |
94 |
|
} catch (DoesNotExistException e) { |
95 |
0
|
LOG.error(e); |
96 |
|
} catch (InvalidParameterException e) { |
97 |
0
|
LOG.error(e); |
98 |
|
} catch (MissingParameterException e) { |
99 |
0
|
LOG.error(e); |
100 |
|
} catch (OperationFailedException e) { |
101 |
0
|
LOG.error(e); |
102 |
|
} |
103 |
|
|
104 |
0
|
return null; |
105 |
|
} |
106 |
|
|
107 |
|
|
108 |
|
@throws |
109 |
|
@see |
110 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
111 |
0
|
@Override... |
112 |
|
public List<SearchCriteriaTypeInfo> getSearchCriteriaTypes(){ |
113 |
0
|
try { |
114 |
0
|
return ((SearchService)getService()).getSearchCriteriaTypes(); |
115 |
|
} catch (OperationFailedException e) { |
116 |
0
|
LOG.error(e); |
117 |
|
} |
118 |
0
|
return null; |
119 |
|
} |
120 |
|
|
121 |
|
|
122 |
|
@see |
123 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 5 |
Complexity Density: 0.71 |
|
124 |
0
|
@Override... |
125 |
|
public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey){ |
126 |
0
|
try { |
127 |
0
|
return ((SearchService)getService()).getSearchResultType(searchResultTypeKey); |
128 |
|
} catch (DoesNotExistException e) { |
129 |
0
|
LOG.error(e); |
130 |
|
} catch (InvalidParameterException e) { |
131 |
0
|
LOG.error(e); |
132 |
|
} catch (MissingParameterException e) { |
133 |
0
|
LOG.error(e); |
134 |
|
} catch (OperationFailedException e) { |
135 |
0
|
LOG.error(e); |
136 |
|
} |
137 |
0
|
return null; |
138 |
|
} |
139 |
|
|
140 |
|
|
141 |
|
@see |
142 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
143 |
0
|
@Override... |
144 |
|
public List<SearchResultTypeInfo> getSearchResultTypes(){ |
145 |
0
|
try { |
146 |
0
|
return ((SearchService)getService()).getSearchResultTypes(); |
147 |
|
} catch (OperationFailedException e) { |
148 |
0
|
LOG.error(e); |
149 |
|
} |
150 |
0
|
return null; |
151 |
|
} |
152 |
|
|
153 |
|
|
154 |
|
@see |
155 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 5 |
Complexity Density: 0.71 |
|
156 |
0
|
@Override... |
157 |
|
public SearchTypeInfo getSearchType(String searchTypeKey){ |
158 |
0
|
try { |
159 |
0
|
return ((SearchService)getService()).getSearchType(searchTypeKey); |
160 |
|
} catch (DoesNotExistException e) { |
161 |
0
|
LOG.error(e); |
162 |
|
} catch (InvalidParameterException e) { |
163 |
0
|
LOG.error(e); |
164 |
|
} catch (MissingParameterException e) { |
165 |
0
|
LOG.error(e); |
166 |
|
} catch (OperationFailedException e) { |
167 |
0
|
LOG.error(e); |
168 |
|
} |
169 |
0
|
return null; |
170 |
|
} |
171 |
|
|
172 |
|
|
173 |
|
@see |
174 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
175 |
0
|
@Override... |
176 |
|
public List<SearchTypeInfo> getSearchTypes(){ |
177 |
0
|
try { |
178 |
0
|
return ((SearchService)getService()).getSearchTypes(); |
179 |
|
} catch (OperationFailedException e) { |
180 |
0
|
LOG.error(e); |
181 |
|
} |
182 |
0
|
return null; |
183 |
|
} |
184 |
|
|
185 |
|
|
186 |
|
@see |
187 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
188 |
0
|
@Override... |
189 |
|
public List<SearchTypeInfo> getSearchTypesByCriteria(String searchCriteriaTypeKey){ |
190 |
0
|
try { |
191 |
0
|
return ((SearchService)getService()).getSearchTypes(); |
192 |
|
} catch (OperationFailedException e) { |
193 |
0
|
LOG.error(e); |
194 |
|
} |
195 |
0
|
return null; |
196 |
|
} |
197 |
|
|
198 |
|
|
199 |
|
@see |
200 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 5 |
Complexity Density: 0.71 |
|
201 |
0
|
@Override... |
202 |
|
public List<SearchTypeInfo> getSearchTypesByResult(String searchResultTypeKey){ |
203 |
0
|
try { |
204 |
0
|
return ((SearchService)getService()).getSearchTypesByResult(searchResultTypeKey); |
205 |
|
} catch (DoesNotExistException e) { |
206 |
0
|
LOG.error(e); |
207 |
|
} catch (InvalidParameterException e) { |
208 |
0
|
LOG.error(e); |
209 |
|
} catch (MissingParameterException e) { |
210 |
0
|
LOG.error(e); |
211 |
|
} catch (OperationFailedException e) { |
212 |
0
|
LOG.error(e); |
213 |
|
} |
214 |
0
|
return null; |
215 |
|
} |
216 |
|
|
217 |
|
|
218 |
|
@see |
219 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
220 |
0
|
@Override... |
221 |
|
public SearchResult search(SearchRequest searchRequest) { |
222 |
0
|
try { |
223 |
0
|
return ((SearchService)getService()).search(searchRequest); |
224 |
|
} catch (MissingParameterException e) { |
225 |
0
|
LOG.error(e); |
226 |
|
} |
227 |
0
|
return null; |
228 |
|
} |
229 |
|
|
|
|
| 0% |
Uncovered Elements: 6 (6) |
Complexity: 3 |
Complexity Density: 0.75 |
|
230 |
0
|
protected String getCurrentUser() {... |
231 |
0
|
String username = SecurityUtils.getCurrentUserId(); |
232 |
|
|
233 |
0
|
if(username==null&&this.getThreadLocalRequest().getSession().getAttribute("backdoorId")!=null){ |
234 |
0
|
username=(String)this.getThreadLocalRequest().getSession().getAttribute("backdoorId"); |
235 |
|
} |
236 |
0
|
return username; |
237 |
|
} |
238 |
|
} |