public class FeedbackHandler extends Object implements AssetConsumerFeedbackInterface
| Constructor and Description |
|---|
FeedbackHandler(String serviceName,
OMRSRepositoryConnector repositoryConnector)
Construct the feedback handler with a link to the property server's connector and this access service's
official name.
|
| Modifier and Type | Method and Description |
|---|---|
String |
addCommentReply(String userId,
String commentGUID,
CommentType commentType,
String commentText)
Adds a comment to another comment.
|
String |
addCommentToAsset(String userId,
String assetGUID,
CommentType commentType,
String commentText)
Adds a comment to the asset.
|
String |
addLikeToAsset(String userId,
String assetGUID)
Adds a "Like" to the asset.
|
String |
addReviewToAsset(String userId,
String assetGUID,
StarRating starRating,
String review)
Adds a star rating and optional review text to the asset.
|
void |
removeCommentFromAsset(String userId,
String commentGUID)
Removes a comment added to the asset by this user.
|
void |
removeLikeFromAsset(String userId,
String likeGUID)
Removes a "Like" added to the asset by this user.
|
void |
removeReviewFromAsset(String userId,
String reviewGUID)
Removes of a review that was added to the asset by this user.
|
void |
updateComment(String userId,
String commentGUID,
CommentType commentType,
String commentText)
Update an existing comment.
|
void |
updateReviewOnAsset(String userId,
String reviewGUID,
StarRating starRating,
String review)
Updates the rating and optional review text attached to the asset by this user.
|
public FeedbackHandler(String serviceName, OMRSRepositoryConnector repositoryConnector)
serviceName - name of this servicerepositoryConnector - connector to the property server.public String addReviewToAsset(String userId, String assetGUID, StarRating starRating, String review) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addReviewToAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.assetGUID - unique identifier for the asset.starRating - StarRating enumeration for not recommended, one to five stars.review - user review of asset. This can be null.InvalidParameterException - 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 updateReviewOnAsset(String userId, String reviewGUID, StarRating starRating, String review) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
updateReviewOnAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.reviewGUID - unique identifier for the review.starRating - StarRating enumeration for none, one to five stars.review - user review of asset. This can be null.InvalidParameterException - 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 removeReviewFromAsset(String userId, String reviewGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeReviewFromAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.reviewGUID - unique identifier for the review object.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem updating the asset properties in the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public String addLikeToAsset(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addLikeToAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.assetGUID - unique identifier for the assetInvalidParameterException - 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 removeLikeFromAsset(String userId, String likeGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeLikeFromAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.likeGUID - unique identifier for the like object.InvalidParameterException - one of the parameters is null or invalid.PropertyServerException - there is a problem updating the asset properties in the property server.UserNotAuthorizedException - the requesting user is not authorized to issue this request.public String addCommentToAsset(String userId, String assetGUID, CommentType commentType, String commentText) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addCommentToAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.assetGUID - unique identifier for the asset.commentType - type of comment enum.commentText - the text of the comment.InvalidParameterException - 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 addCommentReply(String userId, String commentGUID, CommentType commentType, String commentText) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
addCommentReply in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.commentGUID - 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.InvalidParameterException - 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 commentGUID, CommentType commentType, String commentText) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
updateComment in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.commentGUID - unique identifier for the comment to change.commentType - type of comment enum.commentText - the text of the comment.InvalidParameterException - 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 removeCommentFromAsset(String userId, String commentGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException
removeCommentFromAsset in interface AssetConsumerFeedbackInterfaceuserId - userId of user making request.commentGUID - unique identifier for the comment object.InvalidParameterException - 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–2019 ODPi. All rights reserved.