public SimplePriorityRuleWrapper(String priorityRule, String operationName, String propertyName) { super(priorityRule); this.operationName = operationName; this.propertyName = propertyName; propertyType = TablePropertyDefinitionUtils.getPropertyTypeByPropertyName(propertyName); }
/** * Gets the table types in which this property can be defined. * * @param propertyName property name. * @return the table type in which this property can be defined. * <code>NULL</code> if property can be defined for each type of * tables. */ public static XlsNodeTypes[] getSuitableTableTypes(String propertyName) { TablePropertyDefinition propDefinition = getPropertyByName(propertyName); if (propDefinition != null) { return propDefinition.getTableType(); } return null; }
private TablePropertyDefinition getPropByName(String name) { return TablePropertyDefinitionUtils.getPropertyByName(name); }
/** * Gets the name of the property by the given display name * * @param displayName * @return name */ public static String getPropertyName(String displayName) { for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getDisplayName().equals(displayName)) { return propDefinition.getName(); } } return null; }
protected Map<String, Object> buildSystemProperties() { Map<String, Object> result = new LinkedHashMap<String, Object>(); List<TablePropertyDefinition> systemPropDefinitions = TablePropertyDefinitionUtils.getSystemProperties(); for (TablePropertyDefinition systemPropDef : systemPropDefinitions) { if (systemPropDef.getSystemValuePolicy().equals(SystemValuePolicy.IF_BLANK_ONLY)) { Object systemValue = SystemValuesManager.getInstance(). getSystemValue(systemPropDef.getSystemValueDescriptor()); if (systemValue != null) { result.put(systemPropDef.getName(), systemValue); } } } return result; }
private void checkPropertiesExistance() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.isDimensional() && getProperty(propDefinition.getName()) == null) { TableProperty property = new TableProperty(propDefinition); getPropertiesManager().addProperty(property); } } }
public static Class<?> getTypeByPropertyName(String propertyName) { TablePropertyDefinition tablePropertyDefinition = TablePropertyDefinitionUtils.getPropertyByName(propertyName); if (tablePropertyDefinition != null) { return tablePropertyDefinition.getType().getInstanceClass(); } return null; }
/** * Gets the property by its given name * * @param name * @return property definition */ public static TablePropertyDefinition getPropertyByName(String name) { for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getName().equals(name)) { return propDefinition; } } return null; }
/** * Initialize domain collectors for each dimension property. */ private void initDomainCollectors() { for (TablePropertyDefinition property : TablePropertyDefinitionUtils.getDimensionalTableProperties()) { IDomainCollector domainCollector = getDomainCollector(property); if (domainCollector != null) { domainCollectors.put(property.getName(), domainCollector); } } }
private void initProperties() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.getDeprecation() == null) { TableProperty prop = new TableProperty(propDefinition); properties.add(prop); } } }
public static TablePropertyDefinition[] getDefaultDefinitionsByInheritanceLevel(InheritanceLevel inheritanceLevel) { List<TablePropertyDefinition> resultDefinitions = new ArrayList<TablePropertyDefinition>(); for (TablePropertyDefinition propertyDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (ArrayUtils.contains(propertyDefinition.getInheritanceLevel(), inheritanceLevel)) { resultDefinitions.add(propertyDefinition); } } return resultDefinitions.toArray(new TablePropertyDefinition[0]); }
@Override public boolean suits(TablePropertyDefinitionWrapper wrapper) { // The tablePropertyDefinition suits if the match expression is not empty // return wrapper.getDefinition().getExpression() != null; } });
public static TablePropertyDefinition[] getDefaultDefinitionsForTable(String tableType) { return getDefaultDefinitionsForTable(tableType, null, false); }
/** * Gets the display name of the property by the given name * * @param name * @return diplayName */ public static String getPropertyDisplayName(String name) { for (TablePropertyDefinition propDefinition : DefaultPropertyDefinitions.getDefaultDefinitions()) { if (propDefinition.getName().equals(name)) { return propDefinition.getDisplayName(); } } return null; }
public static Class<?> getPropertyTypeByPropertyName(String name) { TablePropertyDefinition propDefinition = getPropertyByName(name); if (propDefinition != null) { return propDefinition.getType().getInstanceClass(); } return null; } }
/** * Build the table only if there is any property value for any table. * * @return flag if it is needed to build the table for given methods properties */ private boolean needToBuild() { List<TablePropertyDefinition> dimensionalPropertiesDef = TablePropertyDefinitionUtils.getDimensionalTableProperties(); List<ITableProperties> propertiesFromMethods = getMethodsProperties(); for (TablePropertyDefinition dimensionProperty : dimensionalPropertiesDef) { if (isSuitable(dimensionProperty.getName(), propertiesFromMethods)) { return true; } } return false; }
private void initProperties() { TablePropertyDefinition[] propDefinitions = DefaultPropertyDefinitions.getDefaultDefinitions(); for (TablePropertyDefinition propDefinition : propDefinitions) { if (propDefinition.getDeprecation() == null) { TableProperty prop = new TableProperty(propDefinition); properties.add(prop); } } }
private TablePropertyDefinition getPropByName(String name) { return TablePropertyDefinitionUtils.getPropertyByName(name); }
private TablePropertyDefinition getPropByName(String name) { return TablePropertyDefinitionUtils.getPropertyByName(name); }
public static boolean isPropertyExist(String propertyName) { return getPropertyByName(propertyName) != null; }