use of bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescriptionList in project terra-workspace-manager by DataBiosphere.
the class WorkspaceApplicationApiController method listWorkspaceApplications.
@Override
public ResponseEntity<ApiWorkspaceApplicationDescriptionList> listWorkspaceApplications(@PathVariable("workspaceId") UUID workspaceId, @Valid @RequestParam(value = "offset", required = false, defaultValue = "0") Integer offset, @Valid @RequestParam(value = "limit", required = false, defaultValue = "10") Integer limit) {
AuthenticatedUserRequest userRequest = getAuthenticatedInfo();
ControllerValidationUtils.validatePaginationParams(offset, limit);
List<WsmWorkspaceApplication> wsmApps = appService.listWorkspaceApplications(userRequest, workspaceId, offset, limit);
var response = new ApiWorkspaceApplicationDescriptionList();
for (WsmWorkspaceApplication wsmApp : wsmApps) {
response.addApplicationsItem(makeApiWorkspaceApplication(wsmApp));
}
return new ResponseEntity<>(response, HttpStatus.OK);
}
Aggregations