public abstract class AbstractCommentCollection<C extends Comment> extends java.lang.Object implements CommentCollection<C>
AbstractCommentCollection
implements a CommentCollection
and provides basic implementation
of the API, providing abstract methods so that concrete implementations can control storage and retrieval of
resources.Modifier and Type | Method and Description |
---|---|
C |
addComment(java.lang.String message,
java.lang.String author,
java.lang.String annotationData)
Create a new comment and add it to the collection.
|
java.util.List<C> |
getCommentList()
Returns all comments of this collection.
|
java.util.Calendar |
getCreated()
Returns the moment in time this collection was created.
|
java.util.Calendar |
getLastModified()
Returns the moment in time this collection was last modified.
|
java.lang.String |
getPath()
Returns the path of the resource representing this collection.
|
Resource |
getTarget()
Returns the
Resource representing the target this comment collection belongs to. |
void |
remove()
Removes (deletes) this comment collection.
|
public final C addComment(java.lang.String message, java.lang.String author, java.lang.String annotationData) throws CommentException
addComment
in interface CommentCollection<C extends Comment>
message
- The message of the comment.author
- The optional user ID to set as the author of the new comment. If none is provided, the
session user is considered the author.annotationData
- The optional annotation data. Annotation data may be used to store SVG data when commenting
on an image that is annotated with such data.CommentException
- Upon encountering an error during comment creation.public final java.util.List<C> getCommentList()
getCommentList
in interface CommentCollection<C extends Comment>
List
of comments of this collection, or an empty list if no comments are present.public final java.util.Calendar getCreated()
CommentCollection
getCreated
in interface CommentCollection<C extends Comment>
public final java.util.Calendar getLastModified()
CommentCollection
getLastModified
in interface CommentCollection<C extends Comment>
public final java.lang.String getPath()
getPath
in interface CommentCollection<C extends Comment>
String
representing the path.public final Resource getTarget()
Resource
representing the target this comment collection belongs to.getTarget
in interface CommentCollection<C extends Comment>
public final void remove()
remove
in interface CommentCollection<C extends Comment>
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"