Search in sources :

Example 1 with UseCaseUserChecksJobStatus

use of com.mercedesbenz.sechub.sharedkernel.usecases.user.execute.UseCaseUserChecksJobStatus in project sechub by mercedes-benz.

the class SchedulerGetJobStatusService method getJobStatus.

@Validated
@UseCaseUserChecksJobStatus(@Step(number = 2, name = "Try to find project and fail or return job status"))
public ScheduleJobStatus getJobStatus(String projectId, UUID jobUUID) {
    assertion.assertIsValidProjectId(projectId);
    assertion.assertIsValidJobUUID(jobUUID);
    scheduleAssert.assertUserHasAccessToProject(projectId);
    scheduleAssert.assertProjectAllowsReadAccess(projectId);
    ScheduleSecHubJob secHubJob = scheduleAssert.assertJob(projectId, jobUUID);
    return new ScheduleJobStatus(secHubJob);
}
Also used : ScheduleSecHubJob(com.mercedesbenz.sechub.domain.schedule.job.ScheduleSecHubJob) UseCaseUserChecksJobStatus(com.mercedesbenz.sechub.sharedkernel.usecases.user.execute.UseCaseUserChecksJobStatus) Validated(org.springframework.validation.annotation.Validated)

Aggregations

ScheduleSecHubJob (com.mercedesbenz.sechub.domain.schedule.job.ScheduleSecHubJob)1 UseCaseUserChecksJobStatus (com.mercedesbenz.sechub.sharedkernel.usecases.user.execute.UseCaseUserChecksJobStatus)1 Validated (org.springframework.validation.annotation.Validated)1