Enum AvailabilityStrategy

    • Enum Constant Detail

      • 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 Detail

      • values

        public static AvailabilityStrategy[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AvailabilityStrategy c : AvailabilityStrategy.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static AvailabilityStrategy valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type 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.