Class DefaultSearchRedirectService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>
- java.lang.Object
-
- com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P>
-
- com.broadleafcommerce.search.core.service.DefaultSearchRedirectService<P>
-
- All Implemented Interfaces:
com.broadleafcommerce.data.tracking.core.service.CrudEntityService<P>
,SearchRedirectService<P>
public class DefaultSearchRedirectService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect> extends com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P> implements SearchRedirectService<P>
-
-
Constructor Summary
Constructors Constructor Description DefaultSearchRedirectService(SearchRedirectRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.CrudEntityHelper helper)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SearchRedirectRepository<com.broadleafcommerce.data.tracking.core.Trackable>
getRepository()
Optional<P>
readRedirectByQueryMatch(String query, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Return the first Search Redirect matching indexableType and query.List<P>
readRegexRedirects(com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Return all regex Search Redirects with the given indexable type-
Methods inherited from class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService
convertFromPersistentDomain, convertToPersistentDomain, create, createAll, createAllAllowingPartialSuccess, delete, getHelper, getSortPositionStrategy, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, setSortPositionStrategy, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.broadleafcommerce.data.tracking.core.service.CrudEntityService
create, createAll, createAllAllowingPartialSuccess, delete, readAll, readAll, readAll, readAllByContextId, readByContextId, replace, replaceAll, replaceAllAllowingPartialSuccess, update, updateAll, updateAllAllowingPartialSuccess, updateSort
-
-
-
-
Constructor Detail
-
DefaultSearchRedirectService
public DefaultSearchRedirectService(SearchRedirectRepository<com.broadleafcommerce.data.tracking.core.Trackable> repository, com.broadleafcommerce.data.tracking.core.service.CrudEntityHelper helper)
-
-
Method Detail
-
readRedirectByQueryMatch
public Optional<P> readRedirectByQueryMatch(String query, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:SearchRedirectService
Return the first Search Redirect matching indexableType and query.- Specified by:
readRedirectByQueryMatch
in interfaceSearchRedirectService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>
- Parameters:
query
- the query to find a match forcontextInfo
- The context information surrounding sandboxing/multitenant state- Returns:
- the search redirects matching the query and type
-
readRegexRedirects
public List<P> readRegexRedirects(@Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
Description copied from interface:SearchRedirectService
Return all regex Search Redirects with the given indexable type- Specified by:
readRegexRedirects
in interfaceSearchRedirectService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>
- Parameters:
contextInfo
- The context information surrounding sandboxing/multitenant state- Returns:
- the search redirects matching the type
-
getRepository
protected SearchRedirectRepository<com.broadleafcommerce.data.tracking.core.Trackable> getRepository()
- Overrides:
getRepository
in classcom.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>
-
-