use of com.sequenceiq.mock.swagger.model.ApiAuthRoleMetadataList in project cloudbreak by hortonworks.
the class AuthRolesResourceOperation method readAuthRolesMetadata.
public ResponseEntity<ApiAuthRoleMetadataList> readAuthRolesMetadata(String mockUuid, @Valid String view) {
ClouderaManagerDto dto = clouderaManagerStoreService.read(mockUuid);
List<ApiAuthRoleMetadata> collect = dto.getUsers().stream().flatMap(u -> u.getAuthRoles().stream()).map(r -> new ApiAuthRoleMetadata().role("ROLE_ADMIN").uuid(r.getUuid()).displayName(r.getDisplayName())).collect(Collectors.toList());
return responseCreatorComponent.exec(new ApiAuthRoleMetadataList().items(collect));
}
Aggregations