import java.util.List;
public class SavePropertiesResponder implements SecureResponder {
@Override
public Response makeResponse(FitNesseContext context, Request request) {
SimpleResponse response = new SimpleResponse();
String resource = request.getResource();
WikiPagePath path = PathParser.parse(resource);
WikiPage page = context.root.getPageCrawler().getPage(path);
if (page == null)
return new NotFoundResponder().makeResponse(context, request);
PageData data = page.getData();
saveAttributes(request, data);
VersionInfo commitRecord = page.commit(data);
if (commitRecord != null) {
response.addHeader("Current-Version", commitRecord.getName());
}
context.recentChanges.updateRecentChanges(page);
response.redirect(context.contextRoot, resource);
return response;
}