Enum Class AvailabilityStrategy

java.lang.Object
java.lang.Enum<AvailabilityStrategy>
com.broadleafcommerce.search.provider.solr.util.AvailabilityStrategy
All Implemented Interfaces:
Serializable, Comparable<AvailabilityStrategy>, Constable

public enum AvailabilityStrategy extends Enum<AvailabilityStrategy>
Default inventory availability strategies.
  • Enum Constant Details

    • NONE

      public static final AvailabilityStrategy NONE
      Products are always available in search results
    • CATALOG_ONLY

      public static final AvailabilityStrategy CATALOG_ONLY
      Products are searchable based on availability data from the catalog service
    • CHECK_AVAILABLE_INVENTORY

      public static final AvailabilityStrategy CHECK_AVAILABLE_INVENTORY
      Products are searchable based on availability data from an external service, such as an inventory service
  • Method Details

    • values

      public static AvailabilityStrategy[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static AvailabilityStrategy valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • fromString

      public AvailabilityStrategy fromString(@Nullable String strategy)
      Find the availability strategy based on its string representation.
      Parameters:
      strategy - The availability strategy.
      Returns:
      The availability strategy if found, else null.