public final class BoxCommentsManagerImpl extends AbstractBoxResourceManager implements IBoxCommentsManager
Constructor and Description |
---|
BoxCommentsManagerImpl(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.
|
BoxComment |
addComment(java.lang.String commentedItemId,
IBoxType commentedItemType,
java.lang.String message) |
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)
Deprecated.
|
BoxComment |
updateComment(java.lang.String commentId,
BoxCommentRequestObject requestObject)
Update a comment.
|
executeRequestWithNoResponseBody, getAuth, getClassFromType, getConfig, getJSONParser, getResourceHub, getResponseAndParse, getResponseAndParseAndTryCast, getRestClient, tryCastBoxItem, tryCastObject
public BoxCommentsManagerImpl(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
IBoxCommentsManager
addComment
in interface IBoxCommentsManager
requestObject
- comment request object.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public BoxComment addComment(java.lang.String commentedItemId, IBoxType commentedItemType, java.lang.String message) throws BoxRestException, BoxServerException, AuthFatalFailureException
addComment
in interface IBoxCommentsManager
BoxRestException
BoxServerException
AuthFatalFailureException
public BoxComment getComment(java.lang.String commentId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxCommentsManager
getComment
in interface IBoxCommentsManager
commentId
- id of the commentrequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public BoxComment updateComment(java.lang.String commentId, BoxCommentRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxCommentsManager
updateComment
in interface IBoxCommentsManager
commentId
- id of the commentrequestObject
- comment request object.sBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.public void deleteComment(java.lang.String commentId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
IBoxCommentsManager
deleteComment
in interface IBoxCommentsManager
commentId
- id of the commentrequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.@Deprecated public static java.util.List<BoxComment> getComments(BoxCollection collection)
collection
- collection