Interface CustomizationFacade

All Known Implementing Classes:
DefaultCustomizationFacade

public interface CustomizationFacade
Facade for operations on customizations.
  • Method Details

    • getCustomizations

      List<CustomizationData> getCustomizations(String catalogId, String catalogVersionId)
      Retrieves all customizations for given catalog version
      Parameters:
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Returns:
      all customizations for given catalog version
    • getCustomizations

      SearchPageData<CustomizationData> getCustomizations(String catalogId, String catalogVersionId, Map<String,String> params, SearchPageData<?> pagination)
      Retrieves all customizations for given catalog version filtered by given params
      Parameters:
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      params - parameters for query
      pagination - holder of pagination data and sort options
      Returns:
      all customizations for given catalog version
    • getCustomization

      CustomizationData getCustomization(String customizationCode, String catalogId, String catalogVersionId)
      Retrieves customization with given code. Throws exception if no customization with given code exists for catalog version.
      Parameters:
      customizationCode - Identifier of customization
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Returns:
      customization with given code
      Throws:
      UnknownIdentifierException - if customization with given code does not exists
    • createCustomization

      CustomizationData createCustomization(CustomizationData customization, String catalogId, String catalogVersionId)
      Creates customization from provided data. Throws exception if customization with given code already exists.
      Parameters:
      customization - data to create
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Returns:
      created data
      Throws:
      AlreadyExistsException - if item already exists
    • createCustomizationWithRelatedObjects

      CustomizationData createCustomizationWithRelatedObjects(CustomizationData customization, String catalogId, String catalogVersionId)
      Creates customization and related objects like : variation, triggers from provided data.
      Throws exception if customization with given code already exists.
      Parameters:
      customization - data to create
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Returns:
      created customization data
      Throws:
      AlreadyExistsException - if item already exists
    • updateCustomization

      CustomizationData updateCustomization(String customizationCode, CustomizationData customization, String catalogId, String catalogVersionId)
      Updates existing customization.
      Parameters:
      customizationCode - Identifier of customization to update
      customization - Data for update
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Returns:
      updated item
      Throws:
      UnknownIdentifierException - if item does not exists
    • updateCustomizationWithRelatedObjects

      CustomizationData updateCustomizationWithRelatedObjects(String customizationCode, CustomizationData customization, String catalogId, String catalogVersionId)
      Updates existing customization and related objects like : variation, triggers from provided data.
      Parameters:
      customizationCode - Identifier of customization to update
      customization - Data for update
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Returns:
      updated item
      Throws:
      UnknownIdentifierException - if item does not exists
    • removeCustomization

      void removeCustomization(String customizationCode, String catalogId, String catalogVersionId)
      Deletes customization
      Parameters:
      customizationCode - identifier of customization to delete
      catalogId - Catalog identifier
      catalogVersionId - Catalog version identifier
      Throws:
      UnknownIdentifierException - if item does not exists