01: /*--------------------------------------------------------------------------*
02: | Copyright (C) 2006 Christopher Kohlhaas |
03: | |
04: | This program is free software; you can redistribute it and/or modify |
05: | it under the terms of the GNU General Public License as published by the |
06: | Free Software Foundation. A copy of the license has been included with |
07: | these distribution in the COPYING file, if not go to www.fsf.org |
08: | |
09: | As a special exception, you are granted the permissions to link this |
10: | program with every library, which license fulfills the Open Source |
11: | Definition as published by the Open Source Initiative (OSI). |
12: *--------------------------------------------------------------------------*/
13: package org.rapla.facade;
14:
15: import java.util.Date;
16: import java.util.List;
17:
18: import org.rapla.entities.domain.Period;
19:
20: /** ListModel that contains all periods. Updates the list automatically if a period is added, changed or deleted.
21: * */
22: public interface PeriodModel {
23: /** returns the first matching period or null if no period matches.*/
24: public Period getPeriodFor(Date date);
25:
26: public Period getNearestPeriodForDate(Date date);
27:
28: public Period getNearestPeriodForStartDate(Date date);
29:
30: public Period getNearestPeriodForStartDate(Date date, Date endDate);
31:
32: public Period getNearestPeriodForEndDate(Date date);
33:
34: /** return all matching periods.*/
35: public List getPeriodsFor(Date date);
36:
37: public int getSize();
38:
39: public Period[] getAllPeriods();
40:
41: }
|