com.bimface.sdk.service.SceneService 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.scene.AutoUpdateSceneLayerRequest;
import com.bimface.api.bean.response.scene.AutoUpdateSceneLayerResponse;
import com.bimface.exception.BimfaceException;
import com.bimface.scene.bean.CreateSceneRequest;
import com.bimface.scene.bean.CreateSceneResp;
import com.bimface.scene.bean.response.SceneInfoResponse;
import com.bimface.sdk.client.ApiClient;
import com.bimface.sdk.config.Config;
import com.bimface.sdk.config.Endpoint;
/**
* 场景相关
* @author bimface, 2022-11-14.
*/
public class SceneService {
private ApiClient apiClient;
private AccessTokenService accessTokenService;
public SceneService(Endpoint endpoint, AccessTokenService accessTokenService) {
this(endpoint, null, accessTokenService);
}
public SceneService(Endpoint endpoint, Config config, AccessTokenService accessTokenService) {
this.apiClient = ApiClient.getApiClient(endpoint.getApiHost(), config);
this.accessTokenService = accessTokenService;
}
/**
* 创建场景
*
* @param sceneInfo scene信息
* @return {@link com.bimface.scene.bean.CreateSceneResp}
* @throws BimfaceException {@link BimfaceException}
*/
public CreateSceneResp createScene(CreateSceneRequest sceneInfo) throws BimfaceException {
return apiClient.createScene(sceneInfo, accessTokenService.getAccessToken());
}
public String updateScene(Long sceneId, CreateSceneRequest sceneInfo) throws BimfaceException {
return apiClient.updateScene(sceneId, sceneInfo, accessTokenService.getAccessToken());
}
public SceneInfoResponse getScene(Long sceneId) throws BimfaceException {
return apiClient.getScene(sceneId, accessTokenService.getAccessToken());
}
public AutoUpdateSceneLayerResponse autoUpdateSceneLayers(Long sceneId, AutoUpdateSceneLayerRequest autoUpdateSceneLayerRequest) throws BimfaceException {
return apiClient.autoUpdateSceneLayers(sceneId, autoUpdateSceneLayerRequest, accessTokenService.getAccessToken());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy