Interface AssetConsumerFeedbackInterface
- All Known Implementing Classes:
AssetConsumer
public interface AssetConsumerFeedbackInterface
AssetConsumerFeedbackInterface supports the ability to add and remove feedback for an asset.
This feedback may be in the form of ratings, likes and comments.
-
Method Summary
Modifier and TypeMethodDescriptionaddCommentReply
(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) Adds a comment to another comment.addCommentToAsset
(String userId, String assetGUID, CommentType commentType, String commentText, boolean isPublic) Adds a comment to the asset.void
addLikeToAsset
(String userId, String assetGUID, boolean isPublic) Adds a "LikeProperties" to the asset.void
addRatingToAsset
(String userId, String assetGUID, StarRating starRating, String review, boolean isPublic) Adds a star rating and optional review text to the asset.void
removeComment
(String userId, String assetGUID, String commentGUID) Removes a comment added to the asset by this user.void
removeLikeFromAsset
(String userId, String assetGUID) Removes a "LikeProperties" added to the asset by this user.void
removeRatingFromAsset
(String userId, String assetGUID) Removes of a review that was added to the asset by this user.void
updateComment
(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) Update an existing comment.
-
Method Details
-
addRatingToAsset
void addRatingToAsset(String userId, String assetGUID, StarRating starRating, String review, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a star rating and optional review text to the asset. If the user has already attached a rating then the original one is over-ridden.- Parameters:
userId
- 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.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Throws:
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.
-
removeRatingFromAsset
void removeRatingFromAsset(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes of a review that was added to the asset by this user.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset where the rating is attached.- Throws:
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.
-
addLikeToAsset
void addLikeToAsset(String userId, String assetGUID, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a "LikeProperties" to the asset. If the user has already attached a like then the original one is over-ridden.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset where the like is to be attached.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Throws:
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.
-
removeLikeFromAsset
void removeLikeFromAsset(String userId, String assetGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a "LikeProperties" added to the asset by this user.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset where the like is attached.- Throws:
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.
-
addCommentToAsset
String addCommentToAsset(String userId, String assetGUID, CommentType commentType, String commentText, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a comment to the asset.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset.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 user- Returns:
- guid of new comment.
- Throws:
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.
-
addCommentReply
String addCommentReply(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Adds a comment to another comment.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset at the head of this comment chain.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.isPublic
- indicates whether the feedback should be shared or only be visible to the originating user- Returns:
- guid of new comment.
- Throws:
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.
-
updateComment
void updateComment(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update an existing comment.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset at the head of this comment chain.commentGUID
- 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 user- Throws:
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.
-
removeComment
void removeComment(String userId, String assetGUID, String commentGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Removes a comment added to the asset by this user.- Parameters:
userId
- userId of user making request.assetGUID
- unique identifier for the asset at the head of this comment chain.commentGUID
- unique identifier for the comment object.- Throws:
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.
-