blackboard.data.announcement
Class Announcement

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

public class Announcement
extends BbObject

The Announcement class is a representation of an announcement within the Blackboard application.

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

Nested Class Summary
static class Announcement.Type
          Enumeration for defining the different kinds of announcement that Blackboard supports.
 
Field Summary
static DataType ANNOUNCEMENT_DATA_TYPE
          Deprecated. Use the constant DATA_TYPE instead
static DataType DATA_TYPE
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
Announcement()
          Creates an instance of Announcement 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 Announcement objects based upon their course Id value.
 Id getAsmtId()
          Deprecated. This field no longer exists as of Bb6 and should not be used.
 FormattedText getBody()
          Returns the body of this Announcement.
 Id getCourseId()
          Returns the course Id to which this Announcement was posted.
 Id getCreatorUserId()
          Returns the creator user Id associated with this Announcement .
 DataType getDataType()
          Returns the DataType identifier for this object.
 boolean getIsPermanent()
          Returns whether this Announcement should always be displayed, regardless of the date it was posted.
 java.util.Calendar getModifiedDate()
          Deprecated.  
 java.util.Calendar getRestrictionEndDate()
          Returns the date up until which this Announcement should be made available for viewing within the user interface.
 java.util.Calendar getRestrictionStartDate()
          Returns the date after which this Announcement should be made available for viewing within the Blackboard application.
 java.lang.String getTitle()
          Returns the title associated with this Announcement.
 Announcement.Type getType()
          Returns the type value associated with this Announcement.
 Id getUserId()
          Deprecated. Has been replaced by the more aptly named getCreatorUserId()
 void setAsmtId(Id iAsmtId)
          Deprecated. This field no longer exists as of Bb6 and should not be used.
 void setBody(FormattedText body)
          Sets the body of this Announcement.
 void setCourseId(Id iCourseId)
          Sets the course Id value for this Announcement.
 void setCreatorUserId(Id iCreatorUserId)
          Sets the creator user Id value for this Announcement.
 void setIsPermanent(boolean bIsPermanent)
          Sets whether this Announcement should always be displayed, regardless of the date it was posted.
 void setModifiedDate(java.util.Calendar cModifiedDate)
          Deprecated.  
 void setRestrictionEndDate(java.util.Calendar cRestrictionEndDate)
          Sets the date up until which this Announcement should be made available for viewing within the user interface.
 void setRestrictionStartDate(java.util.Calendar cRestrictionStartDate)
          Sets the date after which this Announcement should be made available for viewing within the user interface.
 void setTitle(java.lang.String strTitle)
          Sets the title associated with this Announcement.
 void setType(Announcement.Type eType)
          Sets the type value associated with this Announcement.
 void setUserId(Id iUserId)
          Deprecated. Has been replaced by the more aptly named setCreatorUserId(Id).
 void validate()
          Validates the contents of this Announcement.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, persist, setCreatedDate, setId, 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

ANNOUNCEMENT_DATA_TYPE

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

Announcement

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

Method Detail

getModifiedDate

public java.util.Calendar getModifiedDate()
Deprecated. 

In Bb6, schema level changes have caused announcements to no longer have a modified date value. As a result, this method should no longer be used.

Specified by:
getModifiedDate in interface IBbObject
Overrides:
getModifiedDate in class BbObject
Returns:
a Calendar representing the modified date of this BbObject

setModifiedDate

public void setModifiedDate(java.util.Calendar cModifiedDate)
Deprecated. 

In Bb6, schema level changes have caused announcements to no longer have a modified date value. As a result, this method should no longer be used.

Specified by:
setModifiedDate in interface IBbObject
Overrides:
setModifiedDate in class BbObject
Parameters:
cModifiedDate - a Calendar to use for the modified date

getCourseId

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

Returns:
course Id value for this announcement

setCourseId

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

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

getUserId

public Id getUserId()
Deprecated. Has been replaced by the more aptly named 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 the more aptly named 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 Announcement . This value is the Id of the user who created this Announcement.

Returns:
creator user Id value for this announcement

setCreatorUserId

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

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

getAsmtId

public Id getAsmtId()
Deprecated. This field no longer exists as of Bb6 and should not be used.

This field no longer exists as of Bb6 and should not be used.


setAsmtId

public void setAsmtId(Id iAsmtId)
Deprecated. This field no longer exists as of Bb6 and should not be used.

This field no longer exists as of Bb6 and should not be used.


getIsPermanent

public boolean getIsPermanent()
Returns whether this Announcement should always be displayed, regardless of the date it was posted.

Returns:
true if this announcement should always be displayed, false otherwise

setIsPermanent

public void setIsPermanent(boolean bIsPermanent)
Sets whether this Announcement should always be displayed, regardless of the date it was posted.

Parameters:
bIsPermanent - true is this announcement should alwyas be displayed, false otherwise

getTitle

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

Returns:
the title value of this announcement as a String

setTitle

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

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

getBody

public FormattedText getBody()
Returns the body of this Announcement.

Returns:
a {FormattedText} representing the body of this announcement

setBody

public void setBody(FormattedText body)
Sets the body of this Announcement.

Parameters:
body - a FormattedText containing the body of this announcement

getRestrictionStartDate

public java.util.Calendar getRestrictionStartDate()
Returns the date after which this Announcement should be made available for viewing within the Blackboard application.

Returns:
a Calendar representing the date after which this announcement should be made available for viewing
See Also:
getRestrictionEndDate()

setRestrictionStartDate

public void setRestrictionStartDate(java.util.Calendar cRestrictionStartDate)
Sets the date after which this Announcement should be made available for viewing within the user interface.

Parameters:
cRestrictionStartDate - a Calendar to use for the date after which this announcement should be available for viewing
See Also:
setRestrictionEndDate(Calendar)

getRestrictionEndDate

public java.util.Calendar getRestrictionEndDate()
Returns the date up until which this Announcement should be made available for viewing within the user interface.

Returns:
a Calendar representing the date up until which this announcement should be made available for viewing
See Also:
getRestrictionStartDate()

setRestrictionEndDate

public void setRestrictionEndDate(java.util.Calendar cRestrictionEndDate)
Sets the date up until which this Announcement should be made available for viewing within the user interface.

Parameters:
cRestrictionEndDate - a Calendar to use for the date up until which this announcement should be available for viewing
See Also:
setRestrictionStartDate(Calendar)

getType

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

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

setType

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

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

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 Announcement. 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 Announcement objects based upon their course Id value. Should be used with BbList.Iterator.

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


Copyright © 2003 Blackboard, Inc. All Rights Reserved.