|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackboard.data.BbObject
blackboard.data.content.AbstractContentFile
blackboard.data.content.ContentFile
public class ContentFile
The ContentFile class wraps a reference to a file that has been
uploaded to a content area in a course. This object only represents the
information in the database used to track the file reference. References to
the actual file system objects must be obtained separately.
Note that ContentFile objects are only meant to deal with files
associated with content. It does not deal with files in other contexts, such
as user or group uploads.
| Nested Class Summary | |
|---|---|
static class |
ContentFile.Action
Type-safe enumeration of possible values for the Action attribute
of a file. |
| Nested classes/interfaces inherited from class blackboard.data.content.AbstractContentFile |
|---|
AbstractContentFile.StorageType |
| Field Summary | |
|---|---|
static DataType |
DATA_TYPE
|
| Fields inherited from class blackboard.data.BbObject |
|---|
_bbAttributes |
| Constructor Summary | |
|---|---|
ContentFile()
Default constructor. |
|
ContentFile(BbFile bbFile)
Constructor that builds some defaults based on the given BbFile
argument. |
|
| Method Summary | |
|---|---|
void |
addChildFile(ChildFile file)
Appends the given ChildFile to the current list of child files
defined for this ContentFile. |
ContentFile.Action |
getAction()
Returns the action specified for this ContentFile. |
BbList |
getChildFiles()
Returns the list of child files for this ContentFile. |
Id |
getContentId()
Returns the content Id to which this ContentFile
"belongs" (is part of). |
DataType |
getDataType()
Returns the DataType identifier for this object. |
Registry |
getRegistry()
Returns the Registry associated with this ContentFile
. |
void |
setAction(ContentFile.Action action)
Sets the display action for this ContentFile. |
void |
setChildFiles(BbList files)
Sets the list of child files for this ContentFile. |
void |
setContentId(Id iContentId)
Sets the content Id value for this ContentFile. |
void |
setRegistry(Registry reg)
Sets the Registry associated with this ContentFile. |
void |
validate()
Validates the contents of this ContentFile. |
| Methods inherited from class blackboard.data.content.AbstractContentFile |
|---|
getLinkName, getName, getSize, getStorageType, setLinkName, setName, setSize, setStorageType |
| 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 ContentFile()
ContentFile with
default property values.
public ContentFile(BbFile bbFile)
BbFile
argument.
bbFile - BbFile used to prepopulate some values.| Method Detail |
|---|
public ContentFile.Action getAction()
ContentFile. The action
is used to determine how the file should display in the UI.
ContentFile.Actionpublic void setAction(ContentFile.Action action)
ContentFile.
action - Action to set.public Id getContentId()
Id to which this ContentFile
"belongs" (is part of).
Id value for this content filepublic void setContentId(Id iContentId)
Id value for this ContentFile.
iContentId - the content Id value to use for this content filepublic Registry getRegistry()
Registry associated with this ContentFile
.
ContentFile was loaded using a "heavy" load method. Accessing
this value when it has not been loaded is an error.
Registry value for this content filepublic void setRegistry(Registry reg)
Registry associated with this ContentFile.
The Registry provided should only contain FileRegistryEntry
values.
reg - a Registry value to use for this content filepublic BbList getChildFiles()
ContentFile.
BbList with the child files for this content filepublic void setChildFiles(BbList files)
ContentFile.
#addContentFile(ChildFile) instead.
files - a BbList containing the set of child files to use for
this content filepublic void addChildFile(ChildFile file)
ChildFile to the current list of child files
defined for this ContentFile.
ChildFile.setParentId(Id),
passing in the local id value, on the provided ChildFile prior
to adding it to the list of child files.
file - the ChildFile to append to the current list of child filespublic DataType getDataType()
DataType identifier for this object. Can be used to
uniquely identify the "type" of this data object.
getDataType in interface IBbObjectgetDataType in interface IdentifiablegetDataType in class BbObjectDataType for this object
public void validate()
throws ValidationException
ContentFile. Internal
consistency checks are also performed.
validate in interface IBbObjectvalidate in class BbObjectValidationException - if validation of this object fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||