com.bimface.sdk.service.IntegrateService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bimface-java-sdk Show documentation
Show all versions of bimface-java-sdk Show documentation
Bimface provide the required call java sdk.
The newest version!
package com.bimface.sdk.service;
import com.bimface.api.bean.request.integrate.FileIntegrateRequest;
import com.bimface.api.bean.request.integrate.IntegrateQueryRequest;
import com.bimface.api.bean.response.FileIntegrateBean;
import com.bimface.api.bean.response.FileIntegrateDetailBean;
import com.bimface.bean.GeneralResponse;
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;
/**
* 文件转换
*
* @author bimface, 2016-06-01.
*/
public class IntegrateService {
private ApiClient apiClient;
private AccessTokenService accessTokenService;
public IntegrateService(Endpoint endpoint, AccessTokenService accessTokenService) {
this(endpoint, null, accessTokenService);
}
public IntegrateService(Endpoint endpoint, Config config, AccessTokenService accessTokenService) {
this.apiClient = ApiClient.getApiClient(endpoint.getApiHost(), config);
this.accessTokenService = accessTokenService;
}
/**
* 发起文件集成
*
* @param request 文件集成请求
* @return {@link FileIntegrateBean}
* @throws BimfaceException {@link BimfaceException}
*/
public FileIntegrateBean integrate(FileIntegrateRequest request) throws BimfaceException {
return apiClient.integrate(request, accessTokenService.getAccessToken());
}
/**
* 获取集成模型的状态
*
* @param integrateId 集成id
* @return {@link FileIntegrateBean}
* @throws BimfaceException {@link BimfaceException}
*/
public FileIntegrateBean getIntegrate(Long integrateId) throws BimfaceException {
return apiClient.getIntegrate(integrateId, accessTokenService.getAccessToken());
}
/**
* 批量获取集成模型的状态
*
* @param integrateQueryRequest
* @return
* @throws BimfaceException
*/
public PagedList getIntegrates(IntegrateQueryRequest integrateQueryRequest) throws BimfaceException {
return apiClient.getIntegrates(integrateQueryRequest, accessTokenService.getAccessToken());
}
/**
* 发起模型集成
*
* @param request 模型集成请求体
* @return
* @throws BimfaceException {@link BimfaceException}
*/
public FileIntegrateBean integrate2Bimtiles(FileIntegrateRequest request) throws BimfaceException {
return apiClient.integrate2Bimtiles(request, accessTokenService.getAccessToken());
}
/**
* 删除集成模型
*
* @param integrateId 集成模型id
* @throws BimfaceException {@link BimfaceException}
*/
public void deleteIntegrate(Long integrateId) throws BimfaceException {
apiClient.deleteIntegrate(integrateId, accessTokenService.getAccessToken());
}
/**
* 更新集成信息
*
* @param integrateId 集成模型id
* @param name 集成新名称
* @throws BimfaceException {@link BimfaceException}
*/
public FileIntegrateBean modify(Long integrateId, String name) throws BimfaceException {
return apiClient.modify(integrateId, name, accessTokenService.getAccessToken());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy