PropertyList property = new PropertyList("result");
CollectionValueSupport valueSupport = (CollectionValueSupport) val;
MetaValue[] msgs = valueSupport.getElements();
for (MetaValue mv : msgs)
{
CompositeValueSupport msg = (CompositeValueSupport) mv;
org.rhq.core.domain.configuration.PropertyMap p1 = new org.rhq.core.domain.configuration.PropertyMap("element");
property.add(p1);
ImmutableCompositeMetaType metaType = (ImmutableCompositeMetaType) msg.getMetaType();
Set<String> keys = metaType.keySet();
for (String key : keys)
{
SimpleValueSupport sattr = (SimpleValueSupport) msg.get(key);
p1.put(new PropertySimple(key,sattr.getValue()));
}
}
c.put(property);
return operationResult;
}
else if (val instanceof CompositeValueSupport)
{
CompositeValueSupport valueSupport = (CompositeValueSupport) val;
if (valueSupport.containsKey("cause"))
{
CompositeValueSupport cause = (CompositeValueSupport) valueSupport.get("cause");
SimpleValueSupport message = (SimpleValueSupport) cause.get("message");
Exception exception = new Exception(message.toString());
throw exception;
}
return new OperationResult("not yet");
}