public final class DynamicAttributesUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
decodeAttributeCode(java.lang.String attributeCode)
Remove dynamic attribute marker (+) from attribute code (if exists)
|
static java.lang.String |
encodeAttributeCode(java.lang.String attributeCode)
Add dynamic attribute marker (+) to attribute code (if does not exist)
|
static java.lang.Class |
getAttributeClass(CategoryAttribute attribute)
Resolve attribute value's Java class
|
static CategoryAttribute |
getCategoryAttribute(com.haulmont.chile.core.model.MetaProperty metaProperty) |
static java.lang.String |
getDynamicAttributeValueAsString(com.haulmont.chile.core.model.MetaProperty metaProperty,
java.lang.Object value)
For collection dynamic attributes the method returns a list of formatted collection items joined with the comma,
for non-collection dynamic attribute a formatted value is returned.
|
static com.haulmont.chile.core.model.MetaPropertyPath |
getMetaPropertyPath(com.haulmont.chile.core.model.MetaClass metaClass,
CategoryAttribute attribute)
Get special meta property path object for dynamic attribute
|
static com.haulmont.chile.core.model.MetaPropertyPath |
getMetaPropertyPath(com.haulmont.chile.core.model.MetaClass metaClass,
java.lang.String attributeCode)
Get special meta property path object for dynamic attribute by code
|
static com.haulmont.chile.core.model.MetaPropertyPath |
getMetaPropertyPath(com.haulmont.chile.core.model.MetaClass metaClass,
java.util.UUID attributeId)
Get special meta property path object for dynamic attribute id
|
static boolean |
isDynamicAttribute(com.haulmont.chile.core.model.MetaProperty metaProperty)
Check if the meta property is dynamic attribute property
|
static boolean |
isDynamicAttribute(java.lang.String name)
Check if the name has dynamic attribute marker
|
public static com.haulmont.chile.core.model.MetaPropertyPath getMetaPropertyPath(com.haulmont.chile.core.model.MetaClass metaClass, CategoryAttribute attribute)
@Nullable public static com.haulmont.chile.core.model.MetaPropertyPath getMetaPropertyPath(com.haulmont.chile.core.model.MetaClass metaClass, java.lang.String attributeCode)
@Nullable public static com.haulmont.chile.core.model.MetaPropertyPath getMetaPropertyPath(com.haulmont.chile.core.model.MetaClass metaClass, java.util.UUID attributeId)
public static java.lang.String decodeAttributeCode(java.lang.String attributeCode)
public static java.lang.String encodeAttributeCode(java.lang.String attributeCode)
public static boolean isDynamicAttribute(java.lang.String name)
public static boolean isDynamicAttribute(com.haulmont.chile.core.model.MetaProperty metaProperty)
public static CategoryAttribute getCategoryAttribute(com.haulmont.chile.core.model.MetaProperty metaProperty)
public static java.lang.Class getAttributeClass(CategoryAttribute attribute)
public static java.lang.String getDynamicAttributeValueAsString(com.haulmont.chile.core.model.MetaProperty metaProperty, java.lang.Object value)