Class ecm.model.Comment


Extends ecm.model.SocialItem.
Represents a single comment. Each comment is associated with a content item.
Defined in: <ecm\model\Comment.js>.

Constructor Summary

Constructor Attributes Constructor Name and Description
 
Constructs a comment.
Fields borrowed from class ecm.model.SocialItem:
contentItem, TYPE
Fields borrowed from class ecm.model.Item:
attributes, dataObject, deleted, entryTemplateId, locked, lockedUser, mimetype, parent, privileges, repository, resultSet
Fields borrowed from class ecm.model._ModelObject:
categorization, id, isRecurring, name, nameFilter, pane, status, type, userId

Method Summary

Method Attributes Method Name and Description
 
 
deleteComment(callback, errorback)
Deletes the comment.
 
Gets the comment text.
 
Gets a DOM node containing the comment text with characters escaped for HTML and line feeds replaced with <br> tags.
 
Returns true if this comment is deletable by the current user.
 
Returns true if this comment is editable by the current user.
 
Returns true if this comment is created by the current user.
 
Returns true if this comment is a reply comment.
 
saveComment(callback, errorback)
Saves the comment.
 
setCommentText(commentText)
Sets the comment text.
 
setReplyComment(replyComment)
Sets this comment as a reply comment.
Methods borrowed from class ecm.model.SocialItem:
deleteThis, getDateAdded, getDisplayValue, getItemVersion, getOriginatorDisplayName, getOriginatorId, getOriginatorShortName, getTagsPropertyName, isDeletable, isEditable, isMine, save
Methods borrowed from class ecm.model.Item:
containsValue, getAttributeFormat, getAttributeType, getAttrLabel, getContentClass, getItemValue, getMimeClass, getModifyDate, getModifyUser, getPath, getStateClass, getUserInfo, getValue, getValues, hasAttribute, hasPrivilege, isAttributeReadOnly, isDeclareRecordEntryTemplate, isDocumentEntryTemplate, isEntryTemplate, isFolder, isFolderEntryTemplate, isSystemProperty, retrieveAttributes, setValue, setValues
Methods borrowed from class ecm.model._ModelObject:
destroy, onChange, own, refresh, toString

Constructor Detail

ecm.model.Comment()

Constructs a comment.
Since:
2.0.2

Method Detail

constructor()


deleteComment(callback, errorback)

Deletes the comment.
Parameters:
callback
errorback
Deprecated:
replaced by deleteThis().

getCommentText()

Gets the comment text. The comment text is not escaped for HTML. Call getCommentTextNode() to get a DOM node containing the comment text for display purposes.

getCommentTextNode()

Gets a DOM node containing the comment text with characters escaped for HTML and line feeds replaced with <br> tags.

isCommentDeletable()

Returns true if this comment is deletable by the current user.
Deprecated:
replaced by isDeletable().

isCommentEditable()

Returns true if this comment is editable by the current user.
Deprecated:
replaced by isEditable().

isMyComment()

Returns true if this comment is created by the current user.
Deprecated:
replaced by isMine().

isReplyComment()

Returns true if this comment is a reply comment.
Since:
2.0.3.5

saveComment(callback, errorback)

Saves the comment.
Parameters:
callback
errorback
Deprecated:
replaced by save().

setCommentText(commentText)

Sets the comment text.
Parameters:
commentText
Comment text to save

setReplyComment(replyComment)

Sets this comment as a reply comment.
Parameters:
replyComment
Since:
2.0.3.5