WikiPage page = getRequestedPage(request, context);
if (page == null)
return new NotFoundResponder().makeResponse(context, request);
if ("pages".equals(request.getInput("type"))) {
PageXmlizer pageXmlizer = new PageXmlizer();
pageXmlizer.addPageCondition(xmlizePageCondition);
Document doc = pageXmlizer.xmlize(page);
SimpleResponse response = makeResponseWithxml(doc);
return response;
} else if ("data".equals(request.getInput("type"))) {
Document doc = new PageXmlizer().xmlize(page.getData());
SimpleResponse response = makeResponseWithxml(doc);
return response;
} else {
Object object = getObjectToSerialize(request, page);
byte[] bytes = serializeToBytes(object);