Interface DocumentBuilderHelper
- All Known Implementing Classes:
DefaultDocumentBuilderHelper
public interface DocumentBuilderHelper
Helper methods used to support building the document for indexing.
-
Method Summary
Modifier and TypeMethodDescriptionreadValueByPath
(com.jayway.jsonpath.DocumentContext context, com.broadleafcommerce.search.api.domain.FieldDefinition field) Read the value of the field from the given context object.readValueByPath
(com.jayway.jsonpath.DocumentContext context, String path) Read the value at the path on the given context object.
-
Method Details
-
readValueByPath
@Nullable Object readValueByPath(com.jayway.jsonpath.DocumentContext context, com.broadleafcommerce.search.api.domain.FieldDefinition field) Read the value of the field from the given context object.- Parameters:
context
- the object to read fromfield
- the field to read the value of- Returns:
- the value of the field on the object, or null if not found
-
readValueByPath
@Nullable Object readValueByPath(com.jayway.jsonpath.DocumentContext context, @Nullable String path) Read the value at the path on the given context object.- Parameters:
context
- the object to read frompath
- the path to read the value at- Returns:
- the value at the path on the object, or null if not found
-