Interface TriggerFacade

All Known Implementing Classes:
DefaultTriggerFacade

public interface TriggerFacade
Facade for interacting with TriggerData
  • Method Details

    • getTrigger

      TriggerData getTrigger(String customizationCode, String variationCode, String triggerCode, String catalogId, String catalogVersionId)
      Retrieves TriggerData with given code from catalog/catalogVersion/customization/variation
      Parameters:
      customizationCode - parent customization identifier
      variationCode - parent variation identifier
      triggerCode - trigger identifier
      catalogId - catalog identifier
      catalogVersionId - catalog version identifier
      Returns:
      TriggerData for give code
      Throws:
      UnknownIdentifierException - if any of the provided identifiers is invalid
    • getTriggers

      List<TriggerData> getTriggers(String customizationCode, String variationCode, String catalogId, String catalogVersionId)
      Retrieves all TriggerData related to given variation
      Parameters:
      customizationCode - parent customization identifier
      variationCode - parent variation identifier
      catalogId - catalog identifier
      catalogVersionId - catalog version identifier
      Returns:
      List with all TriggerData related to given variation in catalog version (may be empty)
      Throws:
      UnknownIdentifierException - if any of the provided identifiers is invalid
    • createTrigger

      TriggerData createTrigger(String customizationCode, String variationCode, TriggerData data, String catalogId, String catalogVersionId)
      Creates TriggerData in given variation from provided data
      Parameters:
      customizationCode - parent customization identifier
      variationCode - parent variation identifier
      data - from which trigger is created
      catalogId - catalog identifier
      catalogVersionId - catalog version identifier
      Returns:
      Created trigger data
      Throws:
      UnknownIdentifierException - if any of the provided identifiers is invalid
      AlreadyExistsException - if trigger with given code already exist in given variation
      IllegalArgumentException - if provided data is null or contains invalid data
    • updateTrigger

      TriggerData updateTrigger(String customizationCode, String variationCode, String triggerCode, TriggerData data, String catalogId, String catalogVersionId)
      Updates trigger data with given code with provided data
      Parameters:
      customizationCode - parent customization identifier
      variationCode - parent variation identifier
      triggerCode - trigger identifier
      data - from which trigger is created
      catalogId - catalog identifier
      catalogVersionId - catalog version identifier
      Returns:
      updated trigger data
      Throws:
      UnknownIdentifierException - if any of the provided identifiers is invalid
      IllegalArgumentException - if provided data is null or contains invalid data
    • deleteTrigger

      void deleteTrigger(String customizationCode, String variationCode, String triggerCode, String catalogId, String catalogVersionId)
      Deletes trigger with given code
      Parameters:
      customizationCode - parent customization identifier
      variationCode - parent variation identifier
      triggerCode - trigger identifier
      catalogId - catalog identifier
      catalogVersionId - catalog version identifier
      Throws:
      UnknownIdentifierException - if any of the provided identifiers is invalid