blackboard.data.content
Class ContentStatus

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

public class ContentStatus
extends BbObject

The ContentStatus object wraps the state of a user's interaction with a given piece of content and adaptive release status.

It is not a persistent object in the ordinary sense; it is loaded from the database, but combines information derived from different sources. With this in mind, one cannot "save" a ContentStatus object.


Field Summary
static DataType DATA_TYPE
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
ContentStatus()
          Default constructor.
 
Method Summary
 Id getContentId()
          Returns the content id that this status is attached to
 DataType getDataType()
          Returns the DataType identifier for the given BbObject-derived object.
 CourseMembership getMembership()
          Returns the membership associated with this status.
 boolean getPassesRule()
          Returns whether the user associated with this status object passes the adaptive release rules that are attached to the associated content object.
 boolean getReviewed()
          Returns whether the item has been reviewed.
 java.util.Calendar getReviewedDate()
          Returns the date the user reviewed this item.
 User getUser()
          Returns the user associated with this status.
 Id getUserId()
          The id of the user this status is for.
 void setContentId(Id contentId)
          Method used by the framework when setting review status.
 void setReviewedDate(java.util.Calendar cal)
          Method used by framework when setting review date.
 void setUserId(Id userId)
          Method used by the framework when setting review status.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DATA_TYPE

public static DataType DATA_TYPE
Constructor Detail

ContentStatus

public ContentStatus()
Default constructor. This method is public because of requirements in the persistence framework. Instantiating on object in this way is not very useful, since the data cannot be persisted.

If you need to access status for a particular piece of content, use ContentDbLoader or ContentStatusDbLoader

Method Detail

getDataType

public DataType getDataType()
Description copied from class: BbObject
Returns the DataType identifier for the given BbObject-derived object. Can be used to uniquely identify the "type" of a data object.

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

getReviewedDate

public java.util.Calendar getReviewedDate()
Returns the date the user reviewed this item.

Returns:
Review date. Null if the user has not reviewed it.

setReviewedDate

public void setReviewedDate(java.util.Calendar cal)
Method used by framework when setting review date.

Parameters:
userId -

getUserId

public Id getUserId()
The id of the user this status is for. This value may be unset, even if loaded with a specific user id. That indicates that there is no "review" record for the user.

Returns:
Id of the user. May be unset.

setUserId

public void setUserId(Id userId)
Method used by the framework when setting review status.

Parameters:
userId -

getUser

public User getUser()
Returns the user associated with this status. This attribute is only set by specific methods that load "heavy", including ContentStatusDbLoader.loadByContentId(). See specific method documentation to see which attributes of the user object are set.

Returns:
User object. null if heavy load was not used.

getMembership

public CourseMembership getMembership()
Returns the membership associated with this status. This attribute is only set by specific methods that load "heavy", including ContentStatusDbLoader.loadByContentId(). See specific method documentation to see which attributes of the membership object are set.

Returns:
Membership object. null if heavy load was not used.

getContentId

public Id getContentId()
Returns the content id that this status is attached to

Returns:
Content id

setContentId

public void setContentId(Id contentId)
Method used by the framework when setting review status.

Parameters:
userId -

getPassesRule

public boolean getPassesRule()
Returns whether the user associated with this status object passes the adaptive release rules that are attached to the associated content object.

Returns:
True if the user passes any of the rules.

getReviewed

public boolean getReviewed()
Returns whether the item has been reviewed. Basically it's equivalent to getReviewedDate() != null

Returns:


Copyright © 2003 Blackboard, Inc. All Rights Reserved.