Skip navigation links

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


oracle.adf.view.rich.model
Class CalendarActivity

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


public abstract class CalendarActivity
extends java.lang.Object

Base abstract class that represents an activity rendered in a Calendar component.


Nested Class Summary
static class CalendarActivity.Recurring
          Recurring information of calendar activity.
static class CalendarActivity.Reminder
          Reminder information of calendar activity.
static class CalendarActivity.TimeType
          Whether or not time (hours, minutes, etc) is relevant.

 

Constructor Summary
CalendarActivity()
           

 

Method Summary
 java.util.Map<java.lang.String,java.lang.Object> getCustomAttributes()
          Gets the custom attributes of the activity.
abstract  java.util.Date getEndDate(java.util.TimeZone tz)
          Gets the end date of the activity.
abstract  java.lang.String getId()
          Gets the id of the actiivty, this should be unique per providerId.
 java.lang.String getLocation()
          Gets the location of activity.
 CalendarProvider getProvider()
          Gets the provider, which represents the owner or source of the activity.
 CalendarActivity.Recurring getRecurring()
          Gets the Recurring information for the activity.
 CalendarActivity.Reminder getReminder()
          Gets the Reminder information for the activity.
abstract  java.util.Date getStartDate(java.util.TimeZone tz)
          Gets the start date of the activity.
 java.util.Set<java.lang.String> getTags()
          Gets the tags associated with the activity.
 CalendarActivity.TimeType getTimeType()
          Gets the TimeType information for an activity.
 java.lang.String getTitle()
          Gets the title of the activity.
 boolean isReadOnly()
          Whether the activity is read only.
 void setEndDate(java.util.Date endDate, java.util.TimeZone tz)
          Sets the end date of the activity.
 void setLocation(java.lang.String location)
          Sets the location of the activity.
 void setRecurring(CalendarActivity.Recurring recurring)
          Sets the Recurring information of the activity.
 void setReminder(CalendarActivity.Reminder reminder)
          Sets the Reminder information of the activity.
 void setStartDate(java.util.Date startDate, java.util.TimeZone tz)
          Sets the start date of the activity.
 void setTags(java.util.Set<java.lang.String> tags)
          Sets the tags of the activity.
 void setTimeType(CalendarActivity.TimeType timeType)
          Sets the TimeType information of the activity.
 void setTitle(java.lang.String title)
          Sets the title of the activity.

 

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

 

Constructor Detail

CalendarActivity

public CalendarActivity()

Method Detail

getId

public abstract java.lang.String getId()
Gets the id of the actiivty, this should be unique per providerId. Rules for the id are
Returns:
the unique id of this activity.

getProvider

public CalendarProvider getProvider()
Gets the provider, which represents the owner or source of the activity. The combination of the id and provider.getId should be uniqe. The purpose of the provider id is to identify the source of an activity, for example you may be looking at your activities, boss's activities, holiday activities, etc.
Returns:
the owner or provider of this activity.

getStartDate

public abstract java.util.Date getStartDate(java.util.TimeZone tz)
Gets the start date of the activity.

An allday activity (TimeType = ALLDAY) for May 3 2008 is required to return May 3 2008 12:00am for the start date.

Although java.util.Dates are mutable, the date returned should be stable per request. Also, the date returned is a new Date instance, changes to it will not change the underlying data.

Returns:
the start date

getEndDate

public abstract java.util.Date getEndDate(java.util.TimeZone tz)
Gets the end date of the activity.

The end date is exclusive. Meaning if there are 2 activities, the first from 9-10am and the second from 10-11am, the start time of activity 2 does not conflict with the end time of activity 1, because the end time of activity 1 is not considered part of the activity. This also applies to activities that last the full day, for example if an activity lasts all day on May 3 2008, then the end date should be May 4 2008 12:00am.

An all day activity (TimeType = ALLDAY) is required to return midnight the following day for the end date. For example an all day activity for May 3 2008 is required to return May 4 2008 12:00 am for the end date. Similarly a two day all day activity for May 3 and May 4 2008 would return May 5 2008 12:00 am. Note that the seconds and millisecond value should be zeroed out as well.

Although java.util.Dates are mutable, the date returned should be stable per request. Also, the date returned is a new Date instance, changes to it will not change the underlying data.

Returns:
the end day and time

getTags

public java.util.Set<java.lang.String> getTags()
Gets the tags associated with the activity.

Tags may be used to categorize an activity in some way, for example they may be used to style an activity.

Returns:
set of tag strings, returns Collections.emptySet() if no tags

getTitle

public java.lang.String getTitle()
Gets the title of the activity.
Returns:
the title of the activity.

getLocation

public java.lang.String getLocation()
Gets the location of activity.
Returns:
the location of the activity

getReminder

public CalendarActivity.Reminder getReminder()
Gets the Reminder information for the activity.
Returns:
whether the activity has a reminder.

getRecurring

public CalendarActivity.Recurring getRecurring()
Gets the Recurring information for the activity.

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

The information returned from this method (getRecurring) is information the calendar component may use to do something like render an icon.

Returns:
whether this is a recurring activity.

getTimeType

public CalendarActivity.TimeType getTimeType()
Gets the TimeType information for an activity.

This information is used to know whether or not time (hours, minutes, etc) is relevant.

Returns:
the time type of this activity.

getCustomAttributes

public java.util.Map<java.lang.String,java.lang.Object> getCustomAttributes()
Gets the custom attributes of the activity.

The attributes with getters on CalendarActivity are those that are needed by a calendar component to render activities. However the activity doubtless has additional attributes that a calendar component is not aware of. For example there may be a list of attendees or a description. CustomAttributes allows access to custom attributes through the CalendarActivity api itself, without having to cast or refer to a subclass.

Application developers should use the custom attributes map for custom attributes rather than subclassing calendarActivity. In this way if additional attributes are added to calendarActivity it will not conflict with subclass methods.

Built in attributes like title, location, etc, are not in the custom attribute map.

Returns:
custom attributes of this activity, returns Collections.emptyMap() if no custom attributes.

isReadOnly

public boolean isReadOnly()
Whether the activity is read only. True value indicates that attribute setter methods will throw UnsupportedOperationException.

The default value is true.

Returns:
true if activity setter methods should not be called and false otherwise.

setStartDate

public void setStartDate(java.util.Date startDate,
                         java.util.TimeZone tz)
Sets the start date of the activity. Do not call this method if isReadOnly() returns true.

Because java.util.Dates are mutable a new date instance will be stored, thus changes to the date instance passed in will not change the underlying data.

Parameters:
startDate - the new start date
tz - the timezone for the new start date
Throws:
java.lang.UnsupportedOperationException - if not being overriden.

setEndDate

public void setEndDate(java.util.Date endDate,
                       java.util.TimeZone tz)
Sets the end date of the activity. Do not call this method if isReadOnly() returns true.

Because java.util.Dates are mutable a new date instance will be stored, thus changes to the date instance passed in will not change the underlying data.

Parameters:
endDate -
tz - the timezone for the new end date
Throws:
java.lang.UnsupportedOperationException - if not overriden.

setTags

public void setTags(java.util.Set<java.lang.String> tags)
Sets the tags of the activity. Do not call this method if isReadOnly() returns true.
Parameters:
tags -
Throws:
java.lang.UnsupportedOperationException - if not overriden.

setTitle

public void setTitle(java.lang.String title)
Sets the title of the activity. Do not call this method if isReadOnly() returns true.
Parameters:
title -
Throws:
java.lang.UnsupportedOperationException - if not overriden.

setLocation

public void setLocation(java.lang.String location)
Sets the location of the activity. Do not call this method if isReadOnly() returns true.
Parameters:
location -
Throws:
java.lang.UnsupportedOperationException - if not overriden.

setReminder

public void setReminder(CalendarActivity.Reminder reminder)
Sets the Reminder information of the activity. Do not call this method if isReadOnly() returns true.
Parameters:
reminder -
Throws:
java.lang.UnsupportedOperationException - if not overriden.

setRecurring

public void setRecurring(CalendarActivity.Recurring recurring)
Sets the Recurring information of the activity. Do not call this method if isReadOnly() returns true.
Parameters:
recurring -
Throws:
java.lang.UnsupportedOperationException - if not overriden.

setTimeType

public void setTimeType(CalendarActivity.TimeType timeType)
Sets the TimeType information of the activity. Do not call this method if isReadOnly() returns true.
Parameters:
timeType -
Throws:
java.lang.UnsupportedOperationException - if not overriden.

Skip navigation links

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


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