private String getLocalParameterName() { return (getProperty().getName() + ADispatcherTableColumn.LOCAL_PARAM_SUFFIX).intern(); } }
public List<String> getPropertyNamesList() { List<String> propertyNames = new ArrayList<String>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsByInheritanceLevel(InheritanceLevel.valueOf(scopeType.toUpperCase())); for (TablePropertyDefinition propDefinition : propDefinitions) { String propName = propDefinition.getName(); List<String> exceptProperties = getExceptProperties(); if (!exceptProperties.contains(propName)) { propertyNames.add(propName); } } return propertyNames; }
/** * 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); } } }
public List<String> getPropertyNamesList() { List<String> propertyNames = new ArrayList<String>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsByInheritanceLevel(InheritanceLevel.valueOf(scopeType.toUpperCase())); for (TablePropertyDefinition propDefinition : propDefinitions) { String propName = propDefinition.getName(); List<String> exceptProperties = getExceptProperties(); if (!exceptProperties.contains(propName)) { propertyNames.add(propName); } } return propertyNames; }
public List<String> getPropertyNamesList() { List<String> propertyNames = new ArrayList<String>(); TablePropertyDefinition[] propDefinitions = TablePropertyDefinitionUtils .getDefaultDefinitionsByInheritanceLevel(InheritanceLevel.valueOf(scopeType.toUpperCase())); for (TablePropertyDefinition propDefinition : propDefinitions) { String propName = propDefinition.getName(); List<String> exceptProperties = getExceptProperties(); if (!exceptProperties.contains(propName)) { propertyNames.add(propName); } } return propertyNames; }
private void applyDomain(TablePropertyDefinition propDef, IDomainAdaptor gatheredDomain) { String propName = propDef.getName(); String key = propName + ADispatcherTableColumn.LOCAL_PARAM_SUFFIX; if (gatheredDomain != null && !propertiesDomains.containsKey(key)) { if (propDef.getExpression() != null) { propertiesDomains.put(propDef.getExpression().getMatchExpression().getContextAttribute(), gatheredDomain); propertiesDomains.put(propName, gatheredDomain); propertiesDomains.put(key, gatheredDomain); } } }
private List<IDecisionTableColumn> getConditions(List<ITableProperties> propertiesFromMethods, DispatcherTableRules rules) { List<TablePropertyDefinition> dimensionalPropertiesDef = TablePropertyDefinitionUtils.getDimensionalTableProperties(); List<IDecisionTableColumn> conditions = new ArrayList<>(); // get only dimensional properties from methods properties // for (TablePropertyDefinition dimensionProperty : dimensionalPropertiesDef) { if (isSuitable(dimensionProperty.getName(), propertiesFromMethods)) { conditions.add(makeColumn(dimensionProperty, rules)); } } return conditions; }
public String getParameterDeclaration() { String propertyTypeName = getProperty().getType().getInstanceClass().getSimpleName(); return String.format("%s %s%s", propertyTypeName, getProperty().getName(), ADispatcherTableColumn.LOCAL_PARAM_SUFFIX); }
private boolean dimensionalPropertyPresented(IOpenMethod m) { List<TablePropertyDefinition> dimensionalPropertiesDef = TablePropertyDefinitionUtils .getDimensionalTableProperties(); ITableProperties propertiesFromMethod = PropertiesHelper.getTableProperties(m); for (TablePropertyDefinition dimensionProperty : dimensionalPropertiesDef) { String propertyValue = propertiesFromMethod.getPropertyValueAsString(dimensionProperty.getName()); if (StringUtils.isNotEmpty(propertyValue)) { return true; } } return false; }
public String getRuleValue(int ruleIndex, int elementNum) { return getRules().getRule(ruleIndex).getPropertyValueAsString(getProperty().getName()); } }
public String getRuleValue(int ruleIndex, int localParameterIndex) { return getRules().getRule(ruleIndex).getPropertyValueAsString(getProperty().getName()); }
private void init() { MatchingExpression expression = tablePropertyDefinition.getExpression(); if (expression != null) { operationName = expression.getMatchExpression().getOperationName(); propertyVar = tablePropertyDefinition.getName(); contextVar = expression.getMatchExpression().getContextAttribute(); } }
/** * Action that can be use on form. "propNameToAdd" must be specified. */ public void addProperty() { TablePropertyDefinition propDefinition = getPropByName(propNameToAdd); Class<?> propType = propDefinition.getType() == null ? String.class : propDefinition.getType() .getInstanceClass(); properties .add(new TableProperty.TablePropertyBuilder(propDefinition.getName(), propType) .displayName(propDefinition.getDisplayName()).format(propDefinition.getFormat()).build()); possibleToAddProps.remove(propNameToAdd); }
public String getCodeExpression() { String result = StringUtils.EMPTY; String propertyName = getProperty().getName(); MatchingExpression matchExpression = getProperty().getExpression(); if (matchExpression != null) { String parameterName = propertyName + ADispatcherTableColumn.LOCAL_PARAM_SUFFIX; result = getMatchByDefaultCodeExpression(matchExpression) + matchExpression.getMatchExpression().getCodeExpression(parameterName); } else { String message = String.format("Can`t create expression for \"%s\" property validation.", propertyName); throw new OpenlNotCheckedException(message); } return result; }
/** * Action that can be use on form. "propNameToAdd" must be specified. */ public void addProperty() { TablePropertyDefinition propDefinition = getPropByName(propNameToAdd); Class<?> propType = propDefinition.getType() == null ? String.class : propDefinition.getType() .getInstanceClass(); properties .add(new TableProperty.TablePropertyBuilder(propDefinition.getName(), propType) .displayName(propDefinition.getDisplayName()).format(propDefinition.getFormat()).build()); possibleToAddProps.remove(propNameToAdd); }
/** * Action that can be use on form. "propNameToAdd" must be specified. */ public void addProperty() { TablePropertyDefinition propDefinition = getPropByName(propNameToAdd); Class<?> propType = propDefinition.getType() == null ? String.class : propDefinition.getType() .getInstanceClass(); properties .add(new TableProperty.TablePropertyBuilder(propDefinition.getName(), propType) .displayName(propDefinition.getDisplayName()).format(propDefinition.getFormat()).build()); possibleToAddProps.remove(propNameToAdd); }
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); } } }
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 TableProperty(TablePropertyDefinition propDefinition) { this.name = propDefinition.getName(); this.displayName = propDefinition.getDisplayName(); this.type = propDefinition.getType() == null ? String.class : propDefinition.getType().getInstanceClass(); this.group = propDefinition.getGroup(); this.format = propDefinition.getFormat(); this.deprecation = propDefinition.getDeprecation(); this.constraints = propDefinition.getConstraints(); this.description = propDefinition.getDescription(); this.system = propDefinition.isSystem(); this.dimensional = propDefinition.isDimensional(); }
public TableProperty(TablePropertyDefinition propDefinition) { this.name = propDefinition.getName(); this.displayName = propDefinition.getDisplayName(); this.type = propDefinition.getType() == null ? String.class : propDefinition.getType().getInstanceClass(); this.group = propDefinition.getGroup(); this.format = propDefinition.getFormat(); this.deprecation = propDefinition.getDeprecation(); this.constraints = propDefinition.getConstraints(); this.description = propDefinition.getDescription(); this.system = propDefinition.isSystem(); this.dimensional = propDefinition.isDimensional(); }