blackboard.data.content
Class Content

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.content.Content
All Implemented Interfaces:
Available, HasExtendedData, IBbObject, Identifiable, Positionable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
ContentFileRef, ContentFolder, CourseDocument, CourseLink, ExternalLink

public class Content
extends BbObject
implements Available, Positionable, HasExtendedData

The Content class is the root of the content class hierarchy. All content objects have Content as a superclass. This object contains the attributes shared by all pieces of content.

Programmatically, Content is the data object that is stored in specific areas of the course. It does not include "tool" data, such as Announcements, Calendar Entries, or Discussion Board postings.

The built-in content types supported by the system (as identified in the user interface) include Documents, Folders, Lessons, and Files.

Since:
Bb 6.0
See Also:
Serialized Form

Nested Class Summary
static class Content.ContentView
          Defines the intended Default Content View set for this Course.
static class Content.RenderType
          Class to encapsulate the hints used by the renderers.
 
Field Summary
static java.lang.String COURSELINK_HANDLER
           
static DataType DATA_TYPE
           
static java.lang.String ICON_URL
           
static java.lang.String RESOURCE_BUNDLE
          Resource bundle for this data object *
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Fields inherited from interface blackboard.data.Positionable
POS_UNDEFINED
 
Constructor Summary
Content()
          Default constructor.
 
Method Summary
 void addContentFile(ContentFile cf)
          Adds a the specified ContentFile as an attachment to this object.
 boolean getAllowGuests()
          Returns the allow guests flag for this piece of Content.
 boolean getAllowObservers()
          Returns the allow observers flag for this piece of Content.
 FormattedText getBody()
          Returns the body of this object as a FormattedText object without any pre 9.0 assignment internal artifact
 BbList<ContentFile> getContentFiles()
           
 java.lang.String getContentHandler()
          Returns the Content Handler handle associated with this content object.
 ContentStatus getContentStatus()
          Returns the ContentStatus for this content item.
 Id getCourseId()
          Returns the course Id associated with this piece of Content.
 DataType getDataType()
          Returns the DataType identifier for this object.
 java.util.Calendar getEndDate()
          Returns the last date this content object will be available to students.
 ExtendedData getExtendedData()
          Retrieves the ExtendedData object for this entity.
 blackboard.platform.gradebook2.GradableItem getGradebookItem()
           
 boolean getIsAvailable()
          Returns whether the piece of Content is available.
 boolean getIsDescribed()
          Returns whether this Content contains meta-data.
 boolean getIsFolder()
          Returns whether this piece of Content should be treated as a folder of content, or as an actual content piece itself.
 boolean getIsFromCartridge()
          Returns whether this piece of TrackedContent came from a course cartridge.
 boolean getIsGroupContent()
          Returns whether the piece of Content is a content associated with a course group.
 boolean getIsLesson()
          Returns whether the underlying content represents a lesson.
 boolean getIsReviewable()
          Returns whether this piece of Content is presently set for review.
 boolean getIsSampleContent()
          Indicates whether the object is a piece of sample content that was imported as part of a course structure.
 boolean getIsSequential()
          Indicates whether the object is a Lesson that requires its contents to be displayed in a sequential fashion.
 boolean getIsTracked()
          Returns whether this piece of TrackedContent is presently set for access tracking.
 boolean getLaunchInNewWindow()
          Indicates whether a link for this object should be launched in a new window.
 java.lang.String getLinkRef()
          Returns the optional LinkRef associated with this Content.
 java.lang.String getLinkTargetIconUrl()
          Return the icon url of the linked item either from cache or database in case this is a course link.
 java.lang.String getOfflineName()
          Returns the offline name associated with this Content.
 java.lang.String getOfflinePath()
          Returns the offline path associated with this Content.
 Id getParentId()
          Returns the parent Id associated with this piece of Content.
 java.lang.String getPersistentTitle()
          Returns the persistent title associated with this piece of Content.
 int getPosition()
          Returns the position of this piece of Content within its parent content item (folder).
 BbList<Id> getRemovedFiles()
           
 Content.RenderType getRenderType()
          Returns the RenderType for this piece of content.
 java.util.Calendar getStartDate()
          Returns the Calendar that indicates the first date this object is to be made available in the student view of a course.
 java.lang.String getTitle()
          Returns the title associated with this piece of Content.
 java.lang.String getTitleColor()
          Returns the title color associated with this piece of Content.
 java.lang.String getUrl()
          Returns the URL associated with this ExternalLink.
 java.lang.String getUrlHost()
          Returns the hostname from the URL associated with this item.
 Content.ContentView getViewMode()
          Returns the ViewMode associated with this Content.
 void printTree()
          printTree
 void removeContentFile(ContentFile cf)
          Removes the specified ContentFile object from this content object.
 void removeContentFile(Id id)
          Removes the specified ContentFile object from this object.
