Package com.box.boxjavalibv2.jsonentities

Examples of com.box.boxjavalibv2.jsonentities.MapJSONStringEntity


     *
     * @param parentId
     * @return
     */
    public BoxItemRestoreRequestObject setNewParent(final String parentId) {
        MapJSONStringEntity id = new MapJSONStringEntity();
        id.put(BoxFolder.FIELD_ID, parentId);
        put(BoxItem.FIELD_PARENT, id);
        return this;
    }
View Full Code Here


     *            access level
     * @param email
     *            email address
     */
    public void setUploadEmail(String access, String email) {
        MapJSONStringEntity entity = new MapJSONStringEntity();
        entity.put(BoxEmail.FIELD_ACCESS, access);
        entity.put(BoxEmail.FIELD_EMAIL, email);
        put(BoxFolder.FIELD_FOLDER_UPLOAD_EMAIL, entity);
    }
View Full Code Here

        BoxGroupMembershipRequestObject obj = new BoxGroupMembershipRequestObject();
        return obj.setRole(role);
    }

    public BoxGroupMembershipRequestObject setGroup(final String groupId) {
        MapJSONStringEntity groupEntity = new MapJSONStringEntity();
        groupEntity.put(BoxGroup.FIELD_ID, groupId);
        put(BoxGroupMembership.FIELD_GROUP, groupEntity);
        return this;
    }
View Full Code Here

        put(BoxGroupMembership.FIELD_ROLE, role);
        return this;
    }

    public BoxGroupMembershipRequestObject setUser(final String userId) {
        MapJSONStringEntity userEntity = new MapJSONStringEntity();
        userEntity.put(BoxUser.FIELD_ID, userId);
        put(BoxGroupMembership.FIELD_USER, userEntity);
        return this;
    }
View Full Code Here

            TestUtils.getConfig().getApiUrlPath().concat(UpdateUserLoginRequest.getUri(userId)), HttpStatus.SC_OK, RestMethod.PUT);

        HttpEntity entity = request.getRequestEntity();
        Assert.assertTrue(entity instanceof StringEntity);

        MapJSONStringEntity mEntity = new MapJSONStringEntity();
        mEntity.put("login", newLogin);
        assertEqualStringEntity(mEntity, entity);
    }
View Full Code Here

     * @param destinationUserId
     *            the ID of the user who the folder will be transferred to
     * @return
     */
    private BoxSimpleUserRequestObject setDestinationUser(final String destinationUserId) {
        MapJSONStringEntity id = new MapJSONStringEntity();
        id.put(BoxUser.FIELD_ID, destinationUserId);
        put(BoxItem.FIELD_OWNED_BY, id);
        return this;
    }
View Full Code Here

     * @param parentId
     *            id of parent
     * @return
     */
    public BoxItemRequestObject setParent(String parentId) {
        MapJSONStringEntity entity = new MapJSONStringEntity();
        entity.put(BoxFolder.FIELD_ID, parentId);
        put(BoxItem.FIELD_PARENT, entity);
        return this;
    }
View Full Code Here

        put(BoxComment.FIELD_ITEM, getItemEntity(type, itemId));
        return this;
    }

    private static MapJSONStringEntity getItemEntity(final IBoxType type, final String itemId) {
        MapJSONStringEntity entity = new MapJSONStringEntity();
        entity.put("type", type.toString());
        entity.put("id", itemId);
        return entity;
    }
View Full Code Here

     * @param parentId
     *            id of parent
     * @return
     */
    private BoxItemCopyRequestObject setParent(String parentId) {
        MapJSONStringEntity entity = new MapJSONStringEntity();
        entity.put(BoxFolder.FIELD_ID, parentId);
        put(BoxItem.FIELD_PARENT, entity);
        return this;
    }
View Full Code Here

        testRequestIsWellFormed(request, TestUtils.getConfig().getApiUrlAuthority(),
            TestUtils.getConfig().getApiUrlPath().concat(CreateEmailAliasRequest.getUri(userId)), HttpStatus.SC_CREATED, RestMethod.POST);
        HttpEntity en = request.getRequestEntity();
        Assert.assertTrue(en instanceof StringEntity);
        MapJSONStringEntity mEntity = new MapJSONStringEntity();
        mEntity.put("email", email);
        assertEqualStringEntity(mEntity, en);

    }
View Full Code Here

TOP

Related Classes of com.box.boxjavalibv2.jsonentities.MapJSONStringEntity

Copyright © 2018 www.massapicom. 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.