public void setTemplate(JRTemplateElement template) { this.template = template; if (properties != null) { if (this.template != null && this.template.hasProperties()) { properties.setBaseProperties(this.template.getPropertiesMap()); } else { properties.setBaseProperties(null); } } }
public synchronized JRPropertiesMap getPropertiesMap() { if (properties == null) { //FIXME avoid this on read only calls properties = new JRPropertiesMap(); if (template.hasProperties()) { properties.setBaseProperties(template.getPropertiesMap()); } } return properties; }
protected void evaluateProperties(byte evaluation) throws JRException { JRPropertyExpression[] propExprs = getPropertyExpressions(); if (propExprs == null || propExprs.length == 0) { dynamicProperties = null; mergedProperties = staticProperties; } else { dynamicProperties = new JRPropertiesMap(); for (int i = 0; i < propExprs.length; i++) { JRPropertyExpression prop = propExprs[i]; String value = (String) evaluateExpression(prop.getValueExpression(), evaluation); if (value != null) { dynamicProperties.setProperty(prop.getName(), value); } } mergedProperties = dynamicProperties.cloneProperties(); mergedProperties.setBaseProperties(staticProperties); } }