public void run()

in src/main/java/org/apache/sling/launchpad/testservices/post/SlingPostOperationExample.java [37:48]


    public void run(SlingHttpServletRequest request, PostResponse 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(), "Operation was applied to " + n.getPath());
            n.getSession().save();
        } catch (RepositoryException re) {
            throw new SlingException(getClass().getSimpleName() + " failed", re);
        }
    }