|
||||||||||
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.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. |
static class |
ContentFile.StorageType
Type-safe enumeration of possible values for the StorageType attribute
of a file. |
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. |
java.lang.String |
getLinkName()
Returns the name of the link to display with this file object. |
java.lang.String |
getName()
Returns the file name of this file object. |
Registry |
getRegistry()
Returns the Registry associated with this ContentFile
. |
long |
getSize()
Returns the size of the file wrapped by this object. |
ContentFile.StorageType |
getStorageType()
Returns the storageType specified for 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 |
setLinkName(java.lang.String strLinkName)
Sets the text of the link displayed for this object. |
void |
setName(java.lang.String strName)
Sets the file name of this object |
void |
setRegistry(Registry reg)
Sets the Registry associated with this ContentFile . |
void |
setSize(long size)
Records the size of the file wrapped by this object. |
void |
setStorageType(ContentFile.StorageType storageType)
Sets the display storageType for this ContentFile . |
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 |
---|
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.Action
public void setAction(ContentFile.Action action)
ContentFile
.
action
- Action to set.public ContentFile.StorageType getStorageType()
ContentFile
. The storageType
is used to determine how the file should display in the UI.
ContentFile.StorageType
public void setStorageType(ContentFile.StorageType storageType)
ContentFile
.
storageType
- StorageType to set.public long getSize()
public void setSize(long size)
size
- size to record.public java.lang.String getName()
public void setName(java.lang.String strName)
strName
- file name to set. This value should not exceed 500 characters.public java.lang.String getLinkName()
public void setLinkName(java.lang.String strLinkName)
strLinkName
- name to display. This field cannot exceed 255 characters.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 IBbObject
getDataType
in class BbObject
DataType
for this object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |