Class ReindexEndpoint
- java.lang.Object
-
- com.broadleafcommerce.search.index.core.endpoint.ReindexEndpoint
-
@FrameworkRestController @FrameworkMapping public class ReindexEndpoint extends Object
-
-
Constructor Summary
Constructors Constructor Description ReindexEndpoint(ReindexDelegationService reindexDelegationService)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Map<String,Serializable>
buildAdditionalProperties(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, ReindexRequest reindexRequest)
Creates a map of properties to be passed to the reindex process.protected String
determineName(ReindexRequest request)
void
fullReindex(ReindexRequest reindexRequest, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
protected String
generateName(ReindexRequest request)
protected String
getAuthor(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Returns the user who started this full reindex.protected ReindexDelegationService
getReindexDelegationService()
protected static DateTimeFormatter
getUTC_TIMESTAMP_FORMATTER()
-
-
-
Constructor Detail
-
ReindexEndpoint
public ReindexEndpoint(ReindexDelegationService reindexDelegationService)
-
-
Method Detail
-
fullReindex
@FrameworkPostMapping(value="/full-reindex", consumes="application/json") @Policy(permissionRoots="REINDEX", operationTypes=CREATE) public void fullReindex(@RequestBody ReindexRequest reindexRequest, @ContextOperation com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) throws com.broadleafcommerce.search.api.SearchIndexException
- Throws:
com.broadleafcommerce.search.api.SearchIndexException
-
buildAdditionalProperties
protected Map<String,Serializable> buildAdditionalProperties(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo, ReindexRequest reindexRequest)
Creates a map of properties to be passed to the reindex process.- Parameters:
contextInfo
- The contextreindexRequest
- The details of the requested reindex- Returns:
- A
Map
of properties.
-
determineName
protected String determineName(ReindexRequest request)
-
generateName
protected String generateName(ReindexRequest request)
-
getAuthor
protected String getAuthor(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Returns the user who started this full reindex.- Parameters:
contextInfo
- The context- Returns:
- The author of this full reindex, or the string "Unknown"
-
getReindexDelegationService
protected ReindexDelegationService getReindexDelegationService()
-
getUTC_TIMESTAMP_FORMATTER
protected static DateTimeFormatter getUTC_TIMESTAMP_FORMATTER()
-
-