Class TablePropertyDefinitionUtils
- java.lang.Object
-
- org.openl.rules.table.properties.def.TablePropertyDefinitionUtils
-
public final class TablePropertyDefinitionUtils extends Object
Helper methods, for working with properties.
See alsoPropertiesCheckerfor more methods.- Author:
- DLiauchuk
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ITablePropertiesbuildGlobalTableProperties()static ITablePropertiesbuildGlobalTableProperties(Map<String,Object> globalProperties)static TablePropertyDefinition[]getDefaultDefinitionsByInheritanceLevel(InheritanceLevel inheritanceLevel)static TablePropertyDefinition[]getDefaultDefinitionsForTable(String tableType)static TablePropertyDefinition[]getDefaultDefinitionsForTable(String tableType, InheritanceLevel inheritanceLevel, boolean ignoreSystem)static StringgetDefaultValueForProperty(String propertyName)static List<TablePropertyDefinition>getDimensionalTableProperties()Gets the array of properties names that are dimensional.static String[]getDimensionalTablePropertiesNames()Gets the array of properties names that are dimensional.static Map<String,Object>getGlobalPropertiesToBeSetByDefault()static Map<String,Object>getPropertiesMapToBeSetByDefault()Gets map of properties that must me set for every table by default.static List<TablePropertyDefinition>getPropertiesToBeSetByDefault()Gets list of properties that must me set for every table by default.static TablePropertyDefinitiongetPropertyByName(String name)Gets the property by its given namestatic StringgetPropertyDisplayName(String name)Gets the display name of the property by the given namestatic StringgetPropertyName(String displayName)Gets the name of the property by the given display namestatic Class<?>getPropertyTypeByPropertyName(String name)static XlsNodeTypes[]getSuitableTableTypes(String propertyName)Gets the table types in which this property can be defined.static List<TablePropertyDefinition>getSystemProperties()Gets list of properties that are marked as system.static Class<?>getTypeByPropertyName(String propertyName)static Map<String,List<TablePropertyDefinition>>groupProperties(TablePropertyDefinition[] properties)static booleanisPropertyExist(String propertyName)static Map<String,Object>mergeGlobalProperties(Map<String,Object> properties1, Map<String,Object> properties2)
-
-
-
Method Detail
-
getDimensionalTablePropertiesNames
public static String[] getDimensionalTablePropertiesNames()
Gets the array of properties names that are dimensional.- Returns:
- names of properties that are dimensional.
-
getDimensionalTableProperties
public static List<TablePropertyDefinition> getDimensionalTableProperties()
Gets the array of properties names that are dimensional.- Returns:
- names of properties that are dimensional.
-
getGlobalPropertiesToBeSetByDefault
public static Map<String,Object> getGlobalPropertiesToBeSetByDefault()
-
getPropertyName
public static String getPropertyName(String displayName)
Gets the name of the property by the given display name- Parameters:
displayName-- Returns:
- name
-
getPropertyDisplayName
public static String getPropertyDisplayName(String name)
Gets the display name of the property by the given name- Parameters:
name-- Returns:
- diplayName
-
getPropertyByName
public static TablePropertyDefinition getPropertyByName(String name)
Gets the property by its given name- Parameters:
name-- Returns:
- property definition
-
isPropertyExist
public static boolean isPropertyExist(String propertyName)
-
getPropertiesToBeSetByDefault
public static List<TablePropertyDefinition> getPropertiesToBeSetByDefault()
Gets list of properties that must me set for every table by default.- Returns:
- list of properties.
-
getPropertiesMapToBeSetByDefault
public static Map<String,Object> getPropertiesMapToBeSetByDefault()
Gets map of properties that must me set for every table by default.- Returns:
- list of properties.
-
getSystemProperties
public static List<TablePropertyDefinition> getSystemProperties()
Gets list of properties that are marked as system.- Returns:
- list of properties.
-
getDefaultDefinitionsByInheritanceLevel
public static TablePropertyDefinition[] getDefaultDefinitionsByInheritanceLevel(InheritanceLevel inheritanceLevel)
-
getDefaultDefinitionsForTable
public static TablePropertyDefinition[] getDefaultDefinitionsForTable(String tableType)
-
getDefaultDefinitionsForTable
public static TablePropertyDefinition[] getDefaultDefinitionsForTable(String tableType, InheritanceLevel inheritanceLevel, boolean ignoreSystem)
-
groupProperties
public static Map<String,List<TablePropertyDefinition>> groupProperties(TablePropertyDefinition[] properties)
-
getSuitableTableTypes
public static XlsNodeTypes[] getSuitableTableTypes(String propertyName)
Gets the table types in which this property can be defined.- Parameters:
propertyName- property name.- Returns:
- the table type in which this property can be defined.
NULLif property can be defined for each type of tables.
-
mergeGlobalProperties
public static Map<String,Object> mergeGlobalProperties(Map<String,Object> properties1, Map<String,Object> properties2)
-
buildGlobalTableProperties
public static ITableProperties buildGlobalTableProperties()
-
buildGlobalTableProperties
public static ITableProperties buildGlobalTableProperties(Map<String,Object> globalProperties)
-
-