|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object blackboard.data.BbObject blackboard.data.content.Content blackboard.data.content.ContentFolder
public class ContentFolder
The ContentFolder
class is a representation of a folder within
the Bb Course Management System. A content folder provides a means of
organizing documents, other folders, lessons, and links.
The children are maintained as an order list of Content
objects.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class blackboard.data.content.Content |
---|
Content.RenderType |
Field Summary | |
---|---|
static DataType |
DATA_TYPE
Object data type constant |
Fields inherited from class blackboard.data.content.Content |
---|
RESOURCE_BUNDLE |
Fields inherited from class blackboard.data.BbObject |
---|
_bbAttributes |
Fields inherited from interface blackboard.data.Positionable |
---|
POS_UNDEFINED |
Constructor Summary | |
---|---|
ContentFolder()
Default constructor; ensures that the appropriate attributes in Content are over-ridden, including ContentHandler and
IsFolder . |
Method Summary | |
---|---|
boolean |
acceptsType(java.lang.String handler)
A ContentFolder can accept any type of content except ContentFileRef
objects ( "resource/x-bb-file" ). |
void |
addContent(Content content)
Adds the given piece of Content (must not be of type
ContentFile ) to the list of children for this Folder . |
void |
addContent(Content content,
int nPos)
Adds the given piece of Content (must notbe of type
ContentFile ) to the list of children for this Folder
at the provided position value. |
BbList |
getChildren()
Returns the list of children that presently belong to (was assigned to) this CourseDocumentFolder . |
DataType |
getDataType()
Returns the DataType identifier for this object. |
boolean |
getIsFolder()
Overrides the method of the same name in Content . |
BbList |
getRemoved()
Returns the ids that have been removed from this Folder. |
Sequence |
getSequence()
Required method for Aggregate objects. |
void |
remove(Content content)
Removes the specified Content object from the list of children. |
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 |
---|
public static final DataType DATA_TYPE
Constructor Detail |
---|
public ContentFolder()
Content
are over-ridden, including ContentHandler
and
IsFolder
.
Method Detail |
---|
public boolean acceptsType(java.lang.String handler)
ContentFolder
can accept any type of content except ContentFileRef
objects ( "resource/x-bb-file" ).
acceptsType
in interface Aggregate
handler
- content handler handle to test.
true
unless handler
equals "resource/x-bb-file"public boolean getIsFolder()
Content
.
getIsFolder
in class Content
Content.getIsFolder()
public void addContent(Content content) throws java.lang.IllegalArgumentException
Content
(must not be of type
ContentFile
) to the list of children for this Folder
.
The piece of content is added at the end of the list of content items.
Content.setParentId(Id)
,
passing in the local content Id value, on the provided Content
object prior to adding it to the list of content items. Content items
should also be part of the same course as their parent folder so Content.setCourseId(Id)
is called passing in the local course Id value.
addContent
in interface Folder
content
- the piece of Content
to be added to the list of
content being maintained by this folder.
java.lang.IllegalArgumentException
- thrown if the provided content is of
type ContentFile
.public void addContent(Content content, int nPos) throws java.lang.IllegalArgumentException
Content
(must notbe of type
ContentFile
) to the list of children for this Folder
at the provided position value.
Content.setParentId(Id)
,
passing in the local content Id value, on the provided Content
object prior to adding it to the list of content items. Content items
should also be part of the same course as their parent folder so Content.setCourseId(Id)
is called passing in the local course Id value.
addContent
in interface Folder
content
- the piece of Content
to be added to the list of
content being maintained by this folder.nPos
- the position in the child list at which the given content
should be added.
java.lang.IllegalArgumentException
- thrown if the provided content is of
type ContentFile
.public void remove(Content content)
getRemoved()
and calling blackbaord.persist.content.ContentDbPersister#delete(Id)
for each entry
in the the list of removed items.
remove
in interface Aggregate
content
- Content object to remove.public BbList getRemoved()
BbList
tracks the ids of objects that have been removed.
BbList
of Id
objects. Each Id
in the list
represents the id of Content
item that was removed from this
content folder.public Sequence getSequence()
Aggregate
objects. ContentFolder
objects do not present a sequenced view of their content, so this method
will return null
.
getSequence
in interface Aggregate
null
public BbList getChildren()
CourseDocumentFolder
.
getChildren
in interface Folder
BbList
of the children Content
objects of this
ContentFolder
. The list will be empty if there are no
children.public DataType getDataType()
DataType
identifier for this object. Can be used to
uniquely identify the "type" of this data object.
getDataType
in interface IBbObject
getDataType
in class Content
DataType
for this object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |