|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectblackboard.data.BbObject
blackboard.data.discussionboard.Message
public class Message
The LwMessage class provides a "light weight" view of a
discussion board forum message within the Bb Course Management System.
Message| Nested Class Summary | |
|---|---|
static class |
Message.MessageLifecycle
Enumeration for reflecting user forum role A normal user will have a null value in the role A blocked user will be a READER A moderator will be a MODERATOR We can add additional roles in this later |
| Field Summary | |
|---|---|
static DataType |
DATA_TYPE
|
static BbLocale.Name |
POSTED_NAME_FORMAT
|
static java.lang.String |
RESOURCE_BUNDLE
Resource bundle for this data object |
static int |
SUBJECT_MAX_LENGTH
|
| Fields inherited from class blackboard.data.BbObject |
|---|
_bbAttributes |
| Constructor Summary | |
|---|---|
Message()
Creates an instance of Message with default property values. |
|
| Method Summary | |
|---|---|
void |
appendResponse(Message msg)
Appends the given Message to the current list of responses
currently defined for this Message. |
MessageAttachment |
getAttachment()
Returns the attachment for this Message. |
FormattedText |
getBody()
Returns the body of this Message |
java.lang.Integer |
getBodyLength()
Returns the body length of this Message. |
DataType |
getDataType()
Returns the DataType identifier for this object. |
java.util.Calendar |
getEditDate()
Returns the edit date for this Message. |
Id |
getForumId()
Returns the forum Id to which this Message
was posted. |
int |
getHitCount()
Returns a count of the number of times this Message has been
accessed (viewed). |
boolean |
getIsCalculatedName()
Sets the flag indicating that getPostedName returns a real-time name calculated from the User's first and last name, instead of Anonymous or a stored postedName (e.g., if the user was deleted or unavailable on the system). |
boolean |
getIsFromCartridge()
Returns whether this Message came from a course cartridge. |
boolean |
getIsThreadLocked()
Returns whether this Message has been locked from further
responses being made to it. |
Message.MessageLifecycle |
getLifecycle()
Returns the lifecycle for this Message. |
java.lang.String |
getLinkRefId()
Returns the link reference id for this Message. |
MessageStatus |
getMessageStatus()
Returns the status for this Message. |
MessageLabel |
getMsgLabel()
Returns the label for this Message. |
Id |
getParentId()
Returns the parent Id associated with this Message
. |
java.lang.String |
getPersistentPostedName()
Returns the name of the poster of this Message |
java.lang.Boolean |
getPostAsAnonymous()
Returns whether this Message is posted as anonymous. |
java.util.Calendar |
getPostDate()
Returns the post date for this Message. |
java.lang.String |
getPostedName()
Returns the localized name of the poster of this Message |
BbList |
getResponses()
Returns the list of responses for this Message. |
java.lang.String |
getSubject()
Returns the subject associated with this Message |
java.util.List<Tag> |
getTags()
Gets the tags associated to this message. |
java.util.List<java.lang.String> |
getTagsAsString()
Gets a string-representation of all of the tags associated with this message |
java.lang.String |
getUserFamilyName()
Returns |
java.lang.String |
getUserGivenName()
|
Id |
getUserId()
Returns the user Id associated with this
Message. |
void |
setAttachment(MessageAttachment attachment)
Sets the attachment for this Message. |
void |
setBody(FormattedText body)
Sets the body of this Message |
void |
setEditDate(java.util.Calendar cEditDate)
Sets the edit date for this Message. |
void |
setForumId(Id iForumId)
Sets the forum Id value for this Message |
void |
setHitCount(int nHitCount)
Sets the number of times this Message has been accessed. |
void |
setIsCalculatedName(boolean isCalculatedName)
Sets the flag indicating that getPostedName returns a real-time name calculated from the User's first and last name, instead of Anonymous or a stored postedName (e.g., if the user was deleted or unavailable on the system). |
void |
setIsFromCartridge(boolean bIsFromCartridge)
Sets whether this Message came from a course cartridge. |
void |
setIsThreadLocked(boolean bIsThreadLocked)
Sets whether this Message should be locked from an further
responses. |
void |
setLifecycle(Message.MessageLifecycle lifecycle)
Sets the lifecycle for this Message. |
void |
setLinkRefId(java.lang.String linkref)
Sets the link reference id for this Message. |
void |
setMessageStatus(MessageStatus ms)
Sets the status for this Message. |
void |
setMsgLabel(MessageLabel label)
Sets the label for this Message. |
void |
setParentId(Id iParentId)
Sets the parent Id value for this Message. |
void |
setPostAsAnonymous(java.lang.Boolean b)
Sets whether this Message is posted as anonymous. |
void |
setPostDate(java.util.Calendar cPostDate)
Sets the post date for this Message. |
void |
setPostedName(java.lang.String strPostedName)
Sets the name of the poster of this Message |
void |
setResponses(BbList msgs)
Sets the list of responses for this Message. |
void |
setSubject(java.lang.String strSubject)
Sets the subject associated with this Message |
void |
setTags(java.util.List<Tag> tags)
Sets the tags associated to this message. |
void |
setUser(User user)
Sets the user that is the author of this message (for use in getPostedName() calculations) |
void |
setUserId(Id iUserId)
Sets the user Id value for this Message |
void |
validate()
Validates the contents of this BbObject. |
| 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
public static final java.lang.String RESOURCE_BUNDLE
public static final BbLocale.Name POSTED_NAME_FORMAT
public static final int SUBJECT_MAX_LENGTH
| Constructor Detail |
|---|
public Message()
Message with default property values.
| Method Detail |
|---|
public Id getUserId()
Id associated with this
Message. This value is the id of the user who posted/owns
the message.
Id value for this messagepublic void setUserId(Id iUserId)
Id value for this Message
iUserId - the user Id value to use for this messagepublic java.lang.String getUserFamilyName()
public java.lang.String getUserGivenName()
public void setUser(User user)
user - the User that is the author of this messagepublic Id getForumId()
Id to which this Message
was posted.
Id value for this messagepublic void setForumId(Id iForumId)
Id value for this Message
iForumId - the forum Id value to use for this messagepublic Id getParentId()
Id associated with this Message
.
This value represents the message to which this message was posted (in
response to). If the parent id value is null or an unset id, then this
message is a top-level thread within its forum.
Id value for this messagepublic void setParentId(Id iParentId)
Id value for this Message.
This action set this message as a response to the message to which the
given id maps.
iParentId - the parent Id value to use for this messagepublic boolean getIsFromCartridge()
Message came from a course cartridge.
public void setIsFromCartridge(boolean bIsFromCartridge)
Message came from a course cartridge.
bIsFromCartridge - true if this message came from a cartridge, false otherwisepublic boolean getIsThreadLocked()
Message has been locked from further
responses being made to it.
public void setIsThreadLocked(boolean bIsThreadLocked)
Message should be locked from an further
responses.
bIsThreadLocked - true if this message is locked and all responses should be
prevented, false otherwisepublic int getHitCount()
Message has been
accessed (viewed).
public void setHitCount(int nHitCount)
Message has been accessed.
nHitCount - an int representing the number of time this message has been
accessedpublic java.lang.String getPostedName()
Message
Stringpublic java.lang.String getPersistentPostedName()
Message
Stringpublic void setPostedName(java.lang.String strPostedName)
Message
strPostedName - a String containing the name name of the poster of this
messagepublic java.lang.String getSubject()
Message
Stringpublic void setSubject(java.lang.String strSubject)
Message
strSubject - a String containing the subject for this messagepublic FormattedText getBody()
Message
public void setBody(FormattedText body)
Message
body - a FormattedText containing the body of this messagepublic java.lang.Integer getBodyLength()
Message.
public java.lang.Boolean getPostAsAnonymous()
Message is posted as anonymous.
public void setPostAsAnonymous(java.lang.Boolean b)
Message is posted as anonymous.
b - true if this message is posted as anonymous, false otherwisepublic BbList getResponses()
Message.
BbList with the responses made to this messagepublic void setResponses(BbList msgs)
Message. appendResponse(Message) instead.
msgs - a BbList containing the set of responses to use for this
messagepublic void appendResponse(Message msg)
Message to the current list of responses
currently defined for this Message. setParentId(Id), passing
in the local id value, on the provided Message prior to
adding it to the list of responses. This response will belong to the same
forum as the message it is being added to, so the forum id constraint is
also enforced by calling (setForumId(Id) providing the
same forum id contained locally.
msg - the Message to append to the current list of responsespublic MessageAttachment getAttachment()
Message.
MessageAttachment object that represents the file
attachment made to this Message.public void setAttachment(MessageAttachment attachment)
Message.
attachment - the MessageAttachment object that is the file attachment
to use for this Messagepublic MessageLabel getMsgLabel()
Message.
MessageLabel object to this Message.public void setMsgLabel(MessageLabel label)
Message.
label - the MessageLabel object for this Messagepublic java.util.Calendar getPostDate()
Message.
Messagepublic void setPostDate(java.util.Calendar cPostDate)
Message.
cPostDate - the post date of this Messagepublic java.util.Calendar getEditDate()
Message.
Messagepublic void setEditDate(java.util.Calendar cEditDate)
Message.
cEditDate - the edit date of this Messagepublic 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 objectpublic Message.MessageLifecycle getLifecycle()
Message.
Message.MessageLifecycle object to this Message.public void setLifecycle(Message.MessageLifecycle lifecycle)
Message.
lifecycle - the Message.MessageLifecycle object for this Messagepublic MessageStatus getMessageStatus()
Message.
MessageStatus object to this Message.public void setMessageStatus(MessageStatus ms)
Message.
ms - the MessageStatus object for this Messagepublic java.lang.String getLinkRefId()
Message.
Message.public void setLinkRefId(java.lang.String linkref)
Message.
linkref - a String containing the link reference id to this Message.public java.util.List<Tag> getTags()
public java.util.List<java.lang.String> getTagsAsString()
public void setTags(java.util.List<Tag> tags)
public boolean getIsCalculatedName()
public void setIsCalculatedName(boolean isCalculatedName)
isCalculatedName - the isCalculatedName to set
public void validate()
throws ValidationException
BbObject. 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 | |||||||||