blackboard.data.calendar
Class CalendarEntry

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.calendar.CalendarEntry
All Implemented Interfaces:
IBbObject, java.lang.Cloneable

public class CalendarEntry
extends BbObject

The CalendarEntry class provides a means for defining an event (system, course, or personal) within the Blackboard application.

Since:
Bb 5.5
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Nested Class Summary
static class CalendarEntry.Type
          Enumeration of the types of calendar events supported by the Blackboard Calendar tool.
 
Field Summary
static DataType CALENDAR_ENTRY_DATA_TYPE
          Deprecated. Use the constant DATA_TYPE instead
static DataType DATA_TYPE
          Constant used to identify data type
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
CalendarEntry()
          Creates an instance of CalendarEntry with default property values.
 
Method Summary
static ListFilter createCourseIdFilter(Id targetCourseId)
          Factory method to create an instance of the ListFilter interface capable of filtering a list of CalendarEntry objects based upon their course Id value.
static ListFilter createTypeFilter(CalendarEntry.Type type)
          Factory method to create an instance of the ListFilter interface capable of filtering a list of CalendarEntry objects based upon their CalendarEntry.Type value.
 Id getCourseId()
          Returns the course Id to which this CalendarEntry was posted.
 Id getCreatorUserId()
          Returns the creator user Id associated with this CalendarEntry .
 DataType getDataType()
          Returns the DataType identifier for this object.
 FormattedText getDescription()
          Returns the description of this CalendarEntry.
 java.util.Calendar getEndDate()
          Returns the date on which this CalendarEntry will/has end(ed).
 java.util.Calendar getStartDate()
          Returns the date on which this CalendarEntry will/has start(ed).
 java.lang.String getTitle()
          Returns the title associated with this CalendarEntry.
 CalendarEntry.Type getType()
          Returns the type value associated with this CalendarEntry.
 Id getUserId()
          Deprecated. has been replaced by getCreatorUserId().
 void setCourseId(Id iCourseId)
          Sets the course Id value for this CalendarEntry.
 void setCreatorUserId(Id iCreatorUserId)
          Sets the creator user Id value for this CalendarEntry .
 void setDescription(FormattedText desc)
          Sets the description of this CalendarEntry.
 void setEndDate(java.util.Calendar cEndDate)
          Sets the end date for this CalendarEntry.
 void setStartDate(java.util.Calendar cStartDate)
          Sets the start date for this CalendarEntry.
 void setTitle(java.lang.String strTitle)
          Sets the title associated with this CalendarEntry.
 void setType(CalendarEntry.Type eType)
          Sets the type value associated with this CalendarEntry.
 void setUserId(Id iUserId)
          Deprecated. has been replaced by setCreatorUserId(Id).
 void validate()
          Validates the contents of this CalendarEntry.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TYPE

public static final DataType DATA_TYPE
Constant used to identify data type


CALENDAR_ENTRY_DATA_TYPE

public static final DataType CALENDAR_ENTRY_DATA_TYPE
Deprecated. Use the constant DATA_TYPE instead
Constructor Detail

CalendarEntry

public CalendarEntry()
Creates an instance of CalendarEntry with default property values.

Method Detail

getUserId

public Id getUserId()
Deprecated. has been replaced by getCreatorUserId().

This method has been replaced by the more aptly named getCreatorUserId().

In its deprecated state, this method passes through to getCreatorUserId().


setUserId

public void setUserId(Id iUserId)
Deprecated. has been replaced by setCreatorUserId(Id).

This method has been replaced by the more aptly named setCreatorUserId(Id).

In its deprecated state, this method passes through to setCreatorUserId(Id).


getCreatorUserId

public Id getCreatorUserId()
Returns the creator user Id associated with this CalendarEntry . This value is the Id of the user who created this CalendarEntry.

Returns:
creator user Id value for this calendar entry

setCreatorUserId

public void setCreatorUserId(Id iCreatorUserId)
Sets the creator user Id value for this CalendarEntry . This value is the Id of the user who created this CalendarEntry.

A CalendarEntry has to be created by someone. As a result this is a required field.

Parameters:
iCreatorUserId - the creator user Id value to use for this calendar entry

getCourseId

public Id getCourseId()
Returns the course Id to which this CalendarEntry was posted.

Returns:
course Id value for this calendar

setCourseId

public void setCourseId(Id iCourseId)
Sets the course Id value for this CalendarEntry. This value should only be set to a valid course id if this calendar entry is a "course" calendar entry (i.e., the value set in setType(CalendarEntry.Type) is CalendarEntry.Type.COURSE). For all other types of calendar entries this value should be Id.UNSET_ID.

Parameters:
iCourseId - the course Id value to use for this calendar

getType

public CalendarEntry.Type getType()
Returns the type value associated with this CalendarEntry.

Returns:
a type value as defined in CalendarEntry.Type
See Also:
CalendarEntry.Type

setType

public void setType(CalendarEntry.Type eType)
Sets the type value associated with this CalendarEntry.

Parameters:
eType - a valid type value as defined in CalendarEntry.Type
See Also:
CalendarEntry.Type

getStartDate

public java.util.Calendar getStartDate()
Returns the date on which this CalendarEntry will/has start(ed). The default value for this field is the date this object was created, rounded to the next whole hour.

Returns:
a Calendar representing the start date of this calendar entry

setStartDate

public void setStartDate(java.util.Calendar cStartDate)
Sets the start date for this CalendarEntry. Start date is a required field and must be provided. This fields defaults to a valid value (see getStartDate()).

Parameters:
cStartDate - a Calendar to use for the start date

getEndDate

public java.util.Calendar getEndDate()
Returns the date on which this CalendarEntry will/has end(ed). The default value for this field is the start date (see getStartDate()) plus one hour.

Returns:
a Calendar representing the end date of this calendar entry

setEndDate

public void setEndDate(java.util.Calendar cEndDate)
Sets the end date for this CalendarEntry. End date is a required field and must be provided. This fields defaults to a valid value (see getEndDate()).

Parameters:
cEndDate - a Calendar to use for the end date

getTitle

public java.lang.String getTitle()
Returns the title associated with this CalendarEntry.

Returns:
the title value of this calendar as a String

setTitle

public void setTitle(java.lang.String strTitle)
Sets the title associated with this CalendarEntry.

Parameters:
strTitle - a String containing the title for this calendar

getDescription

public FormattedText getDescription()
Returns the description of this CalendarEntry.

Returns:
a {FormattedText} representing the description of this calendar

setDescription

public void setDescription(FormattedText desc)
Sets the description of this CalendarEntry.

Parameters:
desc - a FormattedText containing the description of this calendar

getDataType

public DataType getDataType()
Returns the DataType identifier for this object. Can be used to uniquely identify the "type" of this data object.

Specified by:
getDataType in interface IBbObject
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object

validate

public void validate()
              throws ValidationException
Validates the contents of this CalendarEntry. Internal consistency checks are also performed.

Specified by:
validate in interface IBbObject
Overrides:
validate in class BbObject
Throws:
ValidationException - if validation of this object fails

createCourseIdFilter

public static final ListFilter createCourseIdFilter(Id targetCourseId)
Factory method to create an instance of the ListFilter interface capable of filtering a list of CalendarEntry objects based upon their course Id value. Should be used with BbList.Iterator.

Parameters:
targetCourseId - the Id of the course for which CalendarEntries should be returned. CalendarEntries belonging to the given course (identified by Id) will be returned.
Returns:
a ListFilter instance that can filter on course Id

createTypeFilter

public static final ListFilter createTypeFilter(CalendarEntry.Type type)
Factory method to create an instance of the ListFilter interface capable of filtering a list of CalendarEntry objects based upon their CalendarEntry.Type value. Should be used with BbList.Iterator.

Parameters:
type - the CalendarEntry.Type for which CalendarEntries should be returned.
Returns:
a ListFilter instance that can filter on the calendar type


Copyright © 2003 Blackboard, Inc. All Rights Reserved.