Examples of BoxCollection


Examples of com.box.boxjavalibv2.dao.BoxCollection

     */
    public List<BoxCollaboration> getAllCollaborations(final BoxCollabRequestObject collabObject) throws BoxRestException, BoxServerException,
        AuthFatalFailureException {
        GetAllCollaborationsRequest request = new GetAllCollaborationsRequest(getConfig(), getObjectMapper(), collabObject);

        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.COLLABORATIONS, getObjectMapper());
        return getCollaborations(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

     *             exception
     */
    public List<BoxUser> getAllEnterpriseUser(final BoxDefaultRequestObject requestObject, final String filterTerm) throws BoxRestException,
        BoxServerException, AuthFatalFailureException {
        GetAllUsersInEnterpriseRequest request = new GetAllUsersInEnterpriseRequest(getConfig(), getObjectMapper(), requestObject, filterTerm);
        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.USERS, getObjectMapper());
        return getUsers(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

     *             exception
     */
    public List<BoxEmailAlias> getEmailAliases(final String userId, final BoxDefaultRequestObject requestObject) throws BoxServerException, BoxRestException,
        AuthFatalFailureException {
        GetEmailAliasesRequest request = new GetEmailAliasesRequest(getConfig(), getObjectMapper(), userId, requestObject);
        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.EMAIL_ALIASES, getObjectMapper());
        return getEmailAliases(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    @Override
    public List<BoxUser> getAllEnterpriseUser(final BoxDefaultRequestObject requestObject, final String filterTerm) throws BoxRestException,
        BoxServerException, AuthFatalFailureException {
        GetAllUsersInEnterpriseRequest request = new GetAllUsersInEnterpriseRequest(getConfig(), getJSONParser(), requestObject, filterTerm);
        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.USERS, getJSONParser());
        return getUsers(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    @Override
    public List<BoxEmailAlias> getEmailAliases(final String userId, final BoxDefaultRequestObject requestObject) throws BoxServerException, BoxRestException,
        AuthFatalFailureException {
        GetEmailAliasesRequest request = new GetEmailAliasesRequest(getConfig(), getJSONParser(), userId, requestObject);
        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.EMAIL_ALIASES, getJSONParser());
        return getEmailAliases(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    @Override
    public List<BoxFileVersion> getFileVersions(final String fileId, final BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException,
        AuthFatalFailureException {
        GetFileVersionsRequest request = new GetFileVersionsRequest(getConfig(), getJSONParser(), fileId, requestObject);
        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.FILE_VERSIONS, getJSONParser());
        return getFileVersions(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    public BoxFile execute(BoxFilesManagerImpl manager, BoxFileUploadRequestObject requestObject) throws BoxServerException, BoxRestException,
        AuthFatalFailureException, InterruptedException {
        UploadFileRequest request = new UploadFileRequest(mConfig, manager.getJSONParser(), requestObject);
        try {
            Object result = manager.getResponseAndParse(request, BoxResourceType.FILES, manager.getJSONParser());
            BoxCollection collection = (BoxCollection) manager.tryCastObject(BoxResourceType.FILES, result);
            Class cls = manager.getResourceHub().getClass(BoxResourceType.FILE);
            return (BoxFile) Utils.getTypedObjects(collection, cls).get(0);
        }
        catch (BoxRestException e) {
            if (isInterruptedMultipartException(e)) {
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    public BoxFile execute(final String fileId, BoxFilesManagerImpl manager, BoxFileUploadRequestObject requestObject) throws BoxServerException,
        BoxRestException, AuthFatalFailureException, InterruptedException {
        UploadNewVersionFileRequest request = new UploadNewVersionFileRequest(mConfig, manager.getJSONParser(), fileId, requestObject);
        try {
            Object result = manager.getResponseAndParse(request, BoxResourceType.FILE_VERSIONS, manager.getJSONParser());
            BoxCollection versions = (BoxCollection) manager.tryCastObject(BoxResourceType.FILE_VERSIONS, result);
            if (versions.getTotalCount() != 1) {
                throw new BoxMalformedResponseException(request.getExpectedResponseCode());
            }
            return (BoxFile) versions.getEntries().get(0);
        }
        catch (BoxRestException e) {
            if (isInterruptedMultipartException(e)) {
                throw new InterruptedException();
            }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    @Override
    public List<BoxCollaboration> getAllCollaborations(final BoxGetAllCollabsRequestObject collabObject) throws BoxRestException, BoxServerException,
        AuthFatalFailureException {
        GetAllCollaborationsRequest request = new GetAllCollaborationsRequest(getConfig(), getJSONParser(), collabObject);

        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.COLLABORATIONS, getJSONParser());
        return getCollaborations(collection);
    }
View Full Code Here

Examples of com.box.boxjavalibv2.dao.BoxCollection

    @Override
    public List<BoxCollaboration> getFolderCollaborations(final String folderId, BoxDefaultRequestObject requestObject) throws BoxRestException,
        BoxServerException, AuthFatalFailureException {
        GetFolderCollaborationsRequest request = new GetFolderCollaborationsRequest(getConfig(), getJSONParser(), folderId, requestObject);

        BoxCollection collection = (BoxCollection) getResponseAndParseAndTryCast(request, BoxResourceType.COLLABORATIONS, getJSONParser());
        return Utils.getTypedObjects(collection, BoxCollaboration.class);
    }
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.