Interface CustomizationFacade

  • All Known Implementing Classes:
    DefaultCustomizationFacade

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

      • getCustomizations

        java.util.List<CustomizationData> getCustomizations​(java.lang.String catalogId,
                                                            java.lang.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​(java.lang.String catalogId,
                                                            java.lang.String catalogVersionId,
                                                            java.util.Map<java.lang.String,​java.lang.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​(java.lang.String customizationCode,
                                           java.lang.String catalogId,
                                           java.lang.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,
                                              java.lang.String catalogId,
                                              java.lang.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,
                                                                java.lang.String catalogId,
                                                                java.lang.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​(java.lang.String customizationCode,
                                              CustomizationData customization,
                                              java.lang.String catalogId,
                                              java.lang.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​(java.lang.String customizationCode,
                                                                CustomizationData customization,
                                                                java.lang.String catalogId,
                                                                java.lang.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​(java.lang.String customizationCode,
                                 java.lang.String catalogId,
                                 java.lang.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