Class AssetComment

  • All Implemented Interfaces:
    Serializable

    public class AssetComment
    extends AssetElementHeader
    Stores information about a comment connected to an asset. Comments provide informal feedback to assets and can be added at any time. Comments have the userId of the person who added the feedback, along with their comment text. Comments can have other comments attached. The content of the comment is a personal statement (which is why the user's id is in the comment) and there is no formal review of the content.
    See Also:
    Serialized Form
    • Constructor Detail

      • AssetComment

        public AssetComment​(Comment commentBean,
                            AssetCommentReplies commentReplies)
        Bean constructor
        Parameters:
        commentBean - bean that contains all of the properties
        commentReplies - any replies to this comment
      • AssetComment

        public AssetComment​(AssetDescriptor parentAsset,
                            Comment commentBean,
                            AssetCommentReplies commentReplies)
        Bean constructor with parent asset and replies
        Parameters:
        parentAsset - descriptor for parent asset
        commentBean - bean that contains all of the properties
        commentReplies - any replies to this comment
      • AssetComment

        public AssetComment​(AssetDescriptor parentAsset,
                            AssetComment templateComment)
        Copy/clone constructor.
        Parameters:
        parentAsset - descriptor for parent asset
        templateComment - element to copy
    • Method Detail

      • getCommentBean

        protected Comment getCommentBean()
        Return the bean with all of the properties.
        Returns:
        Comment bean
      • isPublic

        public boolean isPublic()
        Return if this comment is private to the creating user.
        Returns:
        boolean
      • getCommentType

        public CommentType getCommentType()
        Return an enum that describes the type of comment.
        Returns:
        CommentType enum
      • getUser

        public String getUser()
        Return the user id of the person who created the comment. Null means the user id is not known.
        Returns:
        String commenting user
      • getCommentText

        public String getCommentText()
        Return the comment text.
        Returns:
        String commentText
      • getCommentReplies

        public AssetCommentReplies getCommentReplies()
        Return an iterator of the replies to this comment - null means no replies are available.
        Returns:
        comment replies iterator
      • toString

        public String toString()
        Standard toString method.
        Overrides:
        toString in class AssetElementHeader
        Returns:
        print out of variables in a JSON-style
      • equals

        public boolean equals​(Object objectToCompare)
        Compare the values of the supplied object with those stored in the current object.
        Overrides:
        equals in class AssetElementHeader
        Parameters:
        objectToCompare - supplied object
        Returns:
        boolean result of comparison