| Constructor and Description |
|---|
Utils() |
| Modifier and Type | Method and Description |
|---|---|
static <P extends Product> |
getAttributeValue(String attribName,
P p,
List<P> parents)
Get the attribute value of a Product.
|
static <T> Object |
getEntityValue(String entitiyFieldName,
T t,
List<T> parents)
Get the field value of an Entity.
|
static Utils |
getInstance() |
static <T> T |
getObjectWithFieldValue(String entitiyFieldName,
T t,
List<T> parents)
Get the Object with the field value != null.
|
static <P extends Product> |
getProductWithAttribute(String attribName,
P p,
List<P> parents)
Get the Product with the attribute != null.
|
static String |
getResourceUrl(Attributes a,
FacetMeta facet,
int index)
Resource definitions that are comma separated or singular.
|
static String |
getResourceUrl(Attributes a,
String attributeName,
int index)
Resource definitions that are comma separated or singular.
|
static String[] |
getResourceUrls(Attributes a,
FacetMeta facet)
Resource definitions that are comma separated or singular.
|
static String[] |
getResourceUrls(Attributes a,
String attributeName)
Resource definitions that are comma separated or singular.
|
static String |
sizeToString(Size size,
String delim,
List<String> lbhOrder)
Deprecated.
|
public static Utils getInstance()
public static final String getResourceUrl(Attributes a, String attributeName, int index)
a - as AttributesattributeName - as Name of Attributeindex; - will extract the index element or return the same element if there is only one valuepublic static final String[] getResourceUrls(Attributes a, String attributeName)
a - as AttributesattributeName - as Name of Attributepublic static final String getResourceUrl(Attributes a, FacetMeta facet, int index)
a - as Attributesfacet - as FacetMetaindex; - will extract the index element or return the same element if there is only one valuepublic static final String[] getResourceUrls(Attributes a, FacetMeta facet)
a - as Attributesfacet - as FacetMetapublic static <P extends Product> String getAttributeValue(String attribName, P p, List<P> parents)
attribName - as Stringp - as Productparents - as list of product (First elements = immediate Parent, last is the top most in hierarchy or DEFAULT)public static <P extends Product> P getProductWithAttribute(String attribName, P p, List<P> parents)
attribName - as Stringp - as Productparents - as list of product (First elements = immediate Parent, last is the top most in hierarchy or DEFAULT)public static <T> Object getEntityValue(String entitiyFieldName, T t, List<T> parents) throws Exception
entitiyFieldName - as Stringt - as Objectparents - as list of product (First elements = immediate Parent, last is the top most in hierarchy or DEFAULT)Exceptionpublic static <T> T getObjectWithFieldValue(String entitiyFieldName, T t, List<T> parents) throws Exception
entitiyFieldName - as Stringt - as Objectparents - as list of product (First elements = immediate Parent, last is the top most in hierarchy or DEFAULT)Exception@Deprecated public static String sizeToString(Size size, String delim, List<String> lbhOrder)
size - as Sizedelim - as Delimeter, applicable for SizeDimensionslbhOrder - as List of fields in order like length, width, height. See StringToSizeTransformer#getLbhOrder()SizeToStringTransformerCopyright © 2018. All rights reserved.