Examples of BoxCommentRequestObject


Examples of com.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject

    private static final Logger LOG = LoggerFactory.getLogger(IBoxCommentsManagerIntegrationTest.class);
    private static final String PATH_PREFIX = BoxApiName.COMMENTS.getName();

    private BoxComment addComment() throws InterruptedException {
        final BoxCommentRequestObject requestObject =
                BoxCommentRequestObject.addCommentRequestObject(BoxResourceType.FILE, testFileId, "Camel was here!");

        BoxComment result = requestBody("direct://ADDCOMMENT", requestObject);
        assertNotNull("addComment result", result);
        Thread.sleep(2000);
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject

        try {
            final Map<String, Object> headers = new HashMap<String, Object>();
            // parameter type is String
            headers.put("CamelBox.commentId", comment.getId());
            // parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject
            final BoxCommentRequestObject requestObject =
                    BoxCommentRequestObject.updateCommentRequestObject("Camel was here, again!");
            headers.put("CamelBox.commentRequest", requestObject);
            BoxComment result = requestBodyAndHeaders("direct://UPDATECOMMENT", null, headers);

            LOG.debug("updateComment: " + result);
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject

    private static final String MESSAGE = "message";

    @Test
    public void testJSONHasAllFields() throws BoxRestException, BoxJSONException {
        String message = "testmessage123";
        BoxCommentRequestObject obj = BoxCommentRequestObject.updateCommentRequestObject(message);

        Assert.assertEquals(message, obj.getFromEntity(MESSAGE));
    }
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject

    }

    @Override
    public BoxComment addComment(String commentedItemId, IBoxType commentedItemType, String message) throws BoxRestException, BoxServerException,
        AuthFatalFailureException {
        BoxCommentRequestObject obj = BoxCommentRequestObject.addCommentRequestObject(commentedItemType, commentedItemId, message);
        return addComment(obj);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject

    public void testRequestIsWellFormed() throws BoxRestException, IllegalStateException, IOException, AuthFatalFailureException, BoxJSONException,
        NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        String id = "testid123";
        String message = "testmessage456";

        BoxCommentRequestObject obj = BoxCommentRequestObject.updateCommentRequestObject(message);

        UpdateCommentRequest request = new UpdateCommentRequest(CONFIG, JSON_PARSER, id, obj);
        testRequestIsWellFormed(request, TestUtils.getConfig().getApiUrlAuthority(),
            TestUtils.getConfig().getApiUrlPath().concat(UpdateCommentRequest.getUri(id)), HttpStatus.SC_OK, RestMethod.PUT);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.