Search in sources :

Example 1 with ApiWorkspaceApplicationDescription

use of bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription in project terra-workspace-manager by DataBiosphere.

the class WorkspaceApplicationApiController method disableWorkspaceApplication.

@Override
public ResponseEntity<ApiWorkspaceApplicationDescription> disableWorkspaceApplication(@PathVariable("workspaceId") UUID workspaceId, @PathVariable("applicationId") UUID applicationId) {
    AuthenticatedUserRequest userRequest = getAuthenticatedInfo();
    WsmWorkspaceApplication wsmApp = appService.disableWorkspaceApplication(userRequest, workspaceId, applicationId);
    ApiWorkspaceApplicationDescription response = makeApiWorkspaceApplication(wsmApp);
    return new ResponseEntity<>(response, HttpStatus.OK);
}
Also used : ResponseEntity(org.springframework.http.ResponseEntity) ApiWorkspaceApplicationDescription(bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription) AuthenticatedUserRequest(bio.terra.workspace.service.iam.AuthenticatedUserRequest) WsmWorkspaceApplication(bio.terra.workspace.service.workspace.model.WsmWorkspaceApplication)

Example 2 with ApiWorkspaceApplicationDescription

use of bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription in project terra-workspace-manager by DataBiosphere.

the class WorkspaceApplicationApiController method enableWorkspaceApplication.

@Override
public ResponseEntity<ApiWorkspaceApplicationDescription> enableWorkspaceApplication(@PathVariable("workspaceId") UUID workspaceId, @PathVariable("applicationId") UUID applicationId) {
    AuthenticatedUserRequest userRequest = getAuthenticatedInfo();
    WsmWorkspaceApplication wsmApp = appService.enableWorkspaceApplication(userRequest, workspaceId, applicationId);
    ApiWorkspaceApplicationDescription response = makeApiWorkspaceApplication(wsmApp);
    return new ResponseEntity<>(response, HttpStatus.OK);
}
Also used : ResponseEntity(org.springframework.http.ResponseEntity) ApiWorkspaceApplicationDescription(bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription) AuthenticatedUserRequest(bio.terra.workspace.service.iam.AuthenticatedUserRequest) WsmWorkspaceApplication(bio.terra.workspace.service.workspace.model.WsmWorkspaceApplication)

Example 3 with ApiWorkspaceApplicationDescription

use of bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription in project terra-workspace-manager by DataBiosphere.

the class WorkspaceApplicationApiController method getWorkspaceApplication.

@Override
public ResponseEntity<ApiWorkspaceApplicationDescription> getWorkspaceApplication(@PathVariable("workspaceId") UUID workspaceId, @PathVariable("applicationId") UUID applicationId) {
    AuthenticatedUserRequest userRequest = getAuthenticatedInfo();
    WsmWorkspaceApplication wsmApp = appService.getWorkspaceApplication(userRequest, workspaceId, applicationId);
    ApiWorkspaceApplicationDescription response = makeApiWorkspaceApplication(wsmApp);
    return new ResponseEntity<>(response, HttpStatus.OK);
}
Also used : ResponseEntity(org.springframework.http.ResponseEntity) ApiWorkspaceApplicationDescription(bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription) AuthenticatedUserRequest(bio.terra.workspace.service.iam.AuthenticatedUserRequest) WsmWorkspaceApplication(bio.terra.workspace.service.workspace.model.WsmWorkspaceApplication)

Aggregations

ApiWorkspaceApplicationDescription (bio.terra.workspace.generated.model.ApiWorkspaceApplicationDescription)3 AuthenticatedUserRequest (bio.terra.workspace.service.iam.AuthenticatedUserRequest)3 WsmWorkspaceApplication (bio.terra.workspace.service.workspace.model.WsmWorkspaceApplication)3 ResponseEntity (org.springframework.http.ResponseEntity)3