in src/main/java/org/apache/sling/launchpad/testservices/post/OldStylePostOperationExample.java [38:49]
public void run(SlingHttpServletRequest request, HtmlResponse response, SlingPostProcessor[] processors) {
final Resource r = request.getResource();
final Node n = r.adaptTo(Node.class);
try {
response.setPath(r.getPath());
response.setTitle("Content modified by " + getClass().getSimpleName());
n.setProperty(getClass().getName(), "Old-style operation was applied to " + n.getPath());
n.getSession().save();
} catch(RepositoryException re) {
throw new SlingException(getClass().getSimpleName() + " failed", re);
}
}