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(String commentId,
BoxDefaultRequestObject requestObject)
Delete a comment.
|
BoxComment |
getComment(String commentId,
BoxDefaultRequestObject requestObject)
Get a comment, given a comment id.
|
static List<BoxComment> |
getComments(BoxCollection collection)
Get comments from a collection.
|
BoxComment |
updateComment(String commentId,
BoxCommentRequestObject requestObject)
Update a comment.
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObjectpublic 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(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(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(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 List<BoxComment> getComments(BoxCollection collection)
collection - collectionCopyright © 2014. All Rights Reserved.