static java.lang.String removeInternalArtifacts(java.lang.String bodyText)
           
 void setAllowGuests(boolean bAllowGuests)
          Sets the allow guests flag for this piece of Content.
 void setAllowObservers(boolean bAllowObservers)
          Sets the allow observers flag for this piece of Content.
 void setBody(FormattedText text)
          Sets the body of this object as a FormattedText object.
 void setContentHandler(java.lang.String handler)
          Sets the content handler for this content object.
 void setContentStatus(ContentStatus status)
          Sets the content status for this item (only used for display purposes will not be persisted by ContentDbPersister)
 void setCourseId(Id iCourseId)
          Sets the course Id value for this piece of Content.
 void setEndDate(java.util.Calendar cal)
          Sets the last date this object will be available to students.
 void setExtendedData(ExtendedData ed)
          Sets the ExtendedData element for this entity.
 void setIsAvailable(boolean bIsAvailable)
          Sets whether this piece of Content is available.
 void setIsDescribed(boolean bIsDescribed)
          Sets whether this Content contains meta-data.
 void setIsFolder(boolean isFolder)
          Sets whether this piece of Content should be treated as a folder of content, or as an actual content piece itself.
 void setIsFromCartridge(boolean bIsFromCartridge)
          Sets whether this piece of TrackedContent came from a course cartridge.
 void setIsGroupContent(boolean bIsGroupContent)
          Sets whether this piece of Content is a content associated with a course group.
 void setIsLesson(boolean isLesson)
          Sets whether the underlying content represents a lesson.
 void setIsReviewable(boolean bIsReviewable)
          Sets whether this piece of Content should be set for review.
 void setIsSampleContent(boolean sampleContent)
          Sets whether the object is a piece of sample content that was imported as part of a course structure.
 void setIsSequential(boolean sequential)
          Sets whether the object is a Lesson that requires its contents to be displayed in a sequential fashion.
 void setIsTracked(boolean bIsTracked)
          Sets whether this piece of TrackedContent should be set for access tracking.
 void setLaunchInNewWindow(boolean newWindow)
          Sets whether a link for this object should be launched in a new window.
 void setLinkRef(java.lang.String strLinkRef)
          Sets the optional LinkRef associated with this Content.
 void setOfflineName(java.lang.String strOfflineName)
          Sets the offline name associated with this Content.
 void setOfflinePath(java.lang.String strOfflinePath)
          Sets the offline path associated with this Content.
 void setParentId(Id iParentId)
          Sets the parent Id value for this piece of Content.
 void setPosition(int nPos)
          Sets the position of this piece of Content within its parent content item (folder).
 void setRenderType(Content.RenderType eRenderType)
          Sets the RenderType for this piece of content.
 void setStartDate(java.util.Calendar cal)
          Sets the first date that this content object will be available to students.
 void setTitle(java.lang.String strTitle)
          Sets the title associated with this piece of Content.
 void setTitleColor(java.lang.String strTitleColor)
          Sets the title color associated with this piece of Content.
 void setUrl(java.lang.String strUrl)
          Sets the URL associated with this ExternalLink.
 void setViewMode(Content.ContentView eViewContent)
          Sets the ViewMode associated with this Content.
static void traverseContent(ContentVisitor visitor, Content item)
          Recursively traverses folders and content according to the visitor pattern.
 void validate()
          Validates the contents of this Content.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, matches, 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

RESOURCE_BUNDLE

public static final java.lang.String RESOURCE_BUNDLE
Resource bundle for this data object *

See Also:
Constant Field Values

ICON_URL

public static final java.lang.String ICON_URL
See Also:
Constant Field Values

COURSELINK_HANDLER

public static final java.lang.String COURSELINK_HANDLER
See Also:
Constant Field Values
Constructor Detail

Content

public Content()
Default constructor. Creates an empty Content. Various sub-classes of this object will over-ride the default attributes in this object.

An object returned from this constructor cannot be persisted without calling setCourseId(Id). However, most of the other attributes should be set in order for the object to be properly used in a course.

