All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.bimface.sdk.service.ExtractionService Maven / Gradle / Ivy

The newest version!
package com.bimface.sdk.service;

import com.bimface.api.bean.request.extraction.ExtractionQueryRequest;
import com.bimface.api.bean.request.extraction.ExtractionRequest;
import com.bimface.api.bean.response.extraction.ExtractionInfoBean;
import com.bimface.api.bean.response.extraction.ExtractionResponse;
import com.bimface.exception.BimfaceException;
import com.bimface.page.PagedList;
import com.bimface.sdk.client.ApiClient;
import com.bimface.sdk.config.Config;
import com.bimface.sdk.config.Endpoint;

public class ExtractionService {

    private ApiClient apiClient;
    private AccessTokenService accessTokenService;

    public ExtractionService(Endpoint endpoint, AccessTokenService accessTokenService) {
        this(endpoint, null, accessTokenService);
    }

    public ExtractionService(Endpoint endpoint, Config config, AccessTokenService accessTokenService) {
        this.apiClient = ApiClient.getApiClient(endpoint.getApiHost(), config);
        this.accessTokenService = accessTokenService;
    }

    public ExtractionResponse createExtraction(ExtractionRequest request) throws BimfaceException {
        return apiClient.createExtraction(request, accessTokenService.getAccessToken());
    }

    public PagedList queryExtraction(ExtractionQueryRequest queryRequest, Integer pageNo, Integer pageSize) throws BimfaceException {
        return apiClient.queryExtraction(queryRequest, pageNo, pageSize, accessTokenService.getAccessToken());
    }

    public Void deleteExtraction(Long fileId, Long integrateId, String extractType) throws BimfaceException {
        return apiClient.deleteExtraction(fileId, integrateId, extractType, accessTokenService.getAccessToken());
    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy