use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class AnonymousUserGetAPITokenByOneTimeTokenService method sendUserAPITokenChanged.
@IsSendingAsyncMessage(MessageID.USER_API_TOKEN_CHANGED)
private void sendUserAPITokenChanged(User user) {
DomainMessage request = new DomainMessage(MessageID.USER_API_TOKEN_CHANGED);
UserMessage message = new UserMessage();
message.setEmailAdress(user.getEmailAdress());
message.setUserId(user.getName());
message.setHashedApiToken(user.getHashedApiToken());
request.set(MessageDataKeys.USER_API_TOKEN_DATA, message);
eventBusService.sendAsynchron(request);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class AdministrationConfigService method sendEvent.
@IsSendingAsyncMessage(MessageID.AUTO_CLEANUP_CONFIGURATION_CHANGED)
private void sendEvent(long calculateCleanupTimeInDays) {
AdministrationConfigMessage adminConfigMessage = new AdministrationConfigMessage();
adminConfigMessage.setAutoCleanupInDays(calculateCleanupTimeInDays);
DomainMessage domainMessage = DomainMessageFactory.createEmptyRequest(MessageID.AUTO_CLEANUP_CONFIGURATION_CHANGED);
domainMessage.set(MessageDataKeys.AUTO_CLEANUP_CONFIG_CHANGE_DATA, adminConfigMessage);
domainMessageService.sendAsynchron(domainMessage);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class SchedulerRestartJobService method sendJobRestartCanceled.
@IsSendingAsyncMessage(MessageID.JOB_RESTART_CANCELED)
private void sendJobRestartCanceled(JobDataContext context) {
DomainMessage request = DomainMessageFactory.createEmptyRequest(MessageID.JOB_RESTART_CANCELED);
JobMessage message = new JobMessage();
message.setJobUUID(context.sechubJobUUID);
message.setProjectId(context.projectId);
message.setOwner(context.owner);
message.setOwnerEmailAddress(context.ownerEmailAddress);
message.setInfo(context.info);
request.set(MessageDataKeys.JOB_RESTART_DATA, message);
request.set(MessageDataKeys.ENVIRONMENT_BASE_URL, sechubEnvironment.getServerBaseUrl());
eventBus.sendAsynchron(request);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class SchedulerRestartJobService method sendJobRestartTriggered.
@IsSendingAsyncMessage(MessageID.JOB_RESTART_TRIGGERED)
private void sendJobRestartTriggered(ScheduleSecHubJob secHubJob, String ownerEmailAddress) {
DomainMessage request = DomainMessageFactory.createEmptyRequest(MessageID.JOB_RESTART_TRIGGERED);
JobMessage message = new JobMessage();
message.setJobUUID(secHubJob.getUUID());
message.setProjectId(secHubJob.getProjectId());
message.setOwner(secHubJob.getOwner());
message.setOwnerEmailAddress(ownerEmailAddress);
request.set(MessageDataKeys.JOB_RESTART_DATA, message);
request.set(MessageDataKeys.ENVIRONMENT_BASE_URL, sechubEnvironment.getServerBaseUrl());
eventBus.sendAsynchron(request);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.IsSendingAsyncMessage in project sechub by mercedes-benz.
the class ProductResultService method sendJobResultsPurged.
@IsSendingAsyncMessage(MessageID.JOB_RESULTS_PURGED)
private void sendJobResultsPurged(UUID jobUUID) {
DomainMessage request = DomainMessageFactory.createEmptyRequest(MessageID.JOB_RESULTS_PURGED);
request.set(MessageDataKeys.SECHUB_UUID, jobUUID);
request.set(MessageDataKeys.ENVIRONMENT_BASE_URL, sechubEnvironment.getServerBaseUrl());
eventBus.sendAsynchron(request);
}
Aggregations