/*
 * ICESOFT COMMERCIAL SOURCE CODE LICENSE V 1.1
 *
 * The contents of this file are subject to the ICEsoft Commercial Source
 * Code License Agreement V1.1 (the "License"); you may not use this file
 * except in compliance with the License. You may obtain a copy of the
 * License at
 * http://www.icesoft.com/license/commercial-source-v1.1.html
 *
 * Software distributed under the License is distributed on an "AS IS"
 * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
 * License for the specific language governing rights and limitations under
 * the License.
 *
 * Copyright 2009-2015 ICEsoft Technologies Canada, Corp. All Rights Reserved.
 */
package com.icesoft.faces.facelets.component.schedule;

import java.util.Calendar;
import java.util.List;

/**
 * CalendarViewService defines what the UI is expecting to get back from the
 * service layer for a given call.  There is close to a one-one mapping
 * of views to methods.
 * <p/>
 * A date cursor refers to a Calendar object which is set to some
 * arbitrary date.  The cursor is then used to "center" the calendar
 * view on.  For example the cursor 2009-06-01, represents a day,
 * week 1, June or Year for the views day, week, month, year.
 *
 * @author ICEfaces Technologies Inc.
 */
public interface CalendarViewService {

    /**
     * Gets all the events for the current users for the given Year
     * given the year value dateCursor.  The return values should be sorted
     * by startDate and endDate to work correctly with UI.
     *
     * @param dateCursor users current date view; year.
     * @return list of all events for the given year sorted by startDate and
     *         endDate of the event.
     */
    public List getCalendarYearEvents(Calendar dateCursor);

    /**
     * Gets all the events for the current user for the given Month value
     * in dateCursor.    The return values should be sorted
     * by startDate and endDate to work correctly with UI.
     *
     * @param dateCursor users current date view; year and month.
     * @return list of all events for the given month sorted by startDate and
     *         endDate of the event.
     */
    public List getCalendarMonthEvents(Calendar dateCursor);

    /**
     * Gets all the events for the current user for the given week value
     * in dateCursor.    The return values should be sorted
     * by startDate and endDate to work correctly with UI.
     *
     * @param dateCursor users current date view; year and month.
     * @return list of all events for the given week sorted by startDate and
     *         endDate of the event.
     */
    public List getCalendarWeekEvents(Calendar dateCursor);

    /**
     * Gets all the events for the current user for the given day value
     * in dateCursor.    The return values should be sorted
     * by startDate and endDate to work correctly with UI.
     *
     * @param dateCursor users current date view; year and month.
     * @return list of all events for the given day sorted by startDate and
     *         endDate of the event.
     */
    public List getCalendarDayEvents(Calendar dateCursor);
}