To make a Content object appear in a specific location, you must either explicitly add it to an already existing Aggregate (such as ContentFolder or Lesson), or you must persist the object and associate it with a CourseToc object.

Method Detail

getCourseId

public Id getCourseId()
Returns the course Id associated with this piece of Content.

Returns:
course Id value for this piece of content

setCourseId

public void setCourseId(Id iCourseId)
Sets the course Id value for this piece of Content. This id must come from a course that already exists, otherwise any attempt to persist this object will fail.

Parameters:
iCourseId - the course Id value to use for this piece of content

getParentId

public Id getParentId()
Returns the parent Id associated with this piece of Content. If the Id returned is not set (see Id.isSet() then this piece of content has no parent.

Returns:
course Id value for this piece of content

setParentId

public void setParentId(Id iParentId)
Sets the parent Id value for this piece of Content. This is typically called when this object is added to an Aggregate object, such as ContentFolder.

The object referenced by iParentId must already exist, otherwise problems may occur when attempting to persist this object.

Parameters:
iParentId - the parent Id value to use for this piece of content

getPersistentTitle

public java.lang.String getPersistentTitle()
Returns the persistent title associated with this piece of Content.

Returns:
the title value of this piece of content as a String

getTitle

public java.lang.String getTitle()
Returns the title associated with this piece of Content.

Returns:
the title value of this piece of content as a String

setTitle

public void setTitle(java.lang.String strTitle)
Sets the title associated with this piece of Content. This attribute can not exceed 333 characters.

Parameters:
strTitle - a String containing the title for this piece of content

getBody

public FormattedText getBody()
Returns the body of this object as a FormattedText object without any pre 9.0 assignment internal artifact

Returns:
body of this object as a FormattedText object.

setBody

public void setBody(FormattedText text)
Sets the body of this object as a FormattedText object. There is no limit for the text component's size.

Parameters:
text - the text to set.

getTitleColor

public java.lang.String getTitleColor()
Returns the title color associated with this piece of Content. Color values should by a RGB color value as used in HTML pages (#RRGGBB -- for example, #000000 will display black).

Returns:
the title color value for this piece of content as a String

setTitleColor

public void setTitleColor(java.lang.String strTitleColor)
Sets the title color associated with this piece of Content. This value can not exceed 10 characters.

Parameters:
strTitleColor - a String containing the title color for this piece of content. The color value should by a RGB color value as used in HTML pages (#RRGGBB -- for example, #000000 will display black).

getIsAvailable

public boolean getIsAvailable()
Returns whether the piece of Content is available.

Specified by:
getIsAvailable in interface Available
Returns:
true if this piece of content is available, false otherwise

setIsAvailable

public void setIsAvailable(boolean bIsAvailable)
Sets whether this piece of Content is available. (Setting with bIsAvailable=true will also set the sample_content_ind to false)

Specified by:
setIsAvailable in interface Available
Parameters:
bIsAvailable - true if this piece of content is available, false otherwise

setIsGroupContent

public void setIsGroupContent(boolean bIsGroupContent)
Sets whether this piece of Content is a content associated with a course group.

Parameters:
bIsGroupContent - true if this piece of content is available, false otherwise

getIsGroupContent

public boolean getIsGroupContent()
Returns whether the piece of Content is a content associated with a course group.

Returns:
true if this piece of content is a course group content, false otherwise

getViewMode

public Content.ContentView getViewMode()
Returns the ViewMode associated with this Content.

Returns:
the ViewMode of this course document as a Content.ContentView

setViewMode

public void setViewMode(Content.ContentView eViewContent)
Sets the ViewMode associated with this Content.

Parameters:
eViewContent - the view mode value for this course document

getIsFromCartridge

public boolean getIsFromCartridge()
Returns whether this piece of TrackedContent came from a course cartridge.

Returns:
true if this piece of content came from a cartridge, false otherwise

setIsFromCartridge

public void setIsFromCartridge(boolean bIsFromCartridge)
Sets whether this piece of TrackedContent came from a course cartridge. (and more specifically - if it is protected/authorized content that should not be published/exported/etc.

Parameters:
bIsFromCartridge - true if this piece of content came from a cartridge, false otherwise

getIsTracked

public boolean getIsTracked()
Returns whether this piece of TrackedContent is presently set for access tracking.

Returns:
true if this piece of content is setting for tracking, false otherwise

setIsTracked

public void setIsTracked(boolean bIsTracked)
Sets whether this piece of TrackedContent should be set for access tracking.

Parameters:
bIsTracked - true if access to this piece of content should be tracked, false otherwise

getIsReviewable

public boolean getIsReviewable()
Returns whether this piece of Content is presently set for review.

Returns:
true if this piece of content can be reviewed, false otherwise

setIsReviewable

public void setIsReviewable(boolean bIsReviewable)
Sets whether this piece of Content should be set for review.

Parameters:
bIsReviewable - true if this piece of content can be reviewed, false otherwise

getIsDescribed

public boolean getIsDescribed()
Returns whether this Content contains meta-data.

Returns:
true if this course document has metadata, false otherwise

setIsDescribed

public void setIsDescribed(boolean bIsDescribed)
Sets whether this Content contains meta-data.

Parameters:
bIsDescribed - true if this course document has associated meta-data, false otherwise

getOfflineName

public java.lang.String getOfflineName()
Returns the offline name associated with this Content.

Returns:
the offline name of this course document as a String

setOfflineName

public void setOfflineName(java.lang.String strOfflineName)
Sets the offline name associated with this Content.

Parameters:
strOfflineName - a String containing the offline name value for this course document

getOfflinePath

public java.lang.String getOfflinePath()
Returns the offline path associated with this Content.

Returns:
the offline path of this course document as a String

setOfflinePath

public void setOfflinePath(java.lang.String strOfflinePath)
Sets the offline path associated with this Content.

Parameters:
strOfflinePath - a String containing the offline path value for this course document

getPosition

public int getPosition()
Returns the position of this piece of Content within its parent content item (folder). This position should be used when displaying content at the same level (parent-child wise) relative to each other. Position values are zero-based (the first element has a position value of zero, not one).

A value of -1 indicates the new content item will be appended to the end of the list of items in the current folder.

Specified by:
getPosition in interface Positionable
Returns:
the position of this piece of content within its current context. If this value has not been set or is unknown its value will be Positionable.POS_UNDEFINED.

setPosition

public void setPosition(int nPos)
Sets the position of this piece of Content within its parent content item (folder). Position values are zero-based (the first element has a position value of zero, not one).

The default value is -1, which indicates the new content item will be appended to the end of the list of items in the current folder.

Specified by:
setPosition in interface Positionable
Parameters:
nPos - the new position value of this piece of content. This value should be a positive value.

getIsFolder

public boolean getIsFolder()
Returns whether this piece of Content should be treated as a folder of content, or as an actual content piece itself.

Returns:
true if this piece of content should be treated as a folder, false otherwise

setIsFolder

public void setIsFolder(boolean isFolder)
Sets whether this piece of Content should be treated as a folder of content, or as an actual content piece itself. Most content sub- classes will set this attribute automatically. Manually setting this attribute should only be done when the final type of the content object is not known when the object is instantiated.

Parameters:
isFolder - indicate whether to treat this object as a folder.

getIsLesson

public boolean getIsLesson()
Returns whether the underlying content represents a lesson. This attribute should only be set by sub-classes of Content.

Returns:
true if the object is a Lesson

setIsLesson

public void setIsLesson(boolean isLesson)
Sets whether the underlying content represents a lesson. This attribute should only be set by sub-classes of Content.

Parameters:
isLesson - true if the object is a Lesson

getIsSequential

public boolean getIsSequential()
Indicates whether the object is a Lesson that requires its contents to be displayed in a sequential fashion.

Returns:
true if the object requires its contents displayed in linear order.

setIsSequential

public void setIsSequential(boolean sequential)
Sets whether the object is a Lesson that requires its contents to be displayed in a sequential fashion. This property is typically set by specific sub-classes.

Parameters:
sequential - if true, the contents should be displayed in a linear order.

getLaunchInNewWindow

public boolean getLaunchInNewWindow()
Indicates whether a link for this object should be launched in a new window. This is typically only used by specific sub-classes of content.

Returns:
true if the object is meant to be displayed in a new rendering context (window)

setLaunchInNewWindow

public void setLaunchInNewWindow(boolean newWindow)
Sets whether a link for this object should be launched in a new window. This is typically only used by specific sub-classes of content.

Parameters:
newWindow - true if the object is meant to be displayed in a new rendering context (window)

getUrl

public java.lang.String getUrl()
Returns the URL associated with this ExternalLink.

Returns:
the URL value of this external link as a String

getUrlHost

public java.lang.String getUrlHost()
Returns the hostname from the URL associated with this item.

Returns:
The hostname from the URL.

setUrl

public void setUrl(java.lang.String strUrl)
Sets the URL associated with this ExternalLink. This field cannot exceed 1024 characters. Additionally, it is not required to conform to URL syntax, and is not double checked for "live" links.

Parameters:
strUrl - a String containing the URL for this external link

getAllowGuests

public boolean getAllowGuests()
Returns the allow guests flag for this piece of Content. This flag determines whether or not "guests" (users with the role guest) are allowed access to this piece of content.

Returns:
a boolean denoting whether guests should be allowed access to this piece of content

setAllowGuests

public void setAllowGuests(boolean bAllowGuests)
Sets the allow guests flag for this piece of Content. This flag determines whether or not "guests" (users with the role guest) are allowed access to this piece of content.

Parameters:
bAllowGuests - true if guests should be allowed to this piece of content, false otherwise

getAllowObservers

public boolean getAllowObservers()
Returns the allow observers flag for this piece of Content. This flag determines whether or not "observers" (parents of a student in a course for example) are allowed access to this piece of content.

Returns:
a boolean denoting whether observers should be allowed access to this piece of content

setAllowObservers

public void setAllowObservers(boolean bAllowObservers)
Sets the allow observers flag for this piece of Content. This flag determines whether or not "observers" (parents of a student in a course for example) are allowed access to this piece of content.

Parameters:
bAllowObservers - true if observers should be allowed access to the this piece of content, false otherwise

getStartDate

public java.util.Calendar getStartDate()
Returns the Calendar that indicates the first date this object is to be made available in the student view of a course.

Note: the database's precision may affect the value retrieved from the database. Some databases store date/time values with precision only to the second, others store it to the millisecond.

Returns:
Calendar object. If this is a new object, or the value was never set, null will be returned.

setStartDate

public void setStartDate(java.util.Calendar cal)
Sets the first date that this content object will be available to students. No constraint checking is performed against the start date or end date, so care should be taken when setting this parameter.

Note: the database's precision may affect the value stored in the database. Some databases store date/time values with precision only to the second, others store it to the millisecond.

Parameters:
cal - Calendar object.

getEndDate

public java.util.Calendar getEndDate()
Returns the last date this content object will be available to students.

Note: the database's precision may affect the value retrieved from the database. Some databases store date/time values with precision only to the second, others store it to the millisecond.

Returns:
Calendar entry. If this attribute was never set, null will be returned.

setEndDate

public void setEndDate(java.util.Calendar cal)
Sets the last date this object will be available to students. No constraint checking is performed against the start date or end date, so care should be taken when setting this parameter.

Note: the database's precision may affect the value stored in the database. Some databases store date/time values with precision only to the second, others store it to the millisecond.

Parameters:
cal - final date

getRenderType

public Content.RenderType getRenderType()
Returns the RenderType for this piece of content. This property should be treated as a readonly property - it is typically determined by the actual content type.

Returns:
a render type value as defined in Content.RenderType

setRenderType

public void setRenderType(Content.RenderType eRenderType)
Sets the RenderType for this piece of content. Since the value of this property is determined by the actual content type, it should be treated as a read only property as changing it value to an improper one could cause rendering issues.

Parameters:
eRenderType - a valid type value as defined in Content.RenderType

getContentHandler

public java.lang.String getContentHandler()
Returns the Content Handler handle associated with this content object. These handles are used to determine the underlying object class when the object is loaded from the database. There are several built-in handles, in addition to handles that may be installed by a system extension.

Note that a particular content handler does not have to exist on a system for the handle to be associated with content. This is to allow content that was authored with a system extension to be moved to another system that may not have that extension. If the extension is loaded at a later date, it will automatically be associated any content with it's handle.

Content in 6.0 will always contain rendering data for an object, so that any content objects that require a custom content handler may be displayed on the target system (in the instructor view) but not edited. However, because of potential run-time requirements, the content will not be visible for student view, however. For example, if the content's display data references a Java applet that is part of the system extension.

Returns:
String-based handle. Note that the handles look like MIME types, but have Blackboard-specific meanings.

setContentHandler

public void setContentHandler(java.lang.String handler)
Sets the content handler for this content object. This property should typically be set either by Content subclasses or by business logic (such as import/export) that needs to ensure the content data is associated with a specific handler. System extensions, however, will set this to ensure that content is handled (created, modified) by the code installed with the system extension.

This does not have to reference a handler that exists on the system. This field cannot exceed 64 characters. By convention, the string conforms to a syntax similar to MIME types. Blackboard has the following content handlers built-in:

Note that these strings are available in the ContentHandlerInfo enum.

Parameters:
handler - handle string. The corresponding content handler does not have to exist on the system. This parameter should not exceed 64 characters.

getContentStatus

public ContentStatus getContentStatus()
Returns the ContentStatus for this content item.

Returns:
ContentStatus object.

setContentStatus

public void setContentStatus(ContentStatus status)
Sets the content status for this item (only used for display purposes will not be persisted by ContentDbPersister)


getLinkRef

public java.lang.String getLinkRef()
Returns the optional LinkRef associated with this Content.

Returns:
the Link Ref value as a String

setLinkRef

public void setLinkRef(java.lang.String strLinkRef)
Sets the optional LinkRef associated with this Content. This field cannot exceed 255 characters. This is used for a building block providers to set an identifying string on content they create that they can tie back to data on their end.

Parameters:
strLinkRef - a String containing the LinkRef reference string

getLinkTargetIconUrl

public java.lang.String getLinkTargetIconUrl()
Return the icon url of the linked item either from cache or database in case this is a course link. If the icon url is retrieved from database, it will be cached unless the linked item is another course link.

Returns:
the icon url if this content is course link.

getExtendedData

public ExtendedData getExtendedData()
Retrieves the ExtendedData object for this entity. Extended data is a simple mechanism for storing an arbitrary set of "properties" for an entity. It can be used to store properties without extending an object's data model or resorting to additional schema.

Care should be taken to use this capability wisely. There is a balance between the convenience of using this capability for a new value versus the drawbacks of a generally opaque and untyped container for values.

The use of extended data should not "leak" into business logic code. Instead, extended data use should be completely wrapped by a bean object that controls access to the data values in extended data. See ExtendedData for more information.

Specified by:
getExtendedData in interface HasExtendedData
Returns:
the ExtendedData value contained within this entity. This value will never be null. If a null value has been set for this object a new (empty) extended data value will be returned.

setExtendedData

public void setExtendedData(ExtendedData ed)
Description copied from interface: HasExtendedData
Sets the ExtendedData element for this entity. It should not normally be necessary to set the extended data value directly. Instead, you should retrieve the existing value and then set any necessary value(s) on it. Setting extended data via this method may override existing values.

Specified by:
setExtendedData in interface HasExtendedData
Parameters:
ed - the ExtendedData value to set

getIsSampleContent

public boolean getIsSampleContent()
Indicates whether the object is a piece of sample content that was imported as part of a course structure.

Returns:
true if the object was originally imported via a course structure

setIsSampleContent

public void setIsSampleContent(boolean sampleContent)
Sets whether the object is a piece of sample content that was imported as part of a course structure. This should ONLY be called from within the import-course-structure use cases

Parameters:
sampleContent - if true, the object will be displayed with an additional css to differentiate it

addContentFile

public void addContentFile(ContentFile cf)
Adds a the specified ContentFile as an attachment to this object. Note that in the UI, only Content objects and ContentFileRef objects require attachments.

The attachments are used solely for rendering. If a Content object has associated files for storing data, etc., but do not require those files to be rendered in the default folder view, ContentFile objects should not be use. Instead, the files should simply be manipulated directly.

Parameters:
cf - the ContentFile to attach

getRemovedFiles

public BbList<Id> getRemovedFiles()

removeContentFile

public void removeContentFile(ContentFile cf)
Removes the specified ContentFile object from this content object.

Parameters:
cf - the ContentFile to remove.

removeContentFile

public void removeContentFile(Id id)
Removes the specified ContentFile object from this object.

Parameters:
id - the Id of the file to remove.

getContentFiles

public BbList<ContentFile> getContentFiles()

traverseContent

public static final void traverseContent(ContentVisitor visitor,
                                         Content item)
Recursively traverses folders and content according to the visitor pattern.


printTree

public final void printTree()
printTree


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 interface Identifiable
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object

validate

public void validate()
              throws ValidationException
Validates the contents of this Content. 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

getGradebookItem

public blackboard.platform.gradebook2.GradableItem getGradebookItem()

removeInternalArtifacts

public static java.lang.String removeInternalArtifacts(java.lang.String bodyText)


Copyright © 2012 Blackboard, Inc. All Rights Reserved.