blackboard.data.content
Class AbstractContentFile

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.content.AbstractContentFile
All Implemented Interfaces:
IBbObject, Identifiable, java.lang.Cloneable
Direct Known Subclasses:
ContentFile, EntityContentFile

public abstract class AbstractContentFile
extends BbObject

The AbstractContentFile 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 AbstractContentFile 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.

Since:
Bb 7.2
Version:
$Revision: #1 $ $Date: 2007/06/27 $

Nested Class Summary
static class AbstractContentFile.StorageType
          Type-safe enumeration of possible values for the StorageType attribute of a file.
 
Field Summary
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
AbstractContentFile()
          Default constructor.
 
Method Summary
 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.
 long getSize()
          Returns the size of the file wrapped by this object.
 AbstractContentFile.StorageType getStorageType()
          Returns the storageType specified 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 setSize(long size)
          Records the size of the file wrapped by this object.
 void setStorageType(AbstractContentFile.StorageType storageType)
          Sets the display storageType for this ContentFile.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getDataType, getId, getModifiedDate, persist, setCreatedDate, setId, setModifiedDate, toString, validate
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractContentFile

public AbstractContentFile()
Default constructor. Creates an instance of AbstractContentFile with default property values.

Method Detail

getStorageType

public AbstractContentFile.StorageType getStorageType()
Returns the storageType specified for this ContentFile. The storageType is used to determine how the file should display in the UI.

Returns:
One of the values enumerated in ContentFile.StorageType

setStorageType

public void setStorageType(AbstractContentFile.StorageType storageType)
Sets the display storageType for this ContentFile.

Parameters:
storageType - StorageType to set.

getSize

public long getSize()
Returns the size of the file wrapped by this object.

Returns:
the size of this content file

setSize

public void setSize(long size)
Records the size of the file wrapped by this object.

Parameters:
size - size to record.

getName

public java.lang.String getName()
Returns the file name of this file object. The name should not contain any path information.

Returns:
file name of the object

setName

public void setName(java.lang.String strName)
Sets the file name of this object

Parameters:
strName - file name to set. This value should not exceed 500 characters.

getLinkName

public java.lang.String getLinkName()
Returns the name of the link to display with this file object.

Returns:
Name of display link.

setLinkName

public void setLinkName(java.lang.String strLinkName)
Sets the text of the link displayed for this object.

Parameters:
strLinkName - name to display. This field cannot exceed 255 characters.


Copyright © 2003 Blackboard, Inc. All Rights Reserved.