class SubscriptionService {

    public void addSubscription(Subscription subscription, String alarmId) {
        validateSubscription(subscription);

        if (this.searchSubscription(subscription, alarmId) != null) {
            LOGGER.debug("Identical subscription found (alarm id: {}).", alarmId);
            throw new DuplicateSubscriptionException("Attempting to add a subscription that already exists on alarm " + alarmId);
        }

        seyrenRepository.addSubscription(subscription, alarmId);
    }

}