public final class BoxCommentsManager extends BoxResourceManager
Constructor and Description |
---|
BoxCommentsManager(IBoxConfig config,
IBoxResourceHub resourceHub,
IBoxJSONParser parser,
IBoxRequestAuth auth,
IBoxRESTClient restClient)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
BoxComment |
addComment(BoxCommentRequestObject requestObject)
Add a comment to an item.
|
void |
deleteComment(java.lang.String commentId,
BoxDefaultRequestObject requestObject)
Delete a comment.
|
BoxComment |
getComment(java.lang.String commentId,
BoxDefaultRequestObject requestObject)
Get a comment, given a comment id.
|
static java.util.List<BoxComment> |
getComments(BoxCollection collection)
Get comments from a collection.
|
BoxComment |
updateComment(java.lang.String commentId,
BoxCommentRequestObject requestObject)
Update a comment.
|
executeRequestWithNoResponseBody, getAuth, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, tryCastBoxItem, tryCastObject
public BoxCommentsManager(IBoxConfig config, IBoxResourceHub resourceHub, IBoxJSONParser parser, IBoxRequestAuth auth, IBoxRESTClient restClient)
config
- ConfigresourceHub
- IResourceHubparser
- json parserauth
- auth for api callsrestClient
- REST client to make api calls.public BoxComment addComment(BoxCommentRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
requestObject
- comment request object.BoxRestException
- exceptionBoxServerException
- exceptionAuthFatalFailureException
- exception indicating authentication totally failedpublic BoxComment getComment(java.lang.String commentId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
commentId
- id of the commentrequestObject
- object that goes into request.BoxRestException
- exceptionBoxServerException
- exceptionAuthFatalFailureException
- exception indicating authentication totally failedpublic BoxComment updateComment(java.lang.String commentId, BoxCommentRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
commentId
- id of the commentrequestObject
- comment request object.sBoxRestException
- exceptionBoxServerException
- exceptionAuthFatalFailureException
- exception indicating authentication totally failedpublic void deleteComment(java.lang.String commentId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
commentId
- id of the commentrequestObject
- object that goes into request.BoxRestException
- exceptionBoxServerException
- exceptionAuthFatalFailureException
- exception indicating authentication totally failedpublic static java.util.List<BoxComment> getComments(BoxCollection collection)
collection
- collection