@ConsumerType public abstract class AbstractComment extends java.lang.Object implements Comment
AbstractComment implements Comment and provides the API implementation, at the same time
offering abstract methods with which concrete implementations can control retrieval and storage of resources.| Modifier and Type | Method and Description |
|---|---|
Resource |
addAttachment(java.lang.String name,
java.io.InputStream inputStream,
java.lang.String mimeType)
Attach a file to this comment.
|
java.lang.String |
getAnnotationData()
Returns the string representing annotation data that is part of this comment and pertains to the target of the
associated comment collection.
|
Resource |
getAttachment(java.lang.String name)
Retrieve an attachment of this comment by its file name.
|
java.util.Map<java.lang.String,Resource> |
getAttachmentMap()
Retrieves a map, an entry of which represents a file-name/attachment pair.
|
java.lang.String |
getAuthorName()
Returns the author's identifying name that represents the author of this comment.
|
CommentCollection |
getCollection()
Returns the parent
CommentCollection this comment is a part of. |
java.util.Calendar |
getCreated()
The time stamp this comment was created.
|
java.util.Calendar |
getLastModified()
Returns the moment in time this collection was last modified.
|
java.lang.String |
getMessage()
Retrieves the message of this comment.
|
java.lang.String |
getPath()
Get the path of the resource representing this comment.
|
ValueMap |
getProperties()
Returns a
ValueMap holding all properties of this comment. |
void |
remove()
Removes (deletes) this comment from its collection.
|
void |
removeAttachment(java.lang.String name)
Removes an attachment from this comment, as identified by its name.
|
public final Resource addAttachment(java.lang.String name, java.io.InputStream inputStream, java.lang.String mimeType) throws CommentException
addAttachment in interface Commentname - The name of the file to attach.inputStream - The InputStream representing the contents of the file.mimeType - The mime-type of this file.Resource representing the attachment just added.CommentException - Upon encountering an error during persistence of the attachment.public final java.lang.String getAnnotationData()
CommentgetAnnotationData in interface Commentnull if none is present.public final Resource getAttachment(java.lang.String name)
getAttachment in interface Commentname - The file name of the attachment.Resource representing the attachment, or null if no attachment with the given name
exists.public final java.lang.String getAuthorName()
CommentgetAuthorName in interface Commentpublic final java.util.Map<java.lang.String,Resource> getAttachmentMap()
getAttachmentMap in interface CommentMap representing the available attachments, or an empty map if no attachments are present.public final java.util.Calendar getCreated()
getCreated in interface CommentCalendar representing creation time.public final java.util.Calendar getLastModified()
CommentgetLastModified in interface Commentpublic final java.lang.String getMessage()
getMessage in interface CommentString representing the message.public final CommentCollection getCollection()
CommentCollection this comment is a part of.getCollection in interface CommentCommentCollection.public final java.lang.String getPath()
public final ValueMap getProperties()
ValueMap holding all properties of this comment.getProperties in interface CommentValueMap representing the properties.public final void removeAttachment(java.lang.String name)
throws CommentException
removeAttachment in interface Commentname - The name of the attachment to remove.CommentException - If an error occurs removing the attachment.Copyright © 2010 - 2023 Adobe. All Rights Reserved