//fail(context, "No configuration found for " + targetName);
fail(context, localStrings.getLocalString("admin.set.configuration.notfound", "No configuration found for {0}", propTargetName));
return false;
}
// need to find the right parent.
Dom parentNode = null;
for (Map.Entry<Dom, String> node : matchingNodes.entrySet()) {
if (node.getValue().equals(pattern)) {
parentNode = node.getKey();
}
}
if (parentNode == null) {
//fail(context, "No configuration found for " + targetName);
fail(context, localStrings.getLocalString("admin.set.configuration.notfound", "No configuration found for {0}", propTargetName));
return false;
}
if (value == null || value.length() == 0) {
// setting to the empty string means to remove the property, so don't create it
recordAutoSuccessAction(propTargetName, value);
success(context, propTargetName, value);
return true;
}
// create and set the property
if ( ! (parentNode instanceof ConfigBean)) {
throw new ClassCastException(
localStrings.getLocalString("admin.set.DomNotConfigBean",
"Expected object of type Dom ({0}) to be a ConfigBean but it is not",
parentNode.getClass().getName()));
}
recordConfigBeanCreateAndSet((ConfigBean) parentNode, attrName,
value, propTargetName);
return true;
}
}
/*
* We are processing a "set" applied to something other than a
* property.
*/
final NonPropertyAction nonPropAction = new NonPropertyAction(value);
setAction = nonPropAction;
boolean delProperty = false;
Map<String, String> attrChanges = new HashMap<String, String>();
if (isProperty) {
attrName = "value";
if ((value == null) || (value.length() == 0)) {
delProperty = true;
}
attrChanges.put(attrName, value);
}
List<Map.Entry> mNodes = new ArrayList(matchingNodes.entrySet());
if (applyOverrideRules) {
mNodes = applyOverrideRules(mNodes);
}
for (Map.Entry<Dom, String> node : mNodes) {
final Dom targetNode = node.getKey();
for (String name : targetNode.model.getAttributeNames()) {
String finalDottedName = node.getValue() + "." + name;
if (matches(finalDottedName, pattern)) {
if (attrName.equals(name) ||