Class SessionCartsAttributeHandler

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

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

    • SessionCartsAttributeHandler

      public SessionCartsAttributeHandler()
  • Method Details

    • get

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

      public void set(CustomerModel model, List<CartModel> cartModels)
      Directly throw the UnsupportedOperationException once trying to set dynamic attribute of sessionCarts.
      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.