use of com.mercedesbenz.sechub.sharedkernel.messaging.UserMessage in project sechub by mercedes-benz.
the class ProjectAssignUserService method sendUserAddedToProjectEvent.
@IsSendingAsyncMessage(MessageID.USER_ADDED_TO_PROJECT)
private void sendUserAddedToProjectEvent(String projectId, User user) {
DomainMessage request = new DomainMessage(MessageID.USER_ADDED_TO_PROJECT);
UserMessage projectToUserData = new UserMessage();
projectToUserData.setUserId(user.getName());
projectToUserData.setProjectIds(Arrays.asList(projectId));
request.set(MessageDataKeys.PROJECT_TO_USER_DATA, projectToUserData);
eventBus.sendAsynchron(request);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.UserMessage in project sechub by mercedes-benz.
the class UserRoleAdministrationMessageHandler method handleRoleRecalculationRequest.
@IsReceivingAsyncMessage(MessageID.REQUEST_USER_ROLE_RECALCULATION)
private void handleRoleRecalculationRequest(DomainMessage request) {
UserMessage message = request.get(MessageDataKeys.USER_ID_DATA);
String userId = message.getUserId();
userRoleCalculationService.recalculateRolesOfUser(userId);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.UserMessage in project sechub by mercedes-benz.
the class UserRoleCalculationService method sendUserRoleChangedEvent.
@IsSendingAsyncMessage(MessageID.USER_ROLES_CHANGED)
private void sendUserRoleChangedEvent(User user, Set<String> roles) {
DomainMessage roleChangeRequest = new DomainMessage(MessageID.USER_ROLES_CHANGED);
UserMessage rolesData = new UserMessage();
rolesData.setUserId(user.getName());
rolesData.setRoles(roles);
roleChangeRequest.set(MessageDataKeys.USER_ROLES_DATA, rolesData);
eventBus.sendAsynchron(roleChangeRequest);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.UserMessage in project sechub by mercedes-benz.
the class InternalInitialDataService method informUserCreated.
@IsSendingAsyncMessage(MessageID.USER_CREATED)
private void informUserCreated(User user) {
DomainMessage infoRequest = new DomainMessage(MessageID.USER_CREATED);
UserMessage message = createInitialUserAuthData(user);
infoRequest.set(MessageDataKeys.USER_CREATION_DATA, message);
eventBusService.sendAsynchron(infoRequest);
}
use of com.mercedesbenz.sechub.sharedkernel.messaging.UserMessage in project sechub by mercedes-benz.
the class InternalInitialDataService method informUserAPITokenChanged.
@IsSendingAsyncMessage(MessageID.USER_API_TOKEN_CHANGED)
private void informUserAPITokenChanged(User user) {
DomainMessage infoRequest = new DomainMessage(MessageID.USER_API_TOKEN_CHANGED);
UserMessage message = createInitialUserAuthData(user);
message.setHashedApiToken(user.getHashedApiToken());
infoRequest.set(MessageDataKeys.USER_API_TOKEN_DATA, message);
eventBusService.sendAsynchron(infoRequest);
}
Aggregations