public class CommentHandler extends FeedbackHandlerBase
invalidParameterHandler, lastAttachmentHandler, repositoryHandler, repositoryHelper, serverName, serviceName| Constructor and Description |
|---|
CommentHandler(String serviceName,
String serverName,
InvalidParameterHandler invalidParameterHandler,
RepositoryHandler repositoryHandler,
OMRSRepositoryHelper repositoryHelper,
LastAttachmentHandler lastAttachmentHandler)
Construct the handler information needed to interact with the repository services
|
| Modifier and Type | Method and Description |
|---|---|
String |
addCommentReplyToAnchor(String userId,
String anchorGUID,
String anchorType,
String attachmentGUID,
CommentType commentType,
String commentText,
boolean isPublic,
String methodName)
Adds a comment to another comment.
|
String |
addCommentToAnchor(String userId,
String anchorGUID,
String anchorType,
CommentType commentType,
String commentText,
boolean isPublic,
String methodName)
Adds a comment to the asset.
|
List<Comment> |
getComments(String userId,
String anchorGUID,
String anchorTypeName,
int startingFrom,
int pageSize,
String methodName)
Return the comments attached to an anchor entity.
|
void |
removeCommentFromAnchor(String userId,
String anchorGUID,
String anchorType,
String commentGUID,
String methodName)
Removes a comment added to the asset by this user.
|
void |
updateComment(String userId,
String anchorGUID,
String anchorType,
String commentGUID,
CommentType commentType,
String commentText,
boolean isPublic,
String methodName)
Update an existing comment.
|
countAttachments, getAttachmentLinks, getAttachments, visibleToUserpublic CommentHandler(String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, LastAttachmentHandler lastAttachmentHandler)
serviceName - name of this serviceserverName - name of the local serverinvalidParameterHandler - handler for managing parameter errorsrepositoryHandler - manages calls to the repository servicesrepositoryHelper - provides utilities for manipulating the repository services objectslastAttachmentHandler - handler for recording last attachmentpublic List<Comment> getComments(String userId, String anchorGUID, String anchorTypeName, int startingFrom, int pageSize, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - calling useranchorGUID - identifier for the entity that the feedback is attached toanchorTypeName - name of the type of the anchor entitystartingFrom - where to start from in the listpageSize - maximum number of results that can be returnedmethodName - calling methodInvalidParameterException - the input properties are invalidUserNotAuthorizedException - user not authorized to issue this requestPropertyServerException - problem accessing the property serverpublic String addCommentToAnchor(String userId, String anchorGUID, String anchorType, CommentType commentType, String commentText, boolean isPublic, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.anchorGUID - unique identifier for the referenceable.anchorType - type name for the referenceable.commentType - type of comment enum.commentText - the text of the comment.isPublic - indicates whether the feedback should be shared or only be visible to the originating usermethodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem adding the asset properties to the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public String addCommentReplyToAnchor(String userId, String anchorGUID, String anchorType, String attachmentGUID, CommentType commentType, String commentText, boolean isPublic, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.anchorGUID - unique identifier for the referenceable.anchorType - type name for the referenceable.attachmentGUID - unique identifier for an existing comment. Used to add a reply to a comment.commentType - type of comment enum.commentText - the text of the comment.isPublic - indicates whether the feedback should be shared or only be visible to the originating usermethodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem adding the asset properties to the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void updateComment(String userId, String anchorGUID, String anchorType, String commentGUID, CommentType commentType, String commentText, boolean isPublic, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.anchorGUID - unique identifier for the anchor entityanchorType - type name for anchorcommentGUID - unique identifier for the comment to change.commentType - type of comment enum.commentText - the text of the comment.isPublic - indicates whether the feedback should be shared or only be visible to the originating usermethodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem adding the asset properties to the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public void removeCommentFromAnchor(String userId, String anchorGUID, String anchorType, String commentGUID, String methodName) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
userId - userId of user making request.anchorGUID - unique identifier of anchoranchorType - type of anchorcommentGUID - unique identifier for the comment object.methodName - calling methodInvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem updating the asset properties in the property server.UserNotAuthorizedException - the user does not have permission to perform this request.Copyright © 2018–2020 ODPi. All rights reserved.