Class DefaultSearchRedirectService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>

  • 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>
    • 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 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 interface SearchRedirectService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>
        Parameters:
        query - the query to find a match for
        contextInfo - 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 interface SearchRedirectService<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 class com.broadleafcommerce.data.tracking.core.service.BaseCrudEntityService<P extends com.broadleafcommerce.search.api.domain.SearchRedirect>