throw new Exception(MISSING_META_PARAM);
}
String collection = (String) message.get(COLLECTION);
String docname = (String) message.get(NAME);
Collection col = getCollection(collection);
Hashtable result = new Hashtable();
if (!col.isMetaEnabled()) {
// meta information is not enabled !
throw new Exception(MISSING_META_CONFIGURATION);
}
// Read and store sent meta data
MetaData meta = new MetaData();
Document doc = DOMParser.toDocument((String) message.get(META));
meta.streamFromXML(doc.getDocumentElement());
col.setDocumentMeta(docname, meta);
// Retreive stored meta data and sent back
meta = col.getDocumentMeta(docname);
doc = new DocumentImpl();
meta.streamToXML(doc, true);
result.put(RESULT, TextWriter.toString(doc));
return result;
}