Class SavedCartsAttributeHandler

java.lang.Object
de.hybris.platform.ticket.model.SavedCartsAttributeHandler
All Implemented Interfaces:
DynamicAttributeHandler<List<CartModel>,CustomerModel>

public class SavedCartsAttributeHandler extends Object implements DynamicAttributeHandler<List<CartModel>,CustomerModel>
Class to calculate the value of the dynamic attribute savedCarts.
  • Constructor Details

    • SavedCartsAttributeHandler

      public SavedCartsAttributeHandler()
  • Method Details

    • get

      public List<CartModel> get(CustomerModel model)
      Retrieve current customer's saved carts.
      Specified by:
      get in interface DynamicAttributeHandler<List<CartModel>,CustomerModel>
      Parameters:
      model - The customer model to retrieve saved carts to calculate saved cart List.
      Returns:
      A list of savedCarts.
    • set

      public void set(CustomerModel model, List<CartModel> cartModels)
      Directly throw the UnsupportedOperationException once trying to set dynamic attribute of savedCarts.
      Specified by:
      set in interface DynamicAttributeHandler<List<CartModel>,CustomerModel>
      Parameters:
      model - model for which dynamic attribute is declared.
      cartModels - the value which will be used by setter logic.
      Throws:
      Throw - an UnsupportedOperationException since dynamic attributes are not allowed to write.