Interface LoadStoreFeaturesStrategy

  • All Known Implementing Classes:
    DefaultLoadStoreFeaturesStrategy

    public interface LoadStoreFeaturesStrategy
    Strategy for loading features from database and storing features back to database.
    Spring Bean ID:
    loadStoreFeaturesStrategy
    • Method Detail

      • loadFeatures

        java.util.List<Feature> loadFeatures​(java.util.List<ClassAttributeAssignmentModel> assignments,
                                             ProductModel product)
        Load features for particular product.
        Parameters:
        product - the product for which list of Features will be loaded
        Returns:
        the result list of Feature objects
        Throws:
        java.lang.IllegalArgumentException - thrown when product is not persisted
      • storeFeatures

        void storeFeatures​(ProductModel product,
                           java.util.List<Feature> features)
        Store features for particular product to the database. If removeRemaining flag is set to true all existing features which are not on the features list will be removed.
        Parameters:
        product - the product
        features - the list of features to store
        Throws:
        java.lang.IllegalArgumentException - thrown when product is not persisted
      • replaceFeatures

        void replaceFeatures​(java.util.List<ClassAttributeAssignmentModel> allAssignments,
                             ProductModel product,
                             java.util.List<Feature> features)
        Store features for particular product to the database. If removeRemaining flag is set to true all existing features which are not on the features list will be removed.
        Parameters:
        allAssignments - all assignment to take into consideration for replacement
        product - the product
        features - the list of features to store
        Throws:
        java.lang.IllegalArgumentException - thrown when product is not persisted