Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-06


oracle.adf.view.rich.model
Class CalendarModel

java.lang.Object
  extended by oracle.adf.view.rich.model.CalendarModel


public abstract class CalendarModel
extends java.lang.Object

CalendarModel is an abstract base class that represents a model for a Calendar component. The calendarModel returns CalendarActivity objects.

The Calendar model needs to generate separate CalendarActivity objects representing each recurring calendar activity.

See Also:
CalendarActivity

Constructor Summary
CalendarModel()
           

 

Method Summary
abstract  CalendarActivity getActivity(java.lang.String providerId, java.lang.String activityId, java.util.Date rangeStart, java.util.Date rangeEnd, java.util.TimeZone timeZone)
          Return CalendarActivity based on providerId and id within a range.
abstract  java.util.List<CalendarActivity> getAllDayActivities(java.util.Date rangeStart, java.util.Date rangeEnd, java.util.TimeZone timeZone)
           Returns activities that intersect the range.
 CalendarProvider getProvider(java.lang.String id)
          Find a provider, or activity owner, based on an id.
 java.util.List<CalendarProvider> getProviders()
          A CalendarProvider represents the provider, or owner, of activities.
abstract  java.util.List<CalendarActivity> getTimeActivities(java.util.Date rangeStart, java.util.Date rangeEnd, java.util.TimeZone timeZone)
           Returns activities that intersect the range.
static boolean isActivityInRange(CalendarActivity activity, java.util.TimeZone timeZone, java.util.Date rangeStart, java.util.Date rangeEnd)
          Return true if the activity intersects the date range.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Constructor Detail

CalendarModel

public CalendarModel()

Method Detail

getTimeActivities

public abstract java.util.List<CalendarActivity> getTimeActivities(java.util.Date rangeStart,
                                                                   java.util.Date rangeEnd,
                                                                   java.util.TimeZone timeZone)

Returns activities that intersect the range. The start date is inclusive, meaning if the activity start date is an exact match to the range start date it is included in the returned list. The end date is exclusive, meaning if the activity start date is an exact match to the range end date it is not included in the returned list.

This method will generate a List of CalendarActivity objects where TimeType is TIME. The activities are returned in sorted order by start date.

If the start date is null, return all the activities before the end date (exclusive). If the end date is null, return all the activities after the start date (inclusive). If both are null, return all activities

Activities should be stable per request. Meaning between the time the model is asked for activities in a range, and the time the activities are rendered, the activity should not change. For example the start and end time should not change, the timeType should not change, etc.

Parameters:
rangeStart - range start date (inclusive)
rangeEnd - range end date (exclusive)
timeZone - the timeZone
Returns:
List of CalendarActivity objects

getAllDayActivities

public abstract java.util.List<CalendarActivity> getAllDayActivities(java.util.Date rangeStart,
                                                                     java.util.Date rangeEnd,
                                                                     java.util.TimeZone timeZone)

Returns activities that intersect the range. The start date is inclusive, meaning if the activity start date is an exact match to the range start date it is included in the returned list. The end date is exclusive, meaning if the activity start date is an exact match to the range end date it is not included in the returned list.

This method will generate a List of CalendarActivity objects where TimeType is ALLDAY. The activities must be returned in sorted order by start date.

If the start date is null, return all the activities before the end date (exclusive). If the end date is null, return all the activities after the start date (inclusive). If both are null, return all activities

Activities should be stable per request. Meaning between the time the model is asked for activities in a range, and the time the activities are rendered, the activity should not change. For example the start and end time should not change, the timeType should not change, etc.

Parameters:
rangeStart - range start date (inclusive)
rangeEnd - range end date (exclusive)
timeZone - the timeZone
Returns:
List of CalendarActivity objects.

getActivity

public abstract CalendarActivity getActivity(java.lang.String providerId,
                                             java.lang.String activityId,
                                             java.util.Date rangeStart,
                                             java.util.Date rangeEnd,
                                             java.util.TimeZone timeZone)
Return CalendarActivity based on providerId and id within a range.
Parameters:
providerId - the id of the provider
activityId - the id of the activity
rangeStart - the start of the range to search in. This is just a hint which the model may (or may not) be able to use to search efficiently, for example by looking at the expected range the model may know whether or not to search cached activities. If the activity exists it will be returned, regardless of whether it's in the range. A rangeStart of null is legal.
rangeEnd - the end of the range to search in. This is just a hint which the model may (or may not) be able to use to search efficiently, for example by looking at the expected range the model may know whether or not to search cached activities. If the activity exists it will be returned, regardless of whether it's in the range. A rangeEnd of null is legal.
timeZone - the timeZone
Returns:
The desired CalendarActivity object or null if its not found.

getProvider

public CalendarProvider getProvider(java.lang.String id)
Find a provider, or activity owner, based on an id.
Parameters:
id - the id of the provider to return
Returns:
the provider that matches the id passed in.

getProviders

public java.util.List<CalendarProvider> getProviders()
A CalendarProvider represents the provider, or owner, of activities. This method returns a list of all the providers in this model. The list should not contain duplicates.
Returns:
list of all the providers in this model. The list should not contain duplicates.

isActivityInRange

public static boolean isActivityInRange(CalendarActivity activity,
                                        java.util.TimeZone timeZone,
                                        java.util.Date rangeStart,
                                        java.util.Date rangeEnd)
Return true if the activity intersects the date range.

The conditions in which an activity intersects the date range are as follows:

Parameters:
activity -
timeZone -
rangeStart -
rangeEnd -
Returns:
boolean true if the activity intersects the date range.
Throws:
java.lang.NullPointerException - if activity or timeZone is null.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Faces
11g Release 1 (11.1.1)
E10684-06


Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.