return def;
}
@Override
public void addPropertyDefinition(FlowPropertyDefinition definition) {
FlowPropertyDefinition currentLocal;
if (getPropertyDefinitions() == null) {
setPropertyDefinitions(new LinkedHashMap<String, FlowPropertyDefinition>());
currentLocal = null;
} else if ( (currentLocal = getLocalPropertyDefinition(definition.getName())) != null) {
// check against the FlowPropertyDefinition
if ( !definition.isDataClassMergeable(currentLocal)) {
getLog().warn(this.getFlowPropertyProviderFullName()+": has new (overriding) definition '"+definition+
"' with different data type than the previous definition '"+currentLocal+"'. The overriding definition will be used.");
} else if (!definition.merge(currentLocal)) {
getLog().debug(this.getFlowPropertyProviderFullName()
+ " has a new FlowPropertyDefinition '"
+ definition
+ "'(overriding) with the same data type but different scope or initializations that conflicts with previous definition " + currentLocal +
". Previous definition discarded.");
}
getPropertyDefinitions().remove(currentLocal.getName());
}
if (!definition.isLocal()) {
// this property may be from the Flow definition itself.
FlowPropertyDefinition current = this.getFlowPropertyDefinitionDefinedInFlow(definition.getName());
if ( current != null && !definition.merge(current)) {
if ( definition.isDataClassMergeable(current)) {
getLog().debug(this.getFlowPropertyProviderFullName()
+ " has a FlowPropertyDefinition '"
+ definition.getName()