Examples of BoxUserRequestObject


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

        deleteEmailAlias();
    }

    public BoxUser createEnterpriseUser() throws Exception {
        // using com.box.boxjavalibv2.requests.requestobjects.BoxUserRequestObject message body for single parameter "userRequest"
        final BoxUserRequestObject enterpriseUserRequestObject =
                BoxUserRequestObject.createEnterpriseUserRequestObject(CAMEL_EMAIL_ALIAS, CAMEL_USER_NAME);
        BoxUser result = requestBody("direct://CREATEENTERPRISEUSER", enterpriseUserRequestObject);

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

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

        try {
            final Map<String, Object> headers = new HashMap<String, Object>();
            // parameter type is String
            headers.put("CamelBox.userId", enterpriseUser.getId());
            // parameter type is com.box.boxjavalibv2.requests.requestobjects.BoxUserRequestObject
            final BoxUserRequestObject requestObject =
                    BoxUserRequestObject.updateUserInfoRequestObject(false);
            requestObject.setJobTitle(CAMEL_JOB_TITLE);
            headers.put("CamelBox.userRequest", requestObject);

            BoxUser result = requestBodyAndHeaders("direct://UPDATEUSERINFORMAITON", null, headers);

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

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

        String key2 = "testkey2";
        String value2 = "testvalue2";
        LinkedHashMap<String, String> codes = new LinkedHashMap<String, String>();
        codes.put(key1, value1);
        codes.put(key2, value2);
        BoxUserRequestObject obj = getUserRequestObject(login, name, role, language, sync, title, phone, address, space, codes, seeManaged, status,
            exemptLimit, exemptLogin);
        CreateEnterpriseUserRequest request = new CreateEnterpriseUserRequest(CONFIG, JSON_PARSER, obj);
        testRequestIsWellFormed(request, TestUtils.getConfig().getApiUrlAuthority(),
            TestUtils.getConfig().getApiUrlPath().concat(CreateEnterpriseUserRequest.getUri()), HttpStatus.SC_CREATED, RestMethod.POST);
View Full Code Here

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

        assertEqualStringEntity(obj, entity);
    }

    private BoxUserRequestObject getUserRequestObject(String login, String name, String role, String language, boolean sync, String title, String phone,
        String address, double space, LinkedHashMap<String, String> codes, boolean seeManaged, String status, boolean exemptLimit, boolean exemptLogin) {
        BoxUserRequestObject obj = BoxUserRequestObject.createEnterpriseUserRequestObject(login, name);
        obj.setRole(role);
        obj.setLanguage(language);
        obj.setSyncEnabled(sync);
        obj.setJobTitle(title);
        obj.setPhone(phone);
        obj.setAddress(address);
        obj.setSpaceAmount(space);
        obj.setTrackingCodes(codes);
        obj.setCanSeeManagedUsers(seeManaged);
        obj.setStatus(status);
        obj.setExemptFromDeviceLimits(exemptLimit);
        obj.setExemptFromLoginVerification(exemptLogin);
        return obj;
    }
View Full Code Here

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

        String key2 = "testkey2";
        String value2 = "testvalue2";
        LinkedHashMap<String, String> codes = new LinkedHashMap<String, String>();
        codes.put(key1, value1);
        codes.put(key2, value2);
        BoxUserRequestObject obj = getUserRequestObject(notify, name, role, language, sync, title, phone, address, space, codes, seeManaged, exemptLimit,
            exemptLogin);
        if (removeEnterprise) {
            obj.setEnterprise(null);
        }
        obj.setMaxUploadSize(1000d);
        obj.setAvatarUrl("http://testboxavatarurl.com");
        obj.setMyTags("mytaga","mytagb");
        UpdateUserRequest request = new UpdateUserRequest(CONFIG, JSON_PARSER, userId, obj);
        testRequestIsWellFormed(request, TestUtils.getConfig().getApiUrlAuthority(),
            TestUtils.getConfig().getApiUrlPath().concat(UpdateUserRequest.getUri(userId)), HttpStatus.SC_OK, RestMethod.PUT);

        Assert.assertEquals(Boolean.toString(notify), request.getQueryParams().get("notify"));
View Full Code Here

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

        assertEqualStringEntity(obj, en);
    }

    private BoxUserRequestObject getUserRequestObject(boolean notify, String name, String role, String language, boolean sync, String title, String phone,
        String address, double space, LinkedHashMap<String, String> codes, boolean seeManaged, boolean exemptLimit, boolean exemptLogin) {
        BoxUserRequestObject obj = BoxUserRequestObject.updateUserInfoRequestObject(notify);
        obj.setRole(role);
        obj.setLanguage(language);
        obj.setSyncEnabled(sync);
        obj.setJobTitle(title);
        obj.setPhone(phone);
        obj.setAddress(address);
        obj.setSpaceAmount(space);
        obj.setTrackingCodes(codes);
        obj.setCanSeeManagedUsers(seeManaged);
        obj.setExemptFromDeviceLimits(exemptLimit);
        obj.setExemptFromLoginVerification(exemptLogin);
        return obj;
    }
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.