@Override
public OperationResult invokeOperation(String name,
Configuration parameters) throws InterruptedException, Exception {
Operation op = new Operation(name,address);
Map<String,Property> propertyMap = parameters.getAllProperties();
for (Map.Entry<String,Property> entry : propertyMap.entrySet()) {
if (entry.getValue() instanceof PropertySimple) {
PropertySimple ps = (PropertySimple) entry.getValue();
op.addAdditionalProperty(entry.getKey(),ps.getStringValue());
} else if (entry.getValue() instanceof PropertyList) {
PropertyList pl = (PropertyList) entry.getValue();
List<Property> props = pl.getList();
List<String> objects = new ArrayList<String>(props.size());
for (Property p : props) {
PropertySimple ps = (PropertySimple) p;
objects.add(ps.getStringValue());
}
op.addAdditionalProperty(entry.getKey(),objects);
}
}
ASConnection conn = getASConnection();