return ProviderHelper.notfound(request);
}
public ResponseContext putEntry(
RequestContext request) {
Target target = request.getTarget();
String feed = target.getParameter("feed");
Session session = new Session(host,port);
Database db = session.getDatabase(feed);
try {
CharArrayWriter cwriter = new CharArrayWriter();
setEditDetail(request);
request.getDocument().getRoot().writeTo("json", cwriter);
String json = new String(cwriter.toCharArray());
JSONObject obj = JSONObject.fromObject(json);
String key = target.getParameter("entry");
Document doc = null;
try {
doc = db.getDocument(key);
} catch (Exception e) {
// error if the doc isn't found, we deal with the null result below