boolean trace = log.isTraceEnabled();
int paramSep = fullName.indexOf('|');
String fullOpName = paramSep < 0 ? fullName : fullName.substring(0, paramSep);
EmsBean bean = queryComponentBean(fullOpName);
String opName = fullOpName.substring(fullOpName.indexOf(".") + 1);
EmsOperation ops = bean.getOperation(opName);
Collection<PropertySimple> simples = parameters.getSimpleProperties().values();
if (trace) log.trace("Parameters, as simple properties, are " + simples);
Object[] realParams = new Object[simples.size()];
int i = 0;
for (PropertySimple property : simples) {
// Since parameters are typed in UI, passing them as Strings is the only reasonable way of dealing with this
realParams[i++] = property.getStringValue();
}
if (ops == null)
throw new Exception("Operation " + fullOpName + " can't be found");
Object result = ops.invoke(realParams);
String sResult = result != null ? result.toString() : "";
if (trace)
log.trace("Returning operation result containing " + sResult);
return new OperationResult(sResult);
}