use of org.pmiops.workbench.model.WorkspaceListResponse in project workbench by all-of-us.
the class WorkspacesController method getWorkspacesForReview.
// Note we do not paginate the workspaces list, since we expect few workspaces
// to require review.
//
// We can add pagination in the DAO by returning Slice<Workspace> if we want the method to return
// pagination information (e.g. are there more workspaces to get), and Page<Workspace> if we
// want the method to return both pagination information and a total count.
@Override
@AuthorityRequired({ Authority.REVIEW_RESEARCH_PURPOSE })
public ResponseEntity<WorkspaceListResponse> getWorkspacesForReview() {
WorkspaceListResponse response = new WorkspaceListResponse();
List<org.pmiops.workbench.db.model.Workspace> workspaces = workspaceService.findForReview();
response.setItems(workspaces.stream().map(TO_CLIENT_WORKSPACE).collect(Collectors.toList()));
return ResponseEntity.ok(response);
}
Aggregations