Class AlertNotifierServiceImpl

java.lang.Object
io.gravitee.am.service.impl.AlertNotifierServiceImpl
All Implemented Interfaces:
AlertNotifierService

@Component @Primary public class AlertNotifierServiceImpl extends Object implements AlertNotifierService
Author:
Jeoffrey HAEYAERT (jeoffrey.haeyaert at graviteesource.com), GraviteeSource Team
  • Constructor Details

  • Method Details

    • getById

      public io.reactivex.rxjava3.core.Single<AlertNotifier> getById(ReferenceType referenceType, String referenceId, String notifierId)
      Get the alert notifier by its id and reference it belongs to.
      Specified by:
      getById in interface AlertNotifierService
      Parameters:
      referenceType - the reference type.
      referenceId - the reference id.
      notifierId - the notifier identifier.
      Returns:
      the alert notifier found or an AlertNotifierNotFoundException exception if it has not been found.
    • findByDomainAndCriteria

      public io.reactivex.rxjava3.core.Flowable<AlertNotifier> findByDomainAndCriteria(String domainId, AlertNotifierCriteria criteria)
      Find all the alert notifiers of a domain corresponding to the specified criteria.
      Specified by:
      findByDomainAndCriteria in interface AlertNotifierService
      Parameters:
      domainId - the domain the alert notifiers are attached to.
      criteria - the criteria to match.
      Returns:
      the list of alert notifiers found.
    • findByReferenceAndCriteria

      public io.reactivex.rxjava3.core.Flowable<AlertNotifier> findByReferenceAndCriteria(ReferenceType referenceType, String referenceId, AlertNotifierCriteria criteria)
      Find all the alert notifiers by reference (ex: domain) corresponding to the specified criteria.
      Specified by:
      findByReferenceAndCriteria in interface AlertNotifierService
      Parameters:
      referenceType - the reference type.
      referenceId - the reference id.
      criteria - the criteria to match.
      Returns:
      the list of alert notifiers found.
    • create

      public io.reactivex.rxjava3.core.Single<AlertNotifier> create(ReferenceType referenceType, String referenceId, NewAlertNotifier newAlertNotifier, User byUser)
      Create a new alert notifier.
      Specified by:
      create in interface AlertNotifierService
      Parameters:
      referenceType - the reference type the newly created alert notifier will be attached to.
      referenceId - the reference id the newly created alert notifier will be attached to.
      newAlertNotifier - the information about the alert notifier to create.
      byUser - the user at the origin of the creation.
      Returns:
      the newly created alert notifier.
    • update

      public io.reactivex.rxjava3.core.Single<AlertNotifier> update(ReferenceType referenceType, String referenceId, String alertNotifierId, PatchAlertNotifier patchAlertNotifier, User byUser)
      Update an existing alert notifier.
      Specified by:
      update in interface AlertNotifierService
      Parameters:
      referenceType - the reference type the newly created alert notifier will be attached to.
      referenceId - the reference id the newly created alert notifier will be attached to.
      patchAlertNotifier - the information about the alert notifier to update.
      byUser - the user at the origin of the update.
      Returns:
      the updated alert notifier or a AlertNotifierNotFoundException if the notifier has not been found.
    • delete

      public io.reactivex.rxjava3.core.Completable delete(ReferenceType referenceType, String referenceId, String notifierId, User byUser)
      Delete the alert notifier by its id and reference it belongs to.
      Specified by:
      delete in interface AlertNotifierService
      Parameters:
      referenceType - the reference type.
      referenceId - the reference id.
      notifierId - the notifier identifier.
      Returns:
      nothing if the alert notifier has been successfully delete or an AlertNotifierNotFoundException exception if it has not been found.