Examples of BoxGroupRequestObject


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

    private static final String CAMEL_TEST_GROUP = "CamelTestGroup";

    public BoxGroup createGroup() throws Exception {
        // using com.box.boxjavalibv2.requests.requestobjects.BoxGroupRequestObject message body for single parameter "groupRequest"
        final BoxGroupRequestObject requestObject = BoxGroupRequestObject.createGroupRequestObject(CAMEL_TEST_GROUP);
        BoxGroup result = requestBody("direct://CREATEGROUP", requestObject);

        assertNotNull("createGroup result", result);
        return result;
    }
View Full Code Here

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

        try {
            final Map<String, Object> headers = new HashMap<String, Object>();
            // parameter type is String
            headers.put("CamelBox.groupId", group.getId());
            // parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxGroupRequestObject
            final BoxGroupRequestObject requestObject =
                    BoxGroupRequestObject.updateGroupRequestObject(CAMEL_TEST_GROUP + "_Updated");
            headers.put("CamelBox.groupRequest", requestObject);

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

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

public class BoxGroupsRequestObjectTest {

    @Test
    public void testCreateGroupRequestObject() {
        String name = "testname";
        BoxGroupRequestObject obj = BoxGroupRequestObject.createGroupRequestObject(name);
        Assert.assertEquals(name, obj.getFromEntity(BoxGroup.FIELD_NAME));
    }
View Full Code Here

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

    }

    @Test
    public void testUpdateGroupRequestObject() {
        String name = "testname";
        BoxGroupRequestObject obj = BoxGroupRequestObject.updateGroupRequestObject(name);
        Assert.assertEquals(name, obj.getFromEntity(BoxGroup.FIELD_NAME));
    }
View Full Code Here

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

        return (BoxGroup) getResponseAndParseAndTryCast(request, BoxResourceType.GROUP, getJSONParser());
    }

    @Override
    public BoxGroup createGroup(String name) throws BoxRestException, AuthFatalFailureException, BoxServerException {
        BoxGroupRequestObject requestObj = BoxGroupRequestObject.createGroupRequestObject(name);
        return createGroup(requestObj);
    }
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.