public void populateExchange(Exchange exchange) {
Map<String, DropboxResultCode> map = (Map<String, DropboxResultCode>)resultEntries;
if (map.size() == 1) {
//set info in exchange
String pathExtracted = null;
DropboxResultCode codeExtracted = null;
for (Map.Entry<String, DropboxResultCode> entry : map.entrySet()) {
pathExtracted = entry.getKey();
codeExtracted = entry.getValue();
}
exchange.getIn().setHeader(DropboxResultHeader.UPLOADED_FILE.name(), pathExtracted);
exchange.getIn().setBody(codeExtracted.name());
} else {
StringBuffer pathsExtracted = new StringBuffer();
for (Map.Entry<String, DropboxResultCode> entry : map.entrySet()) {
pathsExtracted.append(entry.getKey() + "\n");
}