use of com.webank.wedatasphere.qualitis.response.GetAllClusterResponse in project Qualitis by WeBankFinTech.
the class MetaDataServiceImpl method getUserCluster.
@Override
public GeneralResponse<GetAllClusterResponse<ClusterInfoDetail>> getUserCluster(GetUserClusterRequest request) throws UnExpectedRequestException, MetaDataAcquireFailedException {
// Check Arguments
checkRequest(request);
// Get login user
String userName = HttpUtils.getUserName(httpServletRequest);
GetClusterByUserRequest getClusterByUserRequest = new GetClusterByUserRequest(userName, request.getStartIndex(), request.getPageSize());
DataInfo<ClusterInfoDetail> response = metaDataClient.getClusterByUser(getClusterByUserRequest);
GetAllClusterResponse<ClusterInfoDetail> result = new GetAllClusterResponse<>();
result.setOptionalClusters(ruleLimitationService.getLimitClusters());
result.setTotal(response.getTotalCount());
result.setData(response.getContent());
LOGGER.info("Succeed to get cluster. response: {}", result);
return new GeneralResponse<>("200", "{&GET_CLUSTER_SUCCESSFULLY}", result);
}
Aggregations