View Javadoc

1   /*
2    * To change this template, choose Tools | Templates
3    * and open the template in the editor.
4    */
5   package org.kuali.student.enrollment.class2.courseoffering.service.impl;
6   
7   import java.util.*;
8   
9   import org.kuali.rice.core.api.criteria.EqualPredicate;
10  
11  import org.kuali.rice.core.api.criteria.QueryByCriteria;
12  import org.kuali.student.common.mock.MockService;
13  import org.kuali.student.enrollment.acal.dto.AcademicCalendarInfo;
14  import org.kuali.student.enrollment.acal.dto.AcalEventInfo;
15  import org.kuali.student.enrollment.acal.dto.HolidayCalendarInfo;
16  import org.kuali.student.enrollment.acal.dto.HolidayInfo;
17  import org.kuali.student.enrollment.acal.dto.KeyDateInfo;
18  import org.kuali.student.enrollment.acal.dto.TermInfo;
19  import org.kuali.student.enrollment.acal.service.AcademicCalendarService;
20  import org.kuali.student.r2.common.dto.ContextInfo;
21  import org.kuali.student.r2.common.dto.StatusInfo;
22  import org.kuali.student.r2.common.dto.ValidationResultInfo;
23  import org.kuali.student.r2.common.exceptions.AlreadyExistsException;
24  import org.kuali.student.r2.common.exceptions.DataValidationErrorException;
25  import org.kuali.student.r2.common.exceptions.DoesNotExistException;
26  import org.kuali.student.r2.common.exceptions.InvalidParameterException;
27  import org.kuali.student.r2.common.exceptions.MissingParameterException;
28  import org.kuali.student.r2.common.exceptions.OperationFailedException;
29  import org.kuali.student.r2.common.exceptions.PermissionDeniedException;
30  import org.kuali.student.r2.common.exceptions.ReadOnlyException;
31  import org.kuali.student.r2.common.exceptions.VersionMismatchException;
32  import org.kuali.student.r2.core.class1.state.dto.StateInfo;
33  import org.kuali.student.r2.core.class1.type.dto.TypeInfo;
34  
35  /**
36   *
37   * @author nwright
38   */
39  public class AcademicCalendarServiceMockImpl implements AcademicCalendarService, MockService {
40  
41      private Map<String, AcademicCalendarInfo> acals = new LinkedHashMap<String, AcademicCalendarInfo>();
42      private Map<String, TermInfo> terms = new LinkedHashMap<String, TermInfo>();
43      private Map<String, String> term2cal = new LinkedHashMap<String, String>();
44      private Map<String, String> subterm2term = new LinkedHashMap<String, String>();
45  
46      
47      @Override
48  	public void clear() {
49      	
50      	this.acals.clear();
51      	this.terms.clear();
52      	this.term2cal.clear();
53      	this.subterm2term.clear();
54      	
55  		
56  	}
57  
58  	@Override
59      public StatusInfo addTermToAcademicCalendar(String academicCalendarId, String termId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
60          // note only allows term to be in one acal 
61          this.term2cal.put(termId, academicCalendarId);
62          StatusInfo status = new StatusInfo();
63          status.setSuccess(Boolean.TRUE);
64          return status;
65      }
66  
67      @Override
68      public StatusInfo addTermToTerm(String termId, String includedTermId, ContextInfo contextInfo) throws AlreadyExistsException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
69          this.subterm2term.put(includedTermId, termId);
70          StatusInfo status = new StatusInfo();
71          status.setSuccess(Boolean.TRUE);
72          return status;
73      }
74  
75      @Override
76      public AcalEventInfo calculateAcalEvent(String acalEventId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
77          throw new UnsupportedOperationException("Not supported yet.");
78      }
79  
80      @Override
81      public HolidayInfo calculateHoliday(String holidayId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
82          throw new UnsupportedOperationException("Not supported yet.");
83      }
84  
85      @Override
86      public KeyDateInfo calculateKeyDate(String keyDateId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
87          throw new UnsupportedOperationException("Not supported yet.");
88      }
89  
90      @Override
91      public AcademicCalendarInfo copyAcademicCalendar(String academicCalendarId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
92          throw new UnsupportedOperationException("Not supported yet.");
93      }
94  
95      @Override
96      public HolidayCalendarInfo copyHolidayCalendar(String holidayCalendarId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
97          throw new UnsupportedOperationException("Not supported yet.");
98      }
99  
100     @Override
101     public AcademicCalendarInfo createAcademicCalendar(String academicCalendarTypeKey, AcademicCalendarInfo academicCalendarInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
102         AcademicCalendarInfo copy = new AcademicCalendarInfo(academicCalendarInfo);
103         if (copy.getId() == null) {
104             copy.setId(acals.size() + "");
105         }
106         this.acals.put(copy.getId(), copy);
107         return new AcademicCalendarInfo(copy);
108     }
109 
110     @Override
111     public AcalEventInfo createAcalEvent(String academicCalendarId, String acalEventTypeKey, AcalEventInfo acalEventInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
112         throw new UnsupportedOperationException("Not supported yet.");
113     }
114 
115     @Override
116     public HolidayInfo createHoliday(String holidayCalendarId, String holidayTypeKey, HolidayInfo holidayInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
117         throw new UnsupportedOperationException("Not supported yet.");
118     }
119 
120     @Override
121     public HolidayCalendarInfo createHolidayCalendar(String holidayCalendarTypeKey, HolidayCalendarInfo holidayCalendarInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
122         throw new UnsupportedOperationException("Not supported yet.");
123     }
124 
125     @Override
126     public KeyDateInfo createKeyDate(String termId, String keyDateTypeKey, KeyDateInfo keyDateInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
127         throw new UnsupportedOperationException("Not supported yet.");
128     }
129 
130     @Override
131     public TermInfo createTerm(String termTypeKey, TermInfo termInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException {
132         TermInfo copy = new TermInfo(termInfo);
133         if (copy.getId() == null) {
134             copy.setId(terms.size() + "");
135         }
136         terms.put(copy.getId(), copy);
137         return new TermInfo(copy);
138     }
139 
140     @Override
141     public StatusInfo deleteAcademicCalendar(String academicCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
142         this.getAcademicCalendar(academicCalendarId, contextInfo);
143         acals.remove(academicCalendarId);
144         StatusInfo status = new StatusInfo();
145         status.setSuccess(Boolean.TRUE);
146         return status;
147     }
148 
149     @Override
150     public StatusInfo deleteAcalEvent(String acalEventId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
151         throw new UnsupportedOperationException("Not supported yet.");
152     }
153 
154     @Override
155     public StatusInfo deleteHoliday(String holidayId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
156         throw new UnsupportedOperationException("Not supported yet.");
157     }
158 
159     @Override
160     public StatusInfo deleteHolidayCalendar(String holidayCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
161         throw new UnsupportedOperationException("Not supported yet.");
162     }
163 
164     @Override
165     public StatusInfo deleteKeyDate(String keyDateId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
166         throw new UnsupportedOperationException("Not supported yet.");
167     }
168 
169     @Override
170     public StatusInfo deleteTerm(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
171         this.getTerm(termId, contextInfo);
172         terms.remove(termId);
173         StatusInfo status = new StatusInfo();
174         status.setSuccess(Boolean.TRUE);
175         return status;
176     }
177 
178     @Override
179     public AcademicCalendarInfo getAcademicCalendar(String academicCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
180         if (!acals.containsKey(academicCalendarId)) {
181             throw new DoesNotExistException(academicCalendarId);
182         }
183         return acals.get(academicCalendarId);
184     }
185 
186     @Override
187     public String getAcademicCalendarData(String academicCalendarId, String calendarDataFormatTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
188         throw new UnsupportedOperationException("Not supported yet.");
189     }
190 
191     @Override
192     public List<String> getAcademicCalendarIdsByType(String academicCalendarTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
193         throw new UnsupportedOperationException("Not supported yet.");
194     }
195 
196     @Override
197     public StateInfo getAcademicCalendarState(String academicCalendarStateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
198         throw new UnsupportedOperationException("Not supported yet.");
199     }
200 
201     @Override
202     public List<StateInfo> getAcademicCalendarStates(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
203         throw new UnsupportedOperationException("Not supported yet.");
204     }
205 
206     @Override
207     public TypeInfo getAcademicCalendarType(String academicCalendarTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
208         throw new UnsupportedOperationException("Not supported yet.");
209     }
210 
211     @Override
212     public List<TypeInfo> getAcademicCalendarTypes(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
213         throw new UnsupportedOperationException("Not supported yet.");
214     }
215 
216     @Override
217     public List<AcademicCalendarInfo> getAcademicCalendarsByIds(List<String> academicCalendarIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
218         throw new UnsupportedOperationException("Not supported yet.");
219     }
220 
221     @Override
222     public List<AcademicCalendarInfo> getAcademicCalendarsByStartYear(Integer year, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
223         throw new UnsupportedOperationException("Not supported yet.");
224     }
225 
226     @Override
227     public List<AcademicCalendarInfo> getAcademicCalendarsForTerm(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
228         throw new UnsupportedOperationException("Not supported yet.");
229     }
230 
231     @Override
232     public AcalEventInfo getAcalEvent(String acalEventId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
233         throw new UnsupportedOperationException("Not supported yet.");
234     }
235 
236     @Override
237     public List<String> getAcalEventIdsByType(String acalEventTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
238         throw new UnsupportedOperationException("Not supported yet.");
239     }
240 
241     @Override
242     public StateInfo getAcalEventState(String acalEventStateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
243         throw new UnsupportedOperationException("Not supported yet.");
244     }
245 
246     @Override
247     public List<StateInfo> getAcalEventStates(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
248         throw new UnsupportedOperationException("Not supported yet.");
249     }
250 
251     @Override
252     public TypeInfo getAcalEventType(String acalEventTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
253         throw new UnsupportedOperationException("Not supported yet.");
254     }
255 
256     @Override
257     public List<TypeInfo> getAcalEventTypes(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
258         throw new UnsupportedOperationException("Not supported yet.");
259     }
260 
261     @Override
262     public List<TypeInfo> getAcalEventTypesForAcademicCalendarType(String academicCalendarTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
263         throw new UnsupportedOperationException("Not supported yet.");
264     }
265 
266     @Override
267     public List<AcalEventInfo> getAcalEventsByIds(List<String> acalEventIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
268         throw new UnsupportedOperationException("Not supported yet.");
269     }
270 
271     @Override
272     public List<AcalEventInfo> getAcalEventsForAcademicCalendar(String academicCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
273         throw new UnsupportedOperationException("Not supported yet.");
274     }
275 
276     @Override
277     public List<AcalEventInfo> getAcalEventsForAcademicCalendarByDate(String academicCalendarId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
278         throw new UnsupportedOperationException("Not supported yet.");
279     }
280 
281     @Override
282     public List<TermInfo> getContainingTerms(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
283         throw new UnsupportedOperationException("Not supported yet.");
284     }
285 
286     @Override
287     public List<TermInfo> getCurrentTerms(String usageKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
288         throw new UnsupportedOperationException("Not supported yet.");
289     }
290 
291     @Override
292     public HolidayInfo getHoliday(String holidayId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
293         throw new UnsupportedOperationException("Not supported yet.");
294     }
295 
296     @Override
297     public HolidayCalendarInfo getHolidayCalendar(String holidayCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
298         throw new UnsupportedOperationException("Not supported yet.");
299     }
300 
301     @Override
302     public List<String> getHolidayCalendarIdsByType(String holidayCalendarTypeKey, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
303         throw new UnsupportedOperationException("Not supported yet.");
304     }
305 
306     @Override
307     public StateInfo getHolidayCalendarState(String holidayCalendarStateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
308         throw new UnsupportedOperationException("Not supported yet.");
309     }
310 
311     @Override
312     public List<StateInfo> getHolidayCalendarStates(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
313         throw new UnsupportedOperationException("Not supported yet.");
314     }
315 
316     @Override
317     public TypeInfo getHolidayCalendarType(String holidayCalendarTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
318         throw new UnsupportedOperationException("Not supported yet.");
319     }
320 
321     @Override
322     public List<TypeInfo> getHolidayCalendarTypes(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
323         throw new UnsupportedOperationException("Not supported yet.");
324     }
325 
326     @Override
327     public List<HolidayCalendarInfo> getHolidayCalendarsByIds(List<String> holidayCalendarIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
328         throw new UnsupportedOperationException("Not supported yet.");
329     }
330 
331     @Override
332     public List<HolidayCalendarInfo> getHolidayCalendarsByStartYear(Integer year, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
333         throw new UnsupportedOperationException("Not supported yet.");
334     }
335 
336     @Override
337     public List<String> getHolidayIdsByType(String holidayTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
338         throw new UnsupportedOperationException("Not supported yet.");
339     }
340 
341     @Override
342     public StateInfo getHolidayState(String holidayStateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
343         throw new UnsupportedOperationException("Not supported yet.");
344     }
345 
346     @Override
347     public List<StateInfo> getHolidayStates(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
348         throw new UnsupportedOperationException("Not supported yet.");
349     }
350 
351     @Override
352     public TypeInfo getHolidayType(String holidayTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
353         throw new UnsupportedOperationException("Not supported yet.");
354     }
355 
356     @Override
357     public List<TypeInfo> getHolidayTypes(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
358         throw new UnsupportedOperationException("Not supported yet.");
359     }
360 
361     @Override
362     public List<TypeInfo> getHolidayTypesForHolidayCalendarType(String holidayCalendarTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
363         throw new UnsupportedOperationException("Not supported yet.");
364     }
365 
366     @Override
367     public List<HolidayInfo> getHolidaysByDateForAcademicCalendar(String academicCalendarId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
368         throw new UnsupportedOperationException("Not supported yet.");
369     }
370 
371     @Override
372     public List<HolidayInfo> getHolidaysByIds(List<String> holidayIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
373         throw new UnsupportedOperationException("Not supported yet.");
374     }
375 
376     @Override
377     public List<HolidayInfo> getHolidaysForHolidayCalendar(String holidayCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
378         throw new UnsupportedOperationException("Not supported yet.");
379     }
380 
381     @Override
382     public List<HolidayInfo> getHolidaysForHolidayCalendarByDate(String holidayCalendarId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
383         throw new UnsupportedOperationException("Not supported yet.");
384     }
385 
386     @Override
387     public List<AcalEventInfo> getImpactedAcalEvents(String acalEventId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
388         throw new UnsupportedOperationException("Not supported yet.");
389     }
390 
391     @Override
392     public List<HolidayInfo> getImpactedHolidays(String holidayId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
393         throw new UnsupportedOperationException("Not supported yet.");
394     }
395 
396     @Override
397     public List<KeyDateInfo> getImpactedKeyDates(String keyDateId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
398         throw new UnsupportedOperationException("Not supported yet.");
399     }
400 
401     @Override
402     public List<TermInfo> getIncludedTermsInTerm(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
403         throw new UnsupportedOperationException("Not supported yet.");
404     }
405 
406     @Override
407     public Integer getInstructionalDaysForTerm(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
408         throw new UnsupportedOperationException("Not supported yet.");
409     }
410 
411     @Override
412     public KeyDateInfo getKeyDate(String keyDateId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
413         throw new UnsupportedOperationException("Not supported yet.");
414     }
415 
416     @Override
417     public List<String> getKeyDateIdsByType(String keyDateTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
418         throw new UnsupportedOperationException("Not supported yet.");
419     }
420 
421     @Override
422     public List<String> getKeyDateIdsByTypeForTerm(String keyDateTypeKey, String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
423         throw new UnsupportedOperationException("Not supported yet.");
424     }
425 
426     @Override
427     public StateInfo getKeyDateState(String keyDateStateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
428         throw new UnsupportedOperationException("Not supported yet.");
429     }
430 
431     @Override
432     public List<StateInfo> getKeyDateStates(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
433         throw new UnsupportedOperationException("Not supported yet.");
434     }
435 
436     @Override
437     public TypeInfo getKeyDateType(String keyDateTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
438         throw new UnsupportedOperationException("Not supported yet.");
439     }
440 
441     @Override
442     public List<TypeInfo> getKeyDateTypes(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
443         throw new UnsupportedOperationException("Not supported yet.");
444     }
445 
446     @Override
447     public List<TypeInfo> getKeyDateTypesForTermType(String termTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
448         throw new UnsupportedOperationException("Not supported yet.");
449     }
450 
451     @Override
452     public List<KeyDateInfo> getKeyDatesByIds(List<String> keyDateIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
453         throw new UnsupportedOperationException("Not supported yet.");
454     }
455 
456     @Override
457     public List<KeyDateInfo> getKeyDatesForTerm(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
458         throw new UnsupportedOperationException("Not supported yet.");
459     }
460 
461     @Override
462     public List<KeyDateInfo> getKeyDatesForTermByDate(String termId, Date startDate, Date endDate, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
463         throw new UnsupportedOperationException("Not supported yet.");
464     }
465 
466     @Override
467     public TermInfo getTerm(String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
468         if (!terms.containsKey(termId)) {
469             throw new DoesNotExistException(termId);
470         }
471         return new TermInfo(terms.get(termId));
472     }
473 
474     @Override
475     public List<String> getTermIdsByType(String termTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
476         throw new UnsupportedOperationException("Not supported yet.");
477     }
478 
479     @Override
480     public StateInfo getTermState(String termStateKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
481         throw new UnsupportedOperationException("Not supported yet.");
482     }
483 
484     @Override
485     public List<StateInfo> getTermStates(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
486         throw new UnsupportedOperationException("Not supported yet.");
487     }
488 
489     @Override
490     public TypeInfo getTermType(String termTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
491         throw new UnsupportedOperationException("Not supported yet.");
492     }
493 
494     @Override
495     public List<TypeInfo> getTermTypes(ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
496         throw new UnsupportedOperationException("Not supported yet.");
497     }
498 
499     @Override
500     public List<TypeInfo> getTermTypesForAcademicCalendarType(String academicCalendarTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
501         throw new UnsupportedOperationException("Not supported yet.");
502     }
503 
504     @Override
505     public List<TypeInfo> getTermTypesForTermType(String termTypeKey, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
506         throw new UnsupportedOperationException("Not supported yet.");
507     }
508 
509     @Override
510     public List<TermInfo> getTermsByCode(String code, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
511         throw new UnsupportedOperationException("Not supported yet.");
512     }
513 
514     @Override
515     public List<TermInfo> getTermsByIds(List<String> termIds, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
516         throw new UnsupportedOperationException("Not supported yet.");
517     }
518 
519     @Override
520     public List<TermInfo> getTermsForAcademicCalendar(String academicCalendarId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
521         throw new UnsupportedOperationException("Not supported yet.");
522     }
523 
524     @Override
525     public StatusInfo removeTermFromAcademicCalendar(String academicCalendarId, String termId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
526         throw new UnsupportedOperationException("Not supported yet.");
527     }
528 
529     @Override
530     public StatusInfo removeTermFromTerm(String termId, String includedTermId, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
531         throw new UnsupportedOperationException("Not supported yet.");
532     }
533 
534     @Override
535     public List<String> searchForAcademicCalendarIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
536         throw new UnsupportedOperationException("Not supported yet.");
537     }
538 
539     @Override
540     public List<AcademicCalendarInfo> searchForAcademicCalendars(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
541         throw new UnsupportedOperationException("Not supported yet.");
542     }
543 
544     @Override
545     public List<String> searchForAcalEventIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
546         throw new UnsupportedOperationException("Not supported yet.");
547     }
548 
549     @Override
550     public List<AcalEventInfo> searchForAcalEvents(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
551         throw new UnsupportedOperationException("Not supported yet.");
552     }
553 
554     @Override
555     public List<String> searchForHolidayCalendarIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
556         throw new UnsupportedOperationException("Not supported yet.");
557     }
558 
559     @Override
560     public List<HolidayCalendarInfo> searchForHolidayCalendars(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
561         throw new UnsupportedOperationException("Not supported yet.");
562     }
563 
564     @Override
565     public List<String> searchForHolidayIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
566         throw new UnsupportedOperationException("Not supported yet.");
567     }
568 
569     @Override
570     public List<HolidayInfo> searchForHolidays(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
571         throw new UnsupportedOperationException("Not supported yet.");
572     }
573 
574     @Override
575     public List<String> searchForKeyDateIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
576         throw new UnsupportedOperationException("Not supported yet.");
577     }
578 
579     @Override
580     public List<KeyDateInfo> searchForKeyDates(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
581         throw new UnsupportedOperationException("Not supported yet.");
582     }
583 
584     @Override
585     public List<String> searchForTermIds(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
586         throw new UnsupportedOperationException("Not supported yet.");
587     }
588 
589     @Override
590     public List<TermInfo> searchForTerms(QueryByCriteria criteria, ContextInfo contextInfo) throws InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
591         List<TermInfo> list = new ArrayList<TermInfo>();
592         if(criteria.getPredicate() instanceof EqualPredicate){
593             EqualPredicate p = (EqualPredicate) criteria.getPredicate();
594             if("atpCode".equals(p.getPropertyPath())){
595                 list.add(this.terms.get(p.getValue().getValue()));
596             }
597         }
598         return list;
599     }
600 
601     @Override
602     public AcademicCalendarInfo updateAcademicCalendar(String academicCalendarId, AcademicCalendarInfo academicCalendarInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
603         throw new UnsupportedOperationException("Not supported yet.");
604     }
605 
606     @Override
607     public AcalEventInfo updateAcalEvent(String acalEventId, AcalEventInfo acalEventInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
608         throw new UnsupportedOperationException("Not supported yet.");
609     }
610 
611     @Override
612     public HolidayInfo updateHoliday(String holidayId, HolidayInfo holidayInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
613         throw new UnsupportedOperationException("Not supported yet.");
614     }
615 
616     @Override
617     public HolidayCalendarInfo updateHolidayCalendar(String holidayCalendarId, HolidayCalendarInfo holidayCalendarInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
618         throw new UnsupportedOperationException("Not supported yet.");
619     }
620 
621     @Override
622     public KeyDateInfo updateKeyDate(String keyDateId, KeyDateInfo keyDateInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
623         throw new UnsupportedOperationException("Not supported yet.");
624     }
625 
626     @Override
627     public TermInfo updateTerm(String termId, TermInfo termInfo, ContextInfo contextInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, ReadOnlyException, VersionMismatchException {
628         throw new UnsupportedOperationException("Not supported yet.");
629     }
630 
631     @Override
632     public List<ValidationResultInfo> validateAcademicCalendar(String validationTypeKey, String academicCalendarTypeKey, AcademicCalendarInfo academicCalendarInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
633         throw new UnsupportedOperationException("Not supported yet.");
634     }
635 
636     @Override
637     public List<ValidationResultInfo> validateAcalEvent(String validationTypeKey, String termId, String acalEventTypeKey, AcalEventInfo acalEventInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
638         throw new UnsupportedOperationException("Not supported yet.");
639     }
640 
641     @Override
642     public List<ValidationResultInfo> validateHoliday(String validationTypeKey, String holidayCalendarId, String holidayTypeKey, HolidayInfo holidayInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
643         throw new UnsupportedOperationException("Not supported yet.");
644     }
645 
646     @Override
647     public List<ValidationResultInfo> validateHolidayCalendar(String validationTypeKey, String holidayCalendarTypeKey, HolidayCalendarInfo holidayCalendarInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
648         throw new UnsupportedOperationException("Not supported yet.");
649     }
650 
651     @Override
652     public List<ValidationResultInfo> validateKeyDate(String validationTypeKey, String termId, String keyDateTypeKey, KeyDateInfo keyDateInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
653         throw new UnsupportedOperationException("Not supported yet.");
654     }
655 
656     @Override
657     public List<ValidationResultInfo> validateTerm(String validationTypeKey, String termTypeKey, TermInfo termInfo, ContextInfo contextInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
658         throw new UnsupportedOperationException("Not supported yet.");
659     }
660 }