Class FulfillmentChangeSingleIndexRequestHandler

java.lang.Object
com.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
com.broadleafcommerce.search.index.fulfillment.messaging.handler.AbstractFulfillmentRelatedSingleIndexRequestHandler
com.broadleafcommerce.search.index.fulfillment.messaging.handler.FulfillmentChangeSingleIndexRequestHandler

public class FulfillmentChangeSingleIndexRequestHandler extends AbstractFulfillmentRelatedSingleIndexRequestHandler
Listens for single index requests originating from changes to OrderFulfillments and sends them to be updated in the index.
Author:
Dima Myroniuk (dmyroniuk)
  • Field Details

  • Constructor Details

    • FulfillmentChangeSingleIndexRequestHandler

      public FulfillmentChangeSingleIndexRequestHandler(OrderFulfillmentService<com.broadleafcommerce.search.fulfillment.core.domain.OrderFulfillment> orderFulfillmentService, com.broadleafcommerce.search.index.core.service.ReindexDelegationService reindexDelegationService, com.broadleafcommerce.search.index.core.service.ReindexService reindexService, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
  • Method Details

    • hook

      @StreamListener("singleIndexRequestOrderFulfillmentInput") public void hook(String singleIndexRequest)
      Specified by:
      hook in class com.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
    • getSupportedSimpleTypeNames

      public String[] getSupportedSimpleTypeNames()
      Specified by:
      getSupportedSimpleTypeNames in class com.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
    • processSingleIndexRequest

      public void processSingleIndexRequest(com.fasterxml.jackson.databind.JsonNode singleIndexRequest)
      Specified by:
      processSingleIndexRequest in class com.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
    • isDelete

      protected boolean isDelete(com.fasterxml.jackson.databind.JsonNode singleIndexRequest)
      Parameters:
      singleIndexRequest - The JSON representation of the single index request
      Returns:
      true if this is an order-fulfillment delete request, false otherwise.
    • deleteOrderFulfillmentFromIndex

      protected void deleteOrderFulfillmentFromIndex(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) throws com.broadleafcommerce.search.api.SearchIndexException
      Deletes an order-fulfillment from the index.
      Parameters:
      singleIndexRequest - The JSON representation of the single index request
      Throws:
      com.broadleafcommerce.search.api.SearchIndexException - If the deletion fails.
    • indexOrderFulfillment

      protected void indexOrderFulfillment(com.fasterxml.jackson.databind.JsonNode singleIndexRequest)
    • getOrderFulfillmentContextId

      protected String getOrderFulfillmentContextId(com.fasterxml.jackson.databind.JsonNode singleIndexRequest)
    • getOrderFulfillmentContextIdPath

      protected String getOrderFulfillmentContextIdPath()
    • getOrderFulfillmentDeleteFieldProperty

      protected String getOrderFulfillmentDeleteFieldProperty()