public class NoteData extends IdentifiableEntityData implements StringPropertyableTO, Matchable
Constructor and Description |
---|
NoteData() |
Modifier and Type | Method and Description |
---|---|
void |
addObjectProperty(StringPropertyTO property)
Add an object property.
|
List<AttachmentData> |
getAttachments() |
List<AttachmentData> |
getAttachments(String filter)
Returns a MIME type filtered subset of the attachments that were added to the note.
|
UserBlogData |
getBlog() |
String |
getContent() |
Date |
getCreationDate() |
NoteCreationSource |
getCreationSource() |
int |
getDiscussionDepth() |
Long |
getDiscussionId() |
String |
getDiscussionPath() |
Date |
getLastDiscussionCreationDate() |
Date |
getLastModificationDate() |
List<DetailedUserData> |
getNotifiedUsers() |
int |
getNumberOfComments()
Returns the number of replies to this note.
|
int |
getNumberOfDiscussionNotes()
Returns the number of notes in the discussion this note is part of.
|
Set<StringPropertyTO> |
getObjectProperties()
This method return the properties of the object
|
NoteData |
getParent() |
Set<Permission<Note>> |
getPermissions() |
String |
getShortContent() |
List<TagData> |
getTags() |
DetailedUserData |
getUser() |
Long |
getVersion() |
boolean |
hasPermission(Permission<Note> permission)
Checks, if the note has the given permission.
|
boolean |
hasPermission(String permissionIdentifier)
Checks, if the note has the given permission.
|
boolean |
isCommentable()
Returns whether the current user can reply to this note.
|
boolean |
isDeletable()
Whether the current user can delete this note.
|
boolean |
isDirect() |
boolean |
isEditable() |
boolean |
isFavorite() |
boolean |
isForMe() |
boolean |
isMatched()
Method to get the matching status of the entity.
|
boolean |
isMentionDiscussionAuthors() |
boolean |
isMentionTopicAuthors() |
boolean |
isMentionTopicManagers() |
boolean |
isMentionTopicReaders() |
boolean |
isRepostable() |
boolean |
isSystemNote() |
void |
setAttachments(List<AttachmentData> attachments) |
void |
setBlog(UserBlogData blog) |
void |
setContent(String content) |
void |
setCreationDate(Date creationDate) |
void |
setCreationSource(NoteCreationSource creationSource) |
void |
setDirect(boolean direct) |
void |
setDiscussionDepth(int discussionDepth) |
void |
setDiscussionId(Long discussionId) |
void |
setDiscussionPath(String discussionPath) |
void |
setFavorite(boolean favorite) |
void |
setForMe(boolean forMe) |
void |
setLastDiscussionCreationDate(Date lastDiscussionCreationDate) |
void |
setLastModificationDate(Date lastModificationDate) |
void |
setMatched(boolean matching)
Method to set the matching status of the entity.
|
void |
setMentionDiscussionAuthors(boolean mentionDiscussionAuthors) |
void |
setMentionTopicAuthors(boolean mentionTopicAuthors) |
void |
setMentionTopicManagers(boolean mentionTopicManagers) |
void |
setMentionTopicReaders(boolean mentionTopicReaders) |
void |
setNotifiedUsers(List<DetailedUserData> notifiedUsers) |
void |
setNumberOfComments(int numberOfComments)
Sets the number of replies to this note.
|
void |
setNumberOfDiscussionNotes(int numberOfDiscussionNotes)
Set the number of notes in the discussion this note belongs to.
|
void |
setObjectProperties(Set<StringPropertyTO> properties)
Set the properties of the note.
|
void |
setParent(NoteData parent) |
void |
setPermissions(Set<Permission<Note>> permissions) |
void |
setShortContent(String shortContent) |
void |
setSystemNote(boolean systemNote) |
void |
setTags(List<TagData> tags) |
void |
setUser(DetailedUserData user) |
void |
setVersion(Long version) |
copy, equals, getId, getProperties, getProperty, hashCode, setId, setProperty
public void addObjectProperty(StringPropertyTO property)
property
- the property to addpublic List<AttachmentData> getAttachments()
public List<AttachmentData> getAttachments(String filter)
filter
- a regular expression the MIME type must match for the attachment to be includedpublic UserBlogData getBlog()
public String getContent()
public Date getCreationDate()
public NoteCreationSource getCreationSource()
public int getDiscussionDepth()
public Long getDiscussionId()
public String getDiscussionPath()
public Date getLastDiscussionCreationDate()
public Date getLastModificationDate()
public List<DetailedUserData> getNotifiedUsers()
public int getNumberOfComments()
public int getNumberOfDiscussionNotes()
public Set<StringPropertyTO> getObjectProperties()
getObjectProperties
in interface StringPropertyableTO
public NoteData getParent()
public Set<Permission<Note>> getPermissions()
public String getShortContent()
public DetailedUserData getUser()
public Long getVersion()
public boolean hasPermission(Permission<Note> permission)
permission
- The permission.public boolean hasPermission(String permissionIdentifier)
permissionIdentifier
- The permissions identifier as string.public boolean isCommentable()
public boolean isDeletable()
public boolean isDirect()
public boolean isEditable()
public boolean isFavorite()
public boolean isForMe()
public boolean isMatched()
public boolean isMentionDiscussionAuthors()
public boolean isMentionTopicAuthors()
public boolean isMentionTopicManagers()
public boolean isMentionTopicReaders()
public boolean isRepostable()
public boolean isSystemNote()
public void setAttachments(List<AttachmentData> attachments)
attachments
- the attachments that were added to the notepublic void setBlog(UserBlogData blog)
blog
- the blog to setpublic void setContent(String content)
content
- the content to setpublic void setCreationDate(Date creationDate)
creationDate
- the creation date of the notepublic void setCreationSource(NoteCreationSource creationSource)
creationSource
- the source which sent the notepublic void setDirect(boolean direct)
direct
- true if this note is a direct message, false otherwisepublic void setDiscussionDepth(int discussionDepth)
discussionDepth
- the depth of the note within the discussiongetDiscussionDepth()
public void setDiscussionId(Long discussionId)
discussionId
- the ID of the discussion this note is a part ofpublic void setDiscussionPath(String discussionPath)
discussionPath
- a string that contains all the IDs of the parent notes of this note up to the root
note separated by a slash or space character. The string is expected to start with
the ID of the root note of the discussion.public void setFavorite(boolean favorite)
favorite
- true if the current user marked this note as a favorite, false otherwisepublic void setForMe(boolean forMe)
forMe
- true if the current user was one of the notified users, false otherwisepublic void setLastDiscussionCreationDate(Date lastDiscussionCreationDate)
lastDiscussionCreationDate
- the lastDiscussionCreationDate to setpublic void setLastModificationDate(Date lastModificationDate)
lastModificationDate
- the date of the last modification of the notepublic void setMatched(boolean matching)
setMatched
in interface Matchable
matching
- True
, if this item matches the matcher.public void setMentionDiscussionAuthors(boolean mentionDiscussionAuthors)
mentionDiscussionAuthors
- the mentionDiscussionAuthors to setpublic void setMentionTopicAuthors(boolean mentionTopicAuthors)
mentionTopicAuthors
- the mentionTopicAuthors to setpublic void setMentionTopicManagers(boolean mentionTopicManagers)
mentionTopicManagers
- the mentionTopicManagers to setpublic void setMentionTopicReaders(boolean mentionTopicReaders)
mentionTopicReaders
- the mentionTopicReaders to setpublic void setNotifiedUsers(List<DetailedUserData> notifiedUsers)
notifiedUsers
- the users that were notified about the notepublic void setNumberOfComments(int numberOfComments)
numberOfComments
- the number of repliespublic void setNumberOfDiscussionNotes(int numberOfDiscussionNotes)
numberOfDiscussionNotes
- the number of notes in the discussionpublic void setObjectProperties(Set<StringPropertyTO> properties)
properties
- the propertiespublic void setParent(NoteData parent)
parent
- the parent note of the notepublic void setPermissions(Set<Permission<Note>> permissions)
permissions
- the permissions to setpublic void setShortContent(String shortContent)
shortContent
- a shortened version of the content of the note, can be null if there there is no
short versionpublic void setSystemNote(boolean systemNote)
systemNote
- true if the note is a system note, false otherwisepublic void setUser(DetailedUserData user)
user
- the author of the notepublic void setVersion(Long version)
version
- the autosave version of the noteCopyright © 2019 Communote team. All rights reserved.