Enum AvailabilityStrategy
- java.lang.Object
-
- java.lang.Enum<AvailabilityStrategy>
-
- com.broadleafcommerce.search.provider.solr.util.AvailabilityStrategy
-
- All Implemented Interfaces:
Serializable
,Comparable<AvailabilityStrategy>
public enum AvailabilityStrategy extends Enum<AvailabilityStrategy>
Default inventory availability strategies.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description CATALOG_ONLY
Products are searchable based on availability data from the catalog serviceCHECK_AVAILABLE_INVENTORY
Products are searchable based on availability data from an external service, such as an inventory serviceNONE
Products are always available in search results
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AvailabilityStrategy
fromString(String strategy)
Find the availability strategy based on its string representation.static AvailabilityStrategy
valueOf(String name)
Returns the enum constant of this type with the specified name.static AvailabilityStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
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 nameNullPointerException
- 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.
-
-