Interface AssetConsumerFeedbackInterface
-
public interface AssetConsumerFeedbackInterfaceAssetConsumerFeedbackInterface 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StringaddCommentReply(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic)Adds a comment to another comment.StringaddCommentToAsset(String userId, String assetGUID, CommentType commentType, String commentText, boolean isPublic)Adds a comment to the asset.voidaddLikeToAsset(String userId, String assetGUID, boolean isPublic)Adds a "LikeProperties" to the asset.voidaddRatingToAsset(String userId, String assetGUID, StarRating starRating, String review, boolean isPublic)Adds a star rating and optional review text to the asset.voidremoveComment(String userId, String assetGUID, String commentGUID)Removes a comment added to the asset by this user.voidremoveLikeFromAsset(String userId, String assetGUID)Removes a "LikeProperties" added to the asset by this user.voidremoveRatingFromAsset(String userId, String assetGUID)Removes of a review that was added to the asset by this user.voidupdateComment(String userId, String assetGUID, String commentGUID, CommentType commentType, String commentText, boolean isPublic)Update an existing comment.
-
-
-
Method Detail
-
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.
-
-