Examples of BoxItemCopyRequestObject


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

        try {
            final Map<String, Object> headers = new HashMap<String, Object>();
            // parameter type is String
            headers.put("CamelBox.folderId", testFolder.getId());
            // parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject
            final BoxItemCopyRequestObject requestObject = BoxItemCopyRequestObject.copyItemRequestObject("0");
            requestObject.setName(CAMEL_TEST_COPY_FOLDER);
            headers.put("CamelBox.itemCopyRequest", requestObject);

            BoxFolder result = requestBodyAndHeaders("direct://COPYFOLDER", null, headers);
            assertNotNull("copyFolder result", result);
            assertEquals("copyFolder folder name", CAMEL_TEST_COPY_FOLDER, result.getName());
View Full Code Here

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

    public void testPoll() throws Exception {

        // generate file copy event
        final Map<String, Object> headers = new HashMap<String, Object>();
        headers.put("CamelBox.fileId", testFileId);
        final BoxItemCopyRequestObject requestObject = BoxItemCopyRequestObject.copyItemRequestObject("0");
        requestObject.setName(CAMEL_TEST_FILE);
        headers.put("CamelBox.itemCopyRequest", requestObject);

        BoxFile result = requestBodyAndHeaders("direct://COPYFILE", null, headers);

        assertNotNull("copyFile result", result);
View Full Code Here

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

    public BoxFile copyFile() throws Exception {
        final Map<String, Object> headers = new HashMap<String, Object>();
        // parameter type is String
        headers.put("CamelBox.fileId", testFileId);
        // parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject
        final BoxItemCopyRequestObject requestObject =
                BoxItemCopyRequestObject.copyItemRequestObject("0");
        requestObject.setName(CAMEL_TEST_FILE);
        headers.put("CamelBox.itemCopyRequest", requestObject);
        BoxFile result = requestBodyAndHeaders("direct://COPYFILE", null, headers);

        assertNotNull("copyFile result", result);
        LOG.debug("copyFile: " + result);
View Full Code Here

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

        BoxJSONException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        String id = "testid123";
        String parentId = "testparentid456";
        String newName = "testnewname789";

        BoxItemCopyRequestObject obj = BoxItemCopyRequestObject.copyItemRequestObject(parentId).setName(newName);
        CopyItemRequest request = new CopyItemRequest(CONFIG, JSON_PARSER, id, obj, type);
        testRequestIsWellFormed(request, TestUtils.getConfig().getApiUrlAuthority(),
            TestUtils.getConfig().getApiUrlPath().concat(CopyItemRequest.getUri(id, type)), HttpStatus.SC_CREATED, RestMethod.POST);

        HttpEntity en = request.getRequestEntity();
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.