@Service
public class AppNotificationSerice{

    @Autowired
    private DocspaceRoleRepository drRepo;
    
    @Override
	public void sendNotificationRoleReceived(String roleCode, String account, String requester, String contracName) {
		
		ContractEntity docspace = contractReviewRepo.findByName(contracName);
		
		String role = drRepo.findByCodeAndDocspace(roleCode, docspace)
				.orElseThrow(() -> new DocmonServiceException(Messages.ROLE_NOT_FOUND)).getTranslationKey().getLabel();

		String notification = Constants.NOTIF_ROLE_RECEIVED;
		AppNotificationEntity notifEntity = setNotification(account, requester, notification, contracName, roleCode);
		List<AppNotificationArgEntity> args = new ArrayList<>();
		args.add(new AppNotificationArgEntity(notifEntity.getId(), role, true));
		args.add(new AppNotificationArgEntity(notifEntity.getId(), contracName, false));
		
		notifArgRepo.saveAllAndFlush(args);
	}

}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: