Interface SearchFieldResolver

All Known Implementing Classes:
SearchFieldResolverImpl

public interface SearchFieldResolver
Resolves which field of an entity should be used for searching when targeting an entity directly and not a specific field on that entity.
Author:
Andre Azzolini (apazzolini)
  • Method Summary

    Modifier and Type
    Method
    Description
    resolveField(String className)
    Returns the name of the field to use for searching for the given entity classname.
    default String
    resolveField(String className, List<SectionCrumb> sectionCrumbs)
    Returns the name of the field to use for searching for the given entity classname, inspecting it with the given section crumbs.
  • Method Details

    • resolveField

      String resolveField(String className) throws org.broadleafcommerce.common.exception.ServiceException
      Returns the name of the field to use for searching for the given entity classname.
      Parameters:
      className -
      Returns:
      the field name
      Throws:
      org.broadleafcommerce.common.exception.ServiceException
    • resolveField

      default String resolveField(String className, List<SectionCrumb> sectionCrumbs) throws org.broadleafcommerce.common.exception.ServiceException
      Returns the name of the field to use for searching for the given entity classname, inspecting it with the given section crumbs. Use this when the entity is being inspected as the target of a lookup field, so the inspect is authorized the same way as the lookup fetch itself (through the owning entity's crumb) rather than requiring direct permission on the looked-up entity.
      Parameters:
      className -
      sectionCrumbs -
      Returns:
      the field name
      Throws:
      org.broadleafcommerce.common.exception.ServiceException