Interface CxTriggerService

All Known Implementing Classes:
DefaultCxTriggerService

public interface CxTriggerService
Service for manipulating CxAbstractTrigger
  • Method Details

    • createTrigger

      Creates trigger as part of given variation
      Parameters:
      trigger - data to create
      variation - parent variation for created trigger
      Returns:
      saved trigger model
      Throws:
      ModelSavingException - if there is a problem with saving model
    • getTrigger

      Optional<CxAbstractTriggerModel> getTrigger(String code, CxVariationModel variation)
      Finds trigger with given code in given variation
      Parameters:
      code - trigger identifier
      variation - parent variation
      Returns:
      trigger with given code
    • getTriggers

      Finds all triggers in given variation
      Parameters:
      variation - parent variation
      Returns:
      all triggers in given catalog version (collection may be empty)
    • getVariationsForUser

      Collection<CxVariationModel> getVariationsForUser(UserModel user, CatalogVersionModel catalogVersion)
      Returns variations for given user according to defined trigger strategies.
      Parameters:
      user - for which varations should be triggered
      catalogVersion - from which variations will be selected
      Returns:
      collection of varaitions which should be triggered for given user (may be empty)