public final class EditorUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addReferenceSinglingMapping(Map<Pattern,String> mappings)
Adds a type mapping that would change each multi reference into single reference
|
static String |
getCollectionEditorType(DataType valueType,
DataType.Type collectionType) |
static String |
getEditorType(DataAttribute attribute) |
static String |
getEditorType(DataAttribute attribute,
boolean simplifiedLocalized) |
static String |
getEditorType(DataAttribute attribute,
boolean simplifiedLocalized,
Map<Pattern,String> customMappings) |
static String |
getEditorType(DataType type) |
static String |
getEditorType(DataType type,
Boolean simplifiedLocalized) |
static String |
getEditorType(DataType type,
Boolean simplifiedLocalized,
Map<Pattern,String> customMappings) |
static String |
getEnumEditorType(String enumCode) |
static String |
getFeatureEditorType() |
static String |
getFeatureValueEditorType(String valueType) |
static Pattern |
getListEditorPattern()
Returns precompiled regular expression pattern identifying List Editor with capture group containing nested type
|
static Pattern |
getLocalizedEditorPattern()
Returns precompiled regular expression pattern identifying localized Editor with capture group containing nested type
|
static String |
getLocalizedEditorType(String valueType) |
static Pattern |
getMapEditorPattern()
Returns precompiled regular expression pattern identifying Map Editor with capture group 1 containing map's key type
and capture group 2 containing map's value type
|
static String |
getMapEditorType(String keyType,
String valueType) |
static Pattern |
getMultiReferenceEditorPattern()
Returns precompiled regular expression pattern identifying MultiReference Editor with capture group containing nested
type
|
static String |
getRangeEditorType(String valueType) |
static Pattern |
getReferenceEditorPattern()
Returns precompiled regular expression pattern identifying Reference Editor with capture group containing nested type
|
static String |
getReferenceEditorType(String typeCode) |
static Map.Entry<Pattern,String> |
getReferenceSinglingMapping()
Gets a type mapping that would change each multi reference into single reference
|
public static Pattern getLocalizedEditorPattern()
public static Pattern getReferenceEditorPattern()
public static Pattern getMultiReferenceEditorPattern()
public static Pattern getListEditorPattern()
public static Pattern getMapEditorPattern()
public static Map.Entry<Pattern,String> getReferenceSinglingMapping()
getEditorType(DataAttribute, boolean, Map),
getEditorType(DataType, Boolean, Map)public void addReferenceSinglingMapping(Map<Pattern,String> mappings)
mappings - current types mappinggetEditorType(DataAttribute, boolean, Map),
getEditorType(DataType, Boolean, Map)public static String getEditorType(DataAttribute attribute)
attribute - an attribute for which the editor type should be determinedgetEditorType(com.hybris.cockpitng.dataaccess.facades.type.DataAttribute,
boolean)public static String getEditorType(DataAttribute attribute, boolean simplifiedLocalized, Map<Pattern,String> customMappings)
public static String getEditorType(DataAttribute attribute, boolean simplifiedLocalized)
public static String getEditorType(DataType type, Boolean simplifiedLocalized)
type - type of data for which editor is to be foundsimplifiedLocalized - null if not localized, true if editor should be simplified (allows to choose only
one localizationpublic static String getEditorType(DataType type, Boolean simplifiedLocalized, Map<Pattern,String> customMappings)
type - type of data for which editor is to be foundsimplifiedLocalized - null if not localized, true if editor should be simplified (allows to choose only
one localizationcustomMappings - maps data type patterns to editor types (i.e. multiple references into single reference)public static String getCollectionEditorType(DataType valueType, DataType.Type collectionType)
public static String getFeatureEditorType()
Copyright © 2018. All rights reserved.