use of com.mercedesbenz.sechub.sharedkernel.usecases.job.UseCaseAdminRestartsJobHard in project sechub by mercedes-benz.
the class JobRestartRequestService method restartJobHard.
@Validated
@UseCaseAdminRestartsJobHard(@Step(number = 2, name = "Restart job", description = "Will trigger event that job restart (hard) requested"))
public void restartJobHard(UUID jobUUID) {
assertion.assertIsValidJobUUID(jobUUID);
auditLogService.log("Requested restart (hard) of job {}", jobUUID);
JobMessage message = buildMessage(jobUUID);
/* trigger event */
triggerJobHardRestartRequest(message);
}
use of com.mercedesbenz.sechub.sharedkernel.usecases.job.UseCaseAdminRestartsJobHard in project sechub by mercedes-benz.
the class InformAdminsThatJobRestartHasBeenTriggeredService method notify.
@UseCaseAdminRestartsJobHard(@Step(number = 4, name = "Inform sechub admins when job has been restarted"))
@UseCaseAdminRestartsJob(@Step(number = 4, name = "Inform sechub admins when job has been restarted"))
public void notify(JobMessage jobMessage, String baseUrl) {
requireNonNull(jobMessage);
SimpleMailMessage message = factory.createMessage("Restart of SecHub Job " + jobMessage.getJobUUID() + " triggered");
message.setTo(notificationConfiguration.getEmailAdministrators());
message.setText(createEmailContent(jobMessage, baseUrl));
emailService.send(message);
}
use of com.mercedesbenz.sechub.sharedkernel.usecases.job.UseCaseAdminRestartsJobHard in project sechub by mercedes-benz.
the class InformAdminsThatJobRestartWasCanceledService method notify.
@UseCaseAdminRestartsJobHard(@Step(number = 3, name = "Inform sechub admins when job restart was canceled"))
@UseCaseAdminRestartsJob(@Step(number = 3, name = "Inform sechub admins when job restart was canceled"))
public void notify(JobMessage jobMessage, String baseUrl) {
requireNonNull(jobMessage);
SimpleMailMessage message = factory.createMessage("Restart of SecHub Job " + jobMessage.getJobUUID() + " was canceled");
message.setTo(notificationConfiguration.getEmailAdministrators());
message.setText(createEmailContent(jobMessage, baseUrl));
emailService.send(message);
}
use of com.mercedesbenz.sechub.sharedkernel.usecases.job.UseCaseAdminRestartsJobHard in project sechub by mercedes-benz.
the class InformAdminsThatJobResultsHaveBeenPurgedService method notify.
@UseCaseAdminRestartsJobHard(@Step(number = 5, name = "Inform sechub admins when job results have been purged"))
@UseCaseAdminRestartsJob(@Step(number = 5, name = "Inform sechub admins when job results have been purged"))
public void notify(UUID sechubJobUUID, String baseUrl) {
requireNonNull(sechubJobUUID);
SimpleMailMessage message = factory.createMessage("Results of SecHub Job " + sechubJobUUID + " have been purged");
message.setTo(notificationConfiguration.getEmailAdministrators());
message.setText(createEmailContent(sechubJobUUID, baseUrl));
emailService.send(message);
}
Aggregations