*
* @param message the parameters passed to the xmlrpc method.
* @return Hashtable containing the XML for the requested MetaData object.
*/
public Hashtable execute(Hashtable message) throws Exception {
Collection col = getCollection((String) message.get(COLLECTION));
Hashtable result = new Hashtable();
if (!col.isMetaEnabled()) {
// meta information is not enabled !
throw new Exception(MISSING_META_CONFIGURATION);
}
if (!message.containsKey(NAME)) {
throw new Exception(MISSING_NAME_PARAM);
}
String docname = (String) message.get(NAME);
MetaData meta = col.getDocumentMeta(docname);
Document doc = new DocumentImpl();
doc.appendChild(meta.streamToXML(doc, true));
result.put(RESULT, TextWriter.toString(doc));
return result;