KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > roller > presentation > tags > calendar > CalendarModel


1
2 package org.roller.presentation.tags.calendar;
3 import java.util.Calendar JavaDoc;
4 import java.util.Date JavaDoc;
5
6 /**
7  * Model interface for the CalendarTag. The CalendarTag will set a day,
8  * then use the computeUrl method to get the URLs it needs.
9  */

10 public interface CalendarModel
11 {
12     public Calendar JavaDoc getCalendar();
13     
14     public void setDay( String JavaDoc month ) throws Exception JavaDoc;
15     
16     public Date JavaDoc getDay();
17     
18     public Date JavaDoc getNextMonth();
19     
20     public String JavaDoc computePrevMonthUrl();
21
22     public String JavaDoc computeTodayMonthUrl();
23
24     public String JavaDoc computeNextMonthUrl();
25     
26     /**
27      * Create URL for use on edit-weblog page, preserves the request
28      * parameters used by the tabbed-menu tag for navigation.
29      *
30      * @param day Day for URL
31      * @param valid Always return a URL, never return null
32      * @return URL for day, or null if no weblog entry on that day
33      */

34     public String JavaDoc computeUrl( java.util.Date JavaDoc day, boolean valid );
35     
36     /**
37      * Get calendar cell content or null if none.
38      *
39      * @param day Day for URL
40      * @param valid Always return a URL, never return null
41      * @return Calendar cell content or null if none.
42      */

43     public String JavaDoc getContent( java.util.Date JavaDoc day );
44 }
45
46
Popular Tags