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 Summary
FieldsFields inherited from class com.broadleafcommerce.search.index.fulfillment.messaging.handler.AbstractFulfillmentRelatedSingleIndexRequestHandler
CTX_ID_PATH
-
Constructor Summary
ConstructorsConstructorDescriptionFulfillmentChangeSingleIndexRequestHandler
(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 Summary
Modifier and TypeMethodDescriptionprotected void
deleteOrderFulfillmentFromIndex
(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) Deletes an order-fulfillment from the index.protected String
getOrderFulfillmentContextId
(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) protected String
protected String
String[]
void
protected void
indexOrderFulfillment
(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) protected boolean
isDelete
(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) void
processSingleIndexRequest
(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) Methods inherited from class com.broadleafcommerce.search.index.fulfillment.messaging.handler.AbstractFulfillmentRelatedSingleIndexRequestHandler
getCtxId, getOrderFulfillmentService, getReindexDelegationService, getReindexService, readOrderFulfillmentsByContextId, readOrderFulfillmentsByOrderId
Methods inherited from class com.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
getObjectMapper, handle, isValidType
-
Field Details
-
DEFAULT_DELETE_FIELD
- See Also:
-
-
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 classcom.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
-
getSupportedSimpleTypeNames
- Specified by:
getSupportedSimpleTypeNames
in classcom.broadleafcommerce.search.index.common.messaging.handler.AbstractSingleIndexRequestHandler
-
processSingleIndexRequest
public void processSingleIndexRequest(com.fasterxml.jackson.databind.JsonNode singleIndexRequest) - Specified by:
processSingleIndexRequest
in classcom.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
-
getOrderFulfillmentDeleteFieldProperty
-