Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: com/xpn/xwiki/plugin/calendar/CalendarModel.java


1   /**
2    * ===================================================================
3    *
4    * Copyright (c) 2003,2004 Ludovic Dubost, All rights reserved.
5    *
6    * This program is free software; you can redistribute it and/or
7    * modify it under the terms of the GNU Lesser General Public License
8    * as published by the Free Software Foundation; either version 2
9    * of the License, or (at your option) any later version.
10   *
11   * This program is distributed in the hope that it will be useful,
12   * but WITHOUT ANY WARRANTY; without even the implied warranty of
13   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   * GNU Lesser General Public License for more details, published at 
15   * http://www.gnu.org/copyleft/lesser.html or in lesser.txt in the
16   * root folder of this distribution.
17  
18   * Created by
19   * User: Ludovic Dubost
20   * Original Code from: the JRoller Project
21   * Date: 9 oct. 2004
22   * Time: 19:45:06
23   */
24  package com.xpn.xwiki.plugin.calendar;
25  
26  import java.util.Calendar;
27  import java.util.Date;
28  
29  /**
30   * Model interface for the CalendarTag. The CalendarTag will set a day,
31   * then use the computeUrl method to get the URLs it needs.
32   */
33  public interface CalendarModel
34  {
35      public Calendar getCalendar();
36  
37    public void setDay( String month ) throws Exception;
38  
39    public Date getDay();
40  
41      public Date getNextMonth();
42  
43      public String computePrevMonthUrl();
44  
45      public String computeTodayMonthUrl();
46  
47      public String computeNextMonthUrl();
48  
49      /**
50       * Create URL for use on edit-weblog page, preserves the request
51       * parameters used by the tabbed-menu tag for navigation.
52       *
53       * @param day   Day for URL
54       * @param valid Always return a URL, never return null
55       * @return URL for day, or null if no weblog entry on that day
56       */
57      public String computeUrl( java.util.Date day, boolean valid );
58  
59      /**
60       * Get calendar cell content or null if none.
61       *
62       * @param day Day for URL
63       * @param valid Always return a URL, never return null
64       * @return Calendar cell content or null if none.
65       */
66      public String getContent( java.util.Date day );
67  }