Class ProductCharacteristicManagementResult

java.lang.Object
com.broadleafcommerce.catalog.service.product.dto.ProductCharacteristicManagementResult

public class ProductCharacteristicManagementResult extends Object
Internal DTO used to capture the result of DefaultProductService#manageProductCharacteristics(ProductCharacteristicManagementRequest, ContextInfo)
  • Constructor Details

    • ProductCharacteristicManagementResult

      public ProductCharacteristicManagementResult()
  • Method Details

    • getLatestProductCharacteristicsByProductId

      public Map<String,List<ProductCharacteristic>> getLatestProductCharacteristicsByProductId()

      A map from product ID to the latest state of all of its directly assigned ProductCharacteristic values after the updates were performed.

      For any product on which the CRUD method caller provided a non-empty value for Product.getCharacteristics(), the management flow will engage. For any such request, we want the immediate response to at least contain the updated state of the directly-assigned characteristics of that product.

      In other words, if a product previously had pcA, pcB, and pcC, and the CRUD method caller sent a payload only containing an update of pcB, the immediate response should contain pcA, the updated state of pcB, and pcC. That is what this field will contain.

      It is important to note that the purpose of this is purely to give the CRUD method caller an indication of their change being honored, and to ensure things like ProductCharacteristic.getId() and ProductCharacteristic.getContextState() are available to them in the response. There is no intent for this to try and cover the responsibilities of the full hydration logic from ProductHydrationService.hydrateCharacteristics(List, ContextInfo). If the caller needs to have full hydration, they should engage that after calling the CRUD method.

    • setLatestProductCharacteristicsByProductId

      public void setLatestProductCharacteristicsByProductId(Map<String,List<ProductCharacteristic>> latestProductCharacteristicsByProductId)

      A map from product ID to the latest state of all of its directly assigned ProductCharacteristic values after the updates were performed.

      For any product on which the CRUD method caller provided a non-empty value for Product.getCharacteristics(), the management flow will engage. For any such request, we want the immediate response to at least contain the updated state of the directly-assigned characteristics of that product.

      In other words, if a product previously had pcA, pcB, and pcC, and the CRUD method caller sent a payload only containing an update of pcB, the immediate response should contain pcA, the updated state of pcB, and pcC. That is what this field will contain.

      It is important to note that the purpose of this is purely to give the CRUD method caller an indication of their change being honored, and to ensure things like ProductCharacteristic.getId() and ProductCharacteristic.getContextState() are available to them in the response. There is no intent for this to try and cover the responsibilities of the full hydration logic from ProductHydrationService.hydrateCharacteristics(List, ContextInfo). If the caller needs to have full hydration, they should engage that after calling the CRUD method.

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object