Oracle® Collaboration Suite Workspaces API Reference
10g Release 1 (10.1.2)

B25479-01


oracle.workspaces.resource.calendar
Class CwCalendarResource

java.lang.Object
  extended byoracle.workspaces.resource.CwResource
      extended byoracle.workspaces.resource.calendar.CwCalendarResource


public class CwCalendarResource
extends CwResource

This class represents workspace calendar resource/service (meetings and tasks).


Method Summary
CwEvent createEvent(CwEventDefinition eventDef)
Creates an event in the workspace agenda and returns it.
CwTask createTask(CwTaskDefinition taskDef)
Creates a to-do task in the workspace agenda and returns it.
void deleteAllEventInstances(CwUid uid)
Deletes all event instances of a repeating event in the workspace agenda.
void deleteEvent(CwEvent event)
Deletes a single event instance in the workspace agenda.
void deleteEvent(CwUid uid)
Deletes an event instance in the workspace agenda.
void deleteEvents(CwUid[] uids)
Deletes event instances in the workspace calendar.
void deleteTask(CwUid uid)
Deletes a to-do task in the workspace agenda.
void deleteTasks(CwUid[] uids)
Deletes to-do tasks in the workspace agenda.
CwEvent[] getAllEventInstances(CwUid eventUid)
Get all event instances of a repeating event.
CwAttendeeFreeBusy[] getAttendeeFreeBusys(CwCalendarAttendee[] attendees, java.util.Date beginTime, java.util.Date endTime)
Returns the results of given users/resources free busy status given a time frame.
CwEvent getEventByUid(CwUid eventUid)
Get an event instance in the workspace agenda by its uid.
CwFreeBusy[] getFreeBusys(CwUser[] users, java.util.Date beginTime, java.util.Date endTime)
Returns the combined results of given users' free busy status given a time frame.
CwFreeBusy[] getFreeBusys(java.util.Date beginTime, java.util.Date endTime)
Returns the current user's free busy status given a time frame.
CwResourceItem getItemByUid(CwUid uid)
Returns the resource item for the given UID.
java.lang.String getMappedWspcEntityGuid()
A convenience method to retieve mapped Workspace Entity Guid
CwTask[] getMyTasks()
Gets all tasks that are assigned to the user or his or her group.
CwTask[] getMyTasks(boolean bSort)
Gets all tasks that are assigned to the user or his or her group.
CwEvent[] getNewEvents(java.util.Date beginDate, java.util.Date endDate, boolean bSort)
Get new events in workspaces agenda that expect current user's reply and occur within the time range specified.
CwResourceItem[] getRecentActivities()
Returns a list of recent events.
CwTask getTaskByUid(CwUid taskUid)
Gets a to-do task in the workspace agenda by its uid.
java.lang.String getWorkspaceEntityOnCalendar()
Returns the mapped workspace entity name on Calendar.
boolean isFreeByRange(CwUser[] users, java.util.Date beginTime, java.util.Date endTime)
Returns true if the given users are free within the given time frame.
CwTask[] listAllCompletedTasks(boolean bSort)
Get all completed tasks in this workspace agenda.
CwEvent[] listAllEvents(boolean bSort)
Get all events in this workspace agenda.
CwTask[] listAllIncompleteTasks(boolean bSort)
Get all incomplete tasks in this workspace agenda.
CwTask[] listAllTasks(boolean bSort)
Get all tasks in this workspace agenda.
CwEvent[] listEventsByRange(java.util.Date beginDate, java.util.Date endDate, boolean bSort)
Get events in workspace agenda that occur within the time range specified.
CwResourceBulkResponse listEventsByUid(CwUid[] eventUids)
Gets event instances in the workspace agenda by it UIDs.
CwResourceBulkResponse listItemsByUids(CwUid[] uids)
Returns the requested resource items.
CwTask[] listTasksByRange(java.util.Date beginTime, java.util.Date endTime, boolean bSort)
Get tasks which are active within the time range specified.
CwResourceBulkResponse listTasksByUid(CwUid[] taskUids)
Gets to-do tasks in the workspace agenda given the UIDs.

Methods inherited from class oracle.workspaces.resource.CwResource
getProperties, getStatus, getUid, getWorkspace, storeProperties

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

Method Detail

createEvent

public CwEvent createEvent(CwEventDefinition eventDef)
                    throws CwException
Creates an event in the workspace agenda and returns it. If the definition specifies a repeating event, only the instance with the same start time as in definition will be returned. The returned event instance will have the specific repeating status set.
Parameters:
eventDef - the event definition for the new event to be created
Throws:
CwException

createTask

public CwTask createTask(CwTaskDefinition taskDef)
                  throws CwException
Creates a to-do task in the workspace agenda and returns it.
Parameters:
taskDef - the task definition for the new task to be created
Throws:
CwException

deleteAllEventInstances

public void deleteAllEventInstances(CwUid uid)
                             throws CwException
Deletes all event instances of a repeating event in the workspace agenda.
Parameters:
uid - the UID of the event to be deleted Note: If this is called upon a non-repeating event, it is the same as deleteEvent().
Throws:
CwException

deleteEvent

public void deleteEvent(CwEvent event)
                 throws CwException
Deletes a single event instance in the workspace agenda. This method is functionally same as deleteEvent(CwUid), but more efficient. To delete all instances of a repeating event, call deleteAllEventInstances()
Parameters:
event - Event instance to be deleted.
Throws:
CwException
See Also:
deleteEvent(CwUid), deleteAllEventInstances(CwUid)

deleteEvent

public void deleteEvent(CwUid uid)
                 throws CwException
Deletes an event instance in the workspace agenda. If corresponding CwEvent object is available, deleteEvent(CwEvent) can be used for better performance. To delete all instances of a repeating event, call deleteAllEventInstances()
Parameters:
uid - the UID of the event instance to be deleted
Throws:
CwException
See Also:
deleteEvent(CwEvent), deleteAllEventInstances(CwUid)

deleteEvents

public void deleteEvents(CwUid[] uids)
                  throws CwException
Deletes event instances in the workspace calendar.
Parameters:
uids - the UIDs of the event instances to be deleted Note: To delete all instance of a repeating event, call deleteAllEventInstances()
Throws:
CwException

deleteTask

public void deleteTask(CwUid uid)
                throws CwException
Deletes a to-do task in the workspace agenda.
Parameters:
uid - the UID of the task to be dropped
Throws:
CwException

deleteTasks

public void deleteTasks(CwUid[] uids)
                 throws CwException
Deletes to-do tasks in the workspace agenda.
Parameters:
uids - the UIDs of the tasks to be dropped
Throws:
CwException

getAllEventInstances

public CwEvent[] getAllEventInstances(CwUid eventUid)
                               throws CwException
Get all event instances of a repeating event. The event instances returned should have the specific repeating status set (REPEATING_YES/REPEATING_NO).
Throws:
CwException

getAttendeeFreeBusys

public CwAttendeeFreeBusy[] getAttendeeFreeBusys(CwCalendarAttendee[] attendees,
                                                 java.util.Date beginTime,
                                                 java.util.Date endTime)
                                          throws CwException
Returns the results of given users/resources free busy status given a time frame. The results are computed for each user or a resource and returned as an array of CwAttendeeFreeBusy
Parameters:
attendees - Attendees to check upon.
beginTime - Begin of the time frame
endTime - End of the time frame
Throws:
CwException
See Also:
CwAttendeeFreeBusy

getEventByUid

public CwEvent getEventByUid(CwUid eventUid)
                      throws CwException
Get an event instance in the workspace agenda by its uid. The event instance returned should have the specific repeating status set (REPEATING_YES/REPEATING_NO).
Throws:
CwException

getFreeBusys

public CwFreeBusy[] getFreeBusys(CwUser[] users,
                                 java.util.Date beginTime,
                                 java.util.Date endTime)
                          throws CwException
Returns the combined results of given users' free busy status given a time frame.
Parameters:
users - Users to check upon.
beginTime - Begin of the time frame
endTime - End of the time frame Note: In the returned results (assume it is called "freeBusys") 1. freeBusys[0].getStartTime() is the same as beginTime, 2. freeBusys[results.length-1].getEndTime(0 is the same as endTime 3. freeBusys' time frame are in assending order. 4. There should be no time frame overlap between freeBusys[i] and freeBusys[i+1].
Throws:
CwException

getFreeBusys

public CwFreeBusy[] getFreeBusys(java.util.Date beginTime,
                                 java.util.Date endTime)
                          throws CwException
Returns the current user's free busy status given a time frame.
Parameters:
beginTime - Begin of the time frame
endTime - End of the time frame Note: In the returned results (assume it is called "freeBusys") 1. freeBusys[0].getStartTime() is the same as beginTime, 2. freeBusys[results.length-1].getEndTime(0 is the same as endTime 3. freeBusys' time frame are in assending order. 4. There should be no time frame overlap between freeBusys[i] and freeBusys[i+1].
Throws:
CwException

getItemByUid

public CwResourceItem getItemByUid(CwUid uid)
                            throws CwException
Returns the resource item for the given UID. It could be either an event or a task.
Specified by:
getItemByUid in class CwResource
Parameters:
uid - UID of the item to be retrieved.
Throws:
CwException

getMappedWspcEntityGuid

public java.lang.String getMappedWspcEntityGuid()
A convenience method to retieve mapped Workspace Entity Guid

getMyTasks

public CwTask[] getMyTasks()
                    throws CwException
Gets all tasks that are assigned to the user or his or her group. This method is the same as #getMyTasks(false).
Returns:
the array containing CwTask objects
Throws:
CwException

getMyTasks

public CwTask[] getMyTasks(boolean bSort)
                    throws CwException
Gets all tasks that are assigned to the user or his or her group.
Parameters:
bSort - true to sort by endTime in ascending order, false to whatever arbitrary order returned from Calendar API
Returns:
the array containing CwTask objects
Throws:
CwException

getNewEvents

public CwEvent[] getNewEvents(java.util.Date beginDate,
                              java.util.Date endDate,
                              boolean bSort)
                       throws CwException
Get new events in workspaces agenda that expect current user's reply and occur within the time range specified.
Parameters:
bSort - specifies that results will be sorted in starttime (ascending)
Returns:
an array containing CwEvent objects Note: 1. The event instances returned may NOT have the specific repeating status set (it could be REPEATING_UNKNOWN). To get the specific status, call getEventByUid()/listEventsByUid() to retrieve it again. 2. Sorting may cost extra in performance.
Throws:
CwException

getRecentActivities

public final CwResourceItem[] getRecentActivities()
                                           throws CwException
Returns a list of recent events.
Overrides:
getRecentActivities in class CwResource
Throws:
CwException

getTaskByUid

public CwTask getTaskByUid(CwUid taskUid)
                    throws CwException
Gets a to-do task in the workspace agenda by its uid.
Parameters:
taskUid - the Uid of the task that needs to be fetched
Returns:
the CwTask object
Throws:
CwException

getWorkspaceEntityOnCalendar

public java.lang.String getWorkspaceEntityOnCalendar()
Returns the mapped workspace entity name on Calendar.

isFreeByRange

public boolean isFreeByRange(CwUser[] users,
                             java.util.Date beginTime,
                             java.util.Date endTime)
                      throws CwException
Returns true if the given users are free within the given time frame.
Parameters:
users - Users to check upon.
beginTime - Begin of the time frame
endTime - End of the time frame
Throws:
CwException

listAllCompletedTasks

public CwTask[] listAllCompletedTasks(boolean bSort)
                               throws CwException
Get all completed tasks in this workspace agenda.
Parameters:
bSort - true specifies that results will be sorted in ascending order of start-time. false specifies that results will not be sorted.
Returns:
An array of completed tasks contained in this resource.
Throws:
CwException
See Also:
listTasksByRange(Date,Date,boolean)

listAllEvents

public CwEvent[] listAllEvents(boolean bSort)
                        throws CwException
Get all events in this workspace agenda.
Parameters:
bSort - true specifies that results will be sorted in ascending order of start-time. false specifies that results will not be sorted.
Returns:
An array of events contained in this resource.
Throws:
CwException
See Also:
listEventsByRange(Date,Date,boolean)

listAllIncompleteTasks

public CwTask[] listAllIncompleteTasks(boolean bSort)
                                throws CwException
Get all incomplete tasks in this workspace agenda.
Parameters:
bSort - true specifies that results will be sorted in ascending order of start-time. false specifies that results will not be sorted.
Returns:
An array of incomplete tasks contained in this resource.
Throws:
CwException
See Also:
listTasksByRange(Date,Date,boolean)

listAllTasks

public CwTask[] listAllTasks(boolean bSort)
                      throws CwException
Get all tasks in this workspace agenda.
Parameters:
bSort - true specifies that results will be sorted in ascending order of start-time. false specifies that results will not be sorted.
Returns:
An array of tasks contained in this resource.
Throws:
CwException
See Also:
listTasksByRange(Date,Date,boolean)

listEventsByRange

public CwEvent[] listEventsByRange(java.util.Date beginDate,
                                   java.util.Date endDate,
                                   boolean bSort)
                            throws CwException
Get events in workspace agenda that occur within the time range specified.
Parameters:
bSort - specifies that results will be sorted in starttime (ascending)
Returns:
an array containing CwEvent objects Note: 1. The event instances returned may NOT have the specific repeating status set (it could be REPEATING_UNKNOWN). To get the specific status, call getEventByUid()/listEventsByUid() to retrieve it again. 2. Sorting may cost extra in performance.
Throws:
CwException

listEventsByUid

public CwResourceBulkResponse listEventsByUid(CwUid[] eventUids)
                                       throws CwException
Gets event instances in the workspace agenda by it UIDs. The event instances returned should have the specific repeating status set (REPEATING_YES/REPEATING_NO).
Returns:
CwResourceBulkResponse which contains all the successful fetched events and possible failed uids and their exceptions.
Throws:
CwException

listItemsByUids

public CwResourceBulkResponse listItemsByUids(CwUid[] uids)
                                       throws CwException
Returns the requested resource items. If some items succeed and some fail, then return two lists--one contains all of the successes and one contains all of the failures. Note that, for some failures the resulting exception can be deciphered to determine which CwUid caused the failure (e.g. CwObjectNotFoundException); for other failures, however, this may not be possible. Therefore, if there is any failure, simply walk the entire list one-by-one to get the full result set. This does, of course, put a burden on the performance in the event of a partial success. In the returned CwResourceBulkReponse: - getSuccessfulItems() returns an array of CwResourceItems that has been successful retrieved. - getFailedUids() returns an array of CwUid instances that failed to be used to retrieve data. - getFailedExceptions() returns the causes of failures.
Specified by:
listItemsByUids in class CwResource
Parameters:
uids - UIDs of the resource items to be retrieved.
Throws:
CwException

listTasksByRange

public CwTask[] listTasksByRange(java.util.Date beginTime,
                                 java.util.Date endTime,
                                 boolean bSort)
                          throws CwException
Get tasks which are active within the time range specified.
Parameters:
beginTime - the begin point of the time range
endTime - the end point of the time range
bSort - specifies that results will be sorted in starttime (ascending)
Returns:
the array containing CwTask objects Note: 1. Sorting may cost extra in performance. 2. Since starttime of task is optional. Those tasks with null starttime will be considered as the earliest.
Throws:
CwException

listTasksByUid

public CwResourceBulkResponse listTasksByUid(CwUid[] taskUids)
                                      throws CwException
Gets to-do tasks in the workspace agenda given the UIDs. The order of the tasks in the returned array may not be same as as requested.
Parameters:
taskUids - the array containing uid of the tasks that need to be fetched
Returns:
CwResourceBulkResponse which contains all the successful fetched tasks and possible failed uids and their exceptions.
Throws:
CwException

Copyright © 2001, 2005, Oracle. All rights reserved.