Examples of BoxSharedLinkRequestEntity


Examples of com.box.boxjavalibv2.jsonentities.BoxSharedLinkRequestEntity

        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.BoxSharedLinkRequestObject
            final BoxSharedLinkRequestEntity sharedLink = new BoxSharedLinkRequestEntity(
                    BoxSharedLinkAccess.COLLABORATORS);
            headers.put("CamelBox.sharedLinkRequest",
                    BoxSharedLinkRequestObject.createSharedLinkRequestObject(sharedLink));

            BoxFolder result = requestBodyAndHeaders("direct://CREATESHAREDLINK", null, headers);
View Full Code Here

Examples of com.box.boxjavalibv2.jsonentities.BoxSharedLinkRequestEntity

        try {
            final Map<String, Object> headers = new HashMap<String, Object>();
            // parameter type is String
            headers.put("CamelBox.fileId", boxFile.getId());
            // parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxSharedLinkRequestObject
            final BoxSharedLinkRequestEntity sharedLink = new BoxSharedLinkRequestEntity(BoxSharedLinkAccess.OPEN);
            final BoxSharedLinkRequestObject requestObject =
                    BoxSharedLinkRequestObject.createSharedLinkRequestObject(sharedLink);
            headers.put("CamelBox.sharedLinkRequest", requestObject);

            BoxFile result = requestBodyAndHeaders("direct://CREATESHAREDLINK", null, headers);
View Full Code Here

Examples of com.box.boxjavalibv2.jsonentities.BoxSharedLinkRequestEntity

        BoxJSONException, NoSuchMethodException, SecurityException, IllegalAccessException, IllegalArgumentException, InvocationTargetException {
        String id = "testid123";
        String access = BoxSharedLinkAccess.COLLABORATORS;
        Date unsharedAt = new Date();

        BoxSharedLinkRequestEntity sEntity = new BoxSharedLinkRequestEntity(access);
        sEntity.setPermissions(true);
        sEntity.setUnshared_at(unsharedAt);
        BoxSharedLinkRequestObject obj = BoxSharedLinkRequestObject.createSharedLinkRequestObject(sEntity);

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