Commit eed8ad46 authored by helene ortiz's avatar helene ortiz
Browse files

No commit message

No commit message
parent 3af3ef9d
......@@ -155,7 +155,7 @@ public class PropertyManager {
propertiesByControllerType.put(type, propertiesByControllerType.get(superType));
clientFilesFoundPerControllerType.put(type, true);
}
if (dynamicPropertiesByControllerType.containsKey(superType)) {
dynamicPropertiesByControllerType.put(type, dynamicPropertiesByControllerType.get(superType));
clientFilesFoundPerControllerType.put(type, true);
......@@ -416,8 +416,11 @@ public class PropertyManager {
// are only created if necessary for memory reasons.
if (property == null) {
Map<String, Property> dynamicPropertyChildren = createDynamicPropertiesForCommand(command, parentPropertyName);
commandBoxDynamicPropertyMap.put(key, dynamicPropertyChildren);
property = commandBoxDynamicPropertyMap.get(key).get(realPropertyName);
if (dynamicPropertyChildren != null) {
commandBoxDynamicPropertyMap.put(key, dynamicPropertyChildren);
property = commandBoxDynamicPropertyMap.get(key).get(realPropertyName);
}
}
return property;
}
......@@ -593,18 +596,18 @@ public class PropertyManager {
Map<String, Property> childProperties = new HashMap<String, Property>();
XMLDynamicPropertyDescriptor xmlDynamicPropertyDescriptor = getDynamicPropertyDescriptor(command.getType(), parentPropertyName);
if (xmlDynamicPropertyDescriptor == null) {
// This can occur when using a settings file containing property names which have been changed (renamed properties)
PropertyNotFoundException e = new PropertyNotFoundException(parentPropertyName, command.getType(), command.getName(), getClass().getCanonicalName(), "createDynamicPropertiesForCommand", PluginType.COMMAND);
} else {
DynamicPropertyDescriptor dynamicPropertyDescriptor = PropertyDatabase.getInstance().getDynamicPropertyDescriptor(command.getServantId(), xmlDynamicPropertyDescriptor.getPropertyName());
if (dynamicPropertyDescriptor == null) {
// trying with parent name (in case of double dynamic properties)
dynamicPropertyDescriptor = PropertyDatabase.getInstance().getDynamicPropertyDescriptor(command.getServantId(), parentPropertyName);
}
if (dynamicPropertyDescriptor != null) {
int propertyId = PropertyDatabase.getInstance().getDynamicPropertyIdForServant(command.getServantId(), parentPropertyName);
if (propertyId < 0) {
......@@ -615,7 +618,7 @@ public class PropertyManager {
for (int i = 0; i < ids.size(); i++) {
Property childProperty = PropertyFactory.getInstance().createProperty(command.getId(), ids.get(i), xmlDynamicPropertyDescriptor, true);
childProperty.setServerId(command.getServerId());
childProperties.put(childProperty.getName(), childProperty);
}
return childProperties;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment