public class XPFCategory extends XPFEntity
Constructor and Description |
---|
XPFCategory(@NonNull String code,
@NonNull XPFEntitySupplier<Map<Locale,String>> displayNames,
@NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues,
@NonNull XPFCatalog catalog,
XPFCategory parent) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key)
Returns the non-localized attribute value with the passed key (case-insensitive match).
|
Optional<XPFAttributeValue> |
getAttributeValueByKey(String key,
Locale locale)
Returns the attribute value with the passed key (case insensitive match) and locale.
|
@NonNull Map<Locale,Map<String,XPFAttributeValue>> |
getAttributeValues()
The category attribute value map of maps keyed by Locale and then by attribute key.
|
@NonNull XPFCatalog |
getCatalog()
The associated catalog.
|
@NonNull String |
getCode()
The category code.
|
Optional<String> |
getDisplayName(Locale locale)
Get localized display name for a locale with fallback behavior.
|
Map<Locale,String> |
getDisplayNames()
Get the display names.
|
XPFCategory |
getParent()
The parent category.
|
int |
hashCode() |
String |
toString() |
getCustomData
public XPFCategory(@NonNull @NonNull String code, @NonNull @NonNull XPFEntitySupplier<Map<Locale,String>> displayNames, @NonNull @NonNull Map<Locale,Map<String,XPFAttributeValue>> attributeValues, @NonNull @NonNull XPFCatalog catalog, XPFCategory parent)
public Map<Locale,String> getDisplayNames()
public Optional<XPFAttributeValue> getAttributeValueByKey(String key, Locale locale)
key
- the attribute keylocale
- the attribute value localepublic Optional<XPFAttributeValue> getAttributeValueByKey(String key)
key
- the attribute keypublic Optional<String> getDisplayName(Locale locale)
locale
- The locale to get a display name for.@NonNull public @NonNull String getCode()
@NonNull public @NonNull Map<Locale,Map<String,XPFAttributeValue>> getAttributeValues()
@NonNull public @NonNull XPFCatalog getCatalog()
public XPFCategory getParent()
Copyright © 2025. All rights reserved.