blackboard.data.discussionboard
Class MessageAttachment

java.lang.Object
  extended by blackboard.data.BbObject
      extended by blackboard.data.discussionboard.MessageAttachment
All Implemented Interfaces:
IBbObject, Identifiable, java.io.Serializable, java.lang.Cloneable

public class MessageAttachment
extends BbObject

The MessageAttachment class represents an attachment to a given discussion board message within the Bb Course Management System.

Since:
Bb 5.5
See Also:
Serialized Form

Field Summary
static DataType DATA_TYPE
           
 
Fields inherited from class blackboard.data.BbObject
_bbAttributes
 
Constructor Summary
MessageAttachment()
          Creates an instance of MessageAttachment with default property values.
 
Method Summary
static ListFilter createMessageIdFilter(Id parentMsgId)
          Factory method to create an instance of the ListFilter interface capable of filtering a list of MessageAttachment objects based upon their parent message's Id value.
 DataType getDataType()
          Returns the DataType identifier for this object.
 BbFile getFile()
          Returns the file that this MessageAttachment represents.
 boolean getMsgHasEmbeds()
          Returns an indicator for whether the parent message text contains references to embedded files
 Id getParentMsgId()
          Returns the parent message Id associated with this MessageAttachment.
 void setFile(BbFile file)
          Sets the file that this MessageAttachment should represent.
 void setMsgHasEmbeds(boolean flag)
          Sets the indicator for whether the parent message text contains references to emebedded files
 void setParentMsgId(Id iParentMsgId)
          Sets the parent message Id associated with this MessageAttachment.
 void validate()
          Validates the contents of this MessageAttachment object.
 
Methods inherited from class blackboard.data.BbObject
clone, getBbAttributes, getCreatedDate, getId, getModifiedDate, matches, persist, setCreatedDate, setId, setModifiedDate, toString
 
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

MessageAttachment

public MessageAttachment()
Creates an instance of MessageAttachment with default property values.

Method Detail

getParentMsgId

public Id getParentMsgId()
Returns the parent message Id associated with this MessageAttachment.

Returns:
parent message Id value for this message attachment

setParentMsgId

public void setParentMsgId(Id iParentMsgId)
Sets the parent message Id associated with this MessageAttachment.

Parameters:
iParentMsgId - the parent message Id value to use for this message attachment

getFile

public BbFile getFile()
Returns the file that this MessageAttachment represents.

Returns:
the file this MessageAttachment as a BbFile

setFile

public void setFile(BbFile file)
Sets the file that this MessageAttachment should represent.

Parameters:
file - a BbFile containing the file that this MessageAttachment should represent

getMsgHasEmbeds

public boolean getMsgHasEmbeds()
Returns an indicator for whether the parent message text contains references to embedded files

Returns:
true if contains, false otherwise

setMsgHasEmbeds

public void setMsgHasEmbeds(boolean flag)
Sets the indicator for whether the parent message text contains references to emebedded files

Parameters:
flag - true if contains, false otherwise

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 interface Identifiable
Specified by:
getDataType in class BbObject
Returns:
the DataType for this object

validate

public void validate()
              throws ValidationException
Validates the contents of this MessageAttachment object. Internal consistency checks are also performed.

Specified by:
validate in interface IBbObject
Overrides:
validate in class BbObject
Throws:
ValidationException - if validation of this object fails

createMessageIdFilter

public static final ListFilter createMessageIdFilter(Id parentMsgId)
Factory method to create an instance of the ListFilter interface capable of filtering a list of MessageAttachment objects based upon their parent message's Id value.

Parameters:
parentMsgId - the Id of the parent for which message attachments should be returned. Message attachments that are attached to a given message (identified by Id) will be returned.
Returns:
a ListFilter instance that can filter on parent Id


Copyright © 2012 Blackboard, Inc. All Rights Reserved.