View Javadoc

1   /**
2    * Copyright 2010 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.student.lum.ui.requirements.util;
17  
18  import java.util.HashMap;
19  import java.util.List;
20  import java.util.Map;
21  
22  import org.kuali.student.common.dictionary.dto.ObjectStructureDefinition;
23  import org.kuali.student.common.dto.StatusInfo;
24  import org.kuali.student.common.exceptions.AlreadyExistsException;
25  import org.kuali.student.common.exceptions.CircularReferenceException;
26  import org.kuali.student.common.exceptions.DataValidationErrorException;
27  import org.kuali.student.common.exceptions.DoesNotExistException;
28  import org.kuali.student.common.exceptions.InvalidParameterException;
29  import org.kuali.student.common.exceptions.MissingParameterException;
30  import org.kuali.student.common.exceptions.OperationFailedException;
31  import org.kuali.student.common.exceptions.PermissionDeniedException;
32  import org.kuali.student.common.exceptions.VersionMismatchException;
33  import org.kuali.student.common.search.dto.SearchCriteriaTypeInfo;
34  import org.kuali.student.common.search.dto.SearchRequest;
35  import org.kuali.student.common.search.dto.SearchResult;
36  import org.kuali.student.common.search.dto.SearchResultTypeInfo;
37  import org.kuali.student.common.search.dto.SearchTypeInfo;
38  import org.kuali.student.common.validation.dto.ValidationResultInfo;
39  import org.kuali.student.core.statement.dto.NlUsageTypeInfo;
40  import org.kuali.student.core.statement.dto.RefStatementRelationInfo;
41  import org.kuali.student.core.statement.dto.RefStatementRelationTypeInfo;
42  import org.kuali.student.core.statement.dto.ReqComponentInfo;
43  import org.kuali.student.core.statement.dto.ReqComponentTypeInfo;
44  import org.kuali.student.core.statement.dto.StatementInfo;
45  import org.kuali.student.core.statement.dto.StatementTreeViewInfo;
46  import org.kuali.student.core.statement.dto.StatementTypeInfo;
47  import org.kuali.student.core.statement.service.StatementService;
48  
49  public class StatementServiceMock implements StatementService {
50  
51      private Map<String, Object> map = new HashMap<String, Object>();
52  
53      public void addObject(String key, Object value) {
54          this.map.put(key, value);
55      }
56  
57      public void addAll(Map<String, Object> map) {
58          this.map.putAll(map);
59      }
60  
61      public void clear() {
62          this.map.clear();
63      }
64  
65      @Override
66      public ReqComponentInfo createReqComponent(String reqComponentType, ReqComponentInfo reqComponentInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
67          return null;
68      }
69  
70      @Override
71      public StatementInfo createStatement(String statementType, StatementInfo statementInfo) throws AlreadyExistsException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
72          return null;
73      }
74  
75      @Override
76      public StatusInfo deleteReqComponent(String reqComponentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
77          return null;
78      }
79  
80      @Override
81      public StatusInfo deleteStatement(String statementId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
82          return null;
83      }
84  
85      @Override
86      public String getNaturalLanguageForReqComponent(String reqComponentId, String nlUsageTypeKey, String language) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
87          return null;
88      }
89  
90      @Override
91      public String getNaturalLanguageForStatement(String statementId, String nlUsageTypeKey, String language) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
92          return null;
93      }
94  
95      @Override
96      public NlUsageTypeInfo getNlUsageType(String nlUsageTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
97          return null;
98      }
99  
100     @Override
101     public List<NlUsageTypeInfo> getNlUsageTypes() throws OperationFailedException {
102         return null;
103     }
104 
105     @Override
106     public List<String> getRefObjectSubTypes(String objectTypeKey) throws OperationFailedException {
107         return null;
108     }
109 
110     @Override
111     public List<String> getRefObjectTypes() throws OperationFailedException {
112         return null;
113     }
114 
115     @Override
116     public RefStatementRelationInfo getRefStatementRelation(String refStatementRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
117         return null;
118     }
119 
120     @Override
121     public ReqComponentInfo getReqComponent(String reqComponentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
122         return null;
123     }
124 
125     @Override
126     public List<ReqComponentInfo> getReqComponentsByType(String reqComponentTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
127         return null;
128     }
129 
130     @Override
131     public ReqComponentTypeInfo getReqComponentType(String reqComponentTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
132         return null;
133     }
134 
135     @Override
136     public List<ReqComponentTypeInfo> getReqComponentTypes() throws OperationFailedException {
137         return null;
138     }
139 
140     @Override
141     public List<ReqComponentTypeInfo> getReqComponentTypesForStatementType(String statementTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
142         return null;
143     }
144 
145     @Override
146     public StatementInfo getStatement(String statementId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
147         return null;
148     }
149 
150     @Override
151     public List<StatementInfo> getStatementsByType(String statementTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
152         return null;
153     }
154 
155     @Override
156     public List<StatementInfo> getStatementsUsingReqComponent(String reqComponentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
157         return null;
158     }
159 
160     @Override
161     public StatementTreeViewInfo getStatementTreeView(String statementId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
162         return null;
163     }
164 
165     @Override
166     public StatementTypeInfo getStatementType(String statementTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
167         return null;
168     }
169 
170     @Override
171     public ReqComponentInfo updateReqComponent(String reqComponentId, ReqComponentInfo reqComponentInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
172         return null;
173     }
174 
175     @Override
176     public StatementInfo updateStatement(String statementId, StatementInfo statementInfo) throws CircularReferenceException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
177         return null;
178     }
179 
180     @Override
181     public StatementTreeViewInfo updateStatementTreeView(String statementId, StatementTreeViewInfo statementTreeViewInfo) throws CircularReferenceException, DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
182         return null;
183     }
184 
185     @Override
186     public List<ValidationResultInfo> validateReqComponent(String validationType, ReqComponentInfo reqComponentInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
187         return null;
188     }
189 
190     @Override
191     public List<ValidationResultInfo> validateStatement(String validationType, StatementInfo statementInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
192         return null;
193     }
194 
195     @Override
196     public ObjectStructureDefinition getObjectStructure(String objectTypeKey) {
197         return null;
198     }
199 
200     @Override
201     public List<String> getObjectTypes() {
202         return null;
203     }
204 
205     @Override
206     public SearchCriteriaTypeInfo getSearchCriteriaType(String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
207         return null;
208     }
209 
210     @Override
211     public List<SearchCriteriaTypeInfo> getSearchCriteriaTypes() throws OperationFailedException {
212         return null;
213     }
214 
215     @Override
216     public SearchResultTypeInfo getSearchResultType(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
217         return null;
218     }
219 
220     @Override
221     public List<SearchResultTypeInfo> getSearchResultTypes() throws OperationFailedException {
222         return null;
223     }
224 
225     @Override
226     public SearchTypeInfo getSearchType(String searchTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
227         return null;
228     }
229 
230     @Override
231     public List<SearchTypeInfo> getSearchTypes() throws OperationFailedException {
232         return null;
233     }
234 
235     @Override
236     public List<SearchTypeInfo> getSearchTypesByCriteria(String searchCriteriaTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
237         return null;
238     }
239 
240     @Override
241     public List<SearchTypeInfo> getSearchTypesByResult(String searchResultTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
242         return null;
243     }
244 
245     @Override
246     public SearchResult search(SearchRequest searchRequest) throws MissingParameterException {
247         return null;
248     }
249 
250     @Override
251     public RefStatementRelationInfo createRefStatementRelation(RefStatementRelationInfo refStatementRelationInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
252         return null;
253     }
254 
255 	@Override
256 	public StatusInfo deleteRefStatementRelation(String refStatementRelationId)
257 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
258 		return null;
259 	}
260 
261 	@Override
262 	public String getNaturalLanguageForRefStatementRelation(String refStatementRelationId, String nlUsageTypeKey, String language) 
263 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
264 		return null;
265 	}
266 
267 	@Override
268 	public List<RefStatementRelationInfo> getRefStatementRelationsByRef(String refObjectTypeKey, String refObjectId)
269 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
270 		return null;
271 	}
272 
273 	@Override
274 	public List<RefStatementRelationInfo> getRefStatementRelationsByStatement(String statementId) 
275 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
276 		return null;
277 	}
278 
279 	@Override
280 	public String translateReqComponentToNL(ReqComponentInfo reqComponentInfo, String nlUsageTypeKey, String language)
281 			throws InvalidParameterException, MissingParameterException, OperationFailedException {
282 		return null;
283 	}
284 
285 	@Override
286 	public String translateStatementTreeViewToNL(StatementTreeViewInfo statementTreeViewInfo, String nlUsageTypeKey, String language) 
287 			throws InvalidParameterException, MissingParameterException, OperationFailedException {
288 		return null;
289 	}
290 
291 	@Override
292 	public RefStatementRelationInfo updateRefStatementRelation(String refStatementRelationId, RefStatementRelationInfo refStatementRelationInfo)
293 			throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
294 		return null;
295 	}
296 
297 	@Override
298 	public List<StatementTypeInfo> getStatementTypes()
299 			throws OperationFailedException {
300 		return null;
301 	}
302 
303 	@Override
304 	public List<String> getStatementTypesForStatementType(String statementTypeKey) 
305 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
306 		return null;
307 	}
308 
309 	@Override
310 	public RefStatementRelationTypeInfo getRefStatementRelationType(String refStatementRelationTypeKey) 
311 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
312 		return null;
313 	}
314 
315 	@Override
316 	public List<RefStatementRelationTypeInfo> getRefStatementRelationTypes()
317 			throws OperationFailedException {
318 		return null;
319 	}
320 
321 	@Override
322 	public List<String> getRefStatementRelationTypesForRefObjectSubType(String refSubTypeKey) 
323 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
324 		return null;
325 	}
326 
327 	@Override
328 	public List<String> getStatementTypesForRefStatementRelationType(String refStatementRelationTypeKey) 
329 		throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
330 		return null;
331 	}
332 
333 	@Override
334 	public List<StatementInfo> getStatementsUsingStatement(String statementId)
335 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
336 		return null;
337 	}
338 
339 	@Override
340 	public List<ValidationResultInfo> validateRefStatementRelation(String validationType, RefStatementRelationInfo refStatementRelationInfo)
341 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
342 		return null;
343 	}
344 
345 	public StatementTreeViewInfo getStatementTreeViewForNlUsageType(String statementId, String nlUsageTypeKey, String language)
346 			throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
347 		return null;
348 	}
349 
350 	@Override
351 	public StatementTreeViewInfo createStatementTreeView(
352 			StatementTreeViewInfo statementTreeViewInfo)
353 			throws CircularReferenceException, AlreadyExistsException,
354 			DataValidationErrorException, DoesNotExistException,
355 			InvalidParameterException, MissingParameterException,
356 			OperationFailedException, PermissionDeniedException {
357 		// TODO Auto-generated method stub
358 		return null;
359 	}
360 
361 	@Override
362 	public StatusInfo deleteStatementTreeView(String statementId)
363 			throws DoesNotExistException, InvalidParameterException,
364 			MissingParameterException, OperationFailedException,
365 			PermissionDeniedException {
366 		// TODO Auto-generated method stub
367 		return null;
368 	}
369     
370 
371     //from before the service contract change:
372 
373     // getLuStatement
374     // return (LuStatementInfo) map.get(luStatementId);
375 
376     // getLuStatements
377     /*
378      * List<LuStatementInfo> list = new ArrayList<LuStatementInfo>(); for(String id : luStatementIdList) { LuStatementInfo
379      * stmt = (LuStatementInfo) map.get(id); list.add(stmt); } return list;
380      */
381 
382     // getLuStatementType
383     // return (LuStatementTypeInfo) map.get(luStatementTypeKey);
384     
385     // getReqComponent
386     // return (ReqComponentInfo) map.get(reqComponentId);
387     
388     // getReqComponents
389     /*
390      * List<ReqComponentInfo> list = new ArrayList<ReqComponentInfo>(); for(String id : reqComponentIdList) {
391      * ReqComponentInfo req = (ReqComponentInfo) map.get(id); list.add(req); } return list;
392      */
393 
394 }