use of com.epam.pipeline.controller.vo.PipelinesWithPermissionsVO in project cloud-pipeline by epam.
the class GrantPermissionManager method loadAllPipelinesWithPermissions.
public PipelinesWithPermissionsVO loadAllPipelinesWithPermissions(Integer pageNum, Integer pageSize) {
// TODO: fully switch to common method loadAllEntitiesPermissions when client is ready
EntityWithPermissionVO entityWithPermissionVO = loadAllEntitiesPermissions(AclClass.PIPELINE, pageNum, pageSize, false, null);
PipelinesWithPermissionsVO result = new PipelinesWithPermissionsVO();
result.setTotalCount(entityWithPermissionVO.getTotalCount());
result.setPipelines(entityWithPermissionVO.getEntityPermissions().stream().map(e -> {
PipelineWithPermissions pipelineWithPermissions = pipelineWithPermissionsMapper.toPipelineWithPermissions((Pipeline) e.getEntity());
pipelineWithPermissions.setPermissions(e.getPermissions());
return pipelineWithPermissions;
}).collect(toSet()));
return result;
}
Aggregations