public class XPFProduct extends XPFEntity
Modifier and Type | Field and Description |
---|---|
private @NonNull Map<Locale,Map<String,XPFAttributeValue>> |
attributeValues
The attribute value map of maps keyed by Locale and then by attribute key.
|
private boolean |
bundle
Indicates if this product is a bundle.
|
private @NonNull Set<XPFCategory> |
categories
The categories that this product is a member of.
|
private @NonNull String |
code
The product code.
|
private @NonNull Map<Locale,String> |
displayNames
The product display name.
|
private Instant |
endDate
The end date of this product's availability.
|
private boolean |
hidden
Indicates if this product is hidden.
|
private boolean |
notSoldSeparately
Indicates if this product can be sold separately.
|
private XPFEntitySupplier<List<XPFProductSku>> |
productSkus
The product skus associated with this product.
|
private @NonNull XPFProductType |
productType
The product type.
|
private Instant |
startDate
The start date of this product's availability.
|
Constructor and Description |
---|
XPFProduct() |
Modifier and Type | Method and Description |
---|---|
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key,
Locale locale)
Returns the attribute value with the passed key (case insensitive match) and locale.
|
Optional<String> |
getDisplayName(Locale locale)
Get localized display name for a locale with fallback behavior.
|
List<XPFProductSku> |
getProductSkus()
The product skus associated with this product.
|
@NonNull private final @NonNull String code
@NonNull private final @NonNull Map<Locale,String> displayNames
private final Instant startDate
private final Instant endDate
@NonNull private final @NonNull XPFProductType productType
@NonNull private final @NonNull Set<XPFCategory> categories
@NonNull private final @NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues
private final boolean bundle
private final boolean notSoldSeparately
private final boolean hidden
private final XPFEntitySupplier<List<XPFProductSku>> productSkus
public List<XPFProductSku> getProductSkus()
public Optional<XPFAttributeValue> getAttributeValueByKey(String key, Locale locale)
key
- the attribute keylocale
- the attribute value localeCopyright © 2023. All rights reserved.