Examples of BoxFolderRequestObject


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

        }
    }

    private BoxFolder createFolder() {
        // using com.box.boxjavalibv2.requests.requestobjects.BoxFolderRequestObject message body for single parameter "folderRequest"
        final BoxFolderRequestObject camelTestFolder = BoxFolderRequestObject.createFolderRequestObject(CAMEL_TEST_FOLDER, "0");

        BoxFolder result = requestBody("direct://CREATEFOLDER", camelTestFolder);
        assertNotNull("createFolder result", result);
        assertNotNull("createFolder folder id", result.getId());
        return result;
View Full Code Here

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

            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.BoxFolderRequestObject
            final BoxFolderRequestObject folderRequestObject = BoxFolderRequestObject.getRequestObject();
            folderRequestObject.setTags(new String[]{CAMEL_TEST_TAG});
            folderRequestObject.setName(CAMEL_TEST_COPY_FOLDER);
            headers.put("CamelBox.folderRequest", folderRequestObject);

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

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

    public void testRequestIsWellFormed() throws BoxRestException, IllegalStateException, IOException, AuthFatalFailureException, BoxJSONException,
        NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        String name = "foldername123";
        String parentId = "parentid456";

        BoxFolderRequestObject obj = BoxFolderRequestObject.createFolderRequestObject(name, parentId);

        CreateNewFolderRequest request = new CreateNewFolderRequest(CONFIG, JSON_PARSER, obj);
        testRequestIsWellFormed(request, TestUtils.getConfig().getApiUrlAuthority(),
            TestUtils.getConfig().getApiUrlPath().concat(CreateNewFolderRequest.getUri()), 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.