blackboard.data.content
Class ChildFile

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.content.ChildFile
All Implemented Interfaces:
IBbObject, java.lang.Cloneable

public class ChildFile
extends BbObject

The ChildFile class wraps an uploaded file that is the child of a ContentFile. 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.

Presently, child files are only used in a special case of file content uploaded through the user interface, in which image references in an uploaded HTML file are stored as "children" of the HTML content file record.

Since:
Bb 6.0
Version:
$Revision: #1 $ $Date: 2005/06/27 $

Nested Class Summary
static class ChildFile.Action
           
 
Field Summary
static DataType DATA_TYPE
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
ChildFile()
          Default constructor.
 
Method Summary
 ChildFile.Action getAction()
          Returns the action specified for this ChildFile.
 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.
 Id getParentId()
          Returns the parent object for this file.
 long getSize()
          Returns the size of the file wrapped by this object.
 void setAction(ChildFile.Action action)
          Sets the display action for this ChildFile.
 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 setParentId(Id iParentId)
          Sets the parent id of this object.
 void setSize(long size)
          Records the size of the file wrapped by this object.
 
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

DATA_TYPE

public static final DataType DATA_TYPE
Constructor Detail

ChildFile

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

Method Detail

getAction

public ChildFile.Action getAction()
Returns the action specified for this ChildFile. The action is used to determine how the file should display in the UI.

Returns:
One of the values enumerated in ChildFile.Action

setAction

public void setAction(ChildFile.Action action)
Sets the display action for this ChildFile.

Parameters:
action - Action to set.

getSize

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

Returns:
the size of this child 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.

getParentId

public Id getParentId()
Returns the parent object for this file. Parent ids are typically only used by special business logic when processing uploaded files.

Returns:
Id of this object's parent. It will be either Id.UNSET_ID if this object has no parent, or a valid Id of another ChildFile object.

setParentId

public void setParentId(Id iParentId)
Sets the parent id of this object. The parent id is typically only used in special handling of uploaded package files, and should not be set.

Parameters:
id - Id of the parent ChildFile object.

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 class BbObject
Returns:
the DataType for this object


Copyright © 2003 Blackboard, Inc. All Rights Reserved.