Examples of BoxComment


Examples of com.box.boxjavalibv2.dao.BoxComment

    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);
        return result;
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxComment

        // parameter type is com.box.boxjavalibv2.dao.IBoxType
        headers.put("CamelBox.commentedItemType", BoxResourceType.FILE);
        // parameter type is String
        headers.put("CamelBox.message", "Camel was here!");

        BoxComment result = requestBodyAndHeaders("direct://ADDCOMMENT_1", null, headers);
        assertNotNull("addComment result", result);
        LOG.debug("addComment: " + result);

        deleteComment(result.getId());
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxComment

        requestBodyAndHeaders("direct://DELETECOMMENT", null, headers);
    }

    @Test
    public void testGetComment() throws Exception {
        final BoxComment comment = addComment();
        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.restclientv2.requestsbase.BoxDefaultRequestObject
//            headers.put("CamelBox.defaultRequest", null);
            BoxComment result = requestBodyAndHeaders("direct://GETCOMMENT", null, headers);

            LOG.debug("getComment: " + result);
        } finally {
            deleteComment(comment.getId());
        }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxComment

        }
    }

    @Test
    public void testUpdateComment() throws Exception {
        final BoxComment comment = addComment();
        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);
        } finally {
            deleteComment(comment.getId());
        }
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.