Manage templates, categories and comments over AtomPub (#209)
* Manage templates, categories and comments over AtomPub
Add three AtomPub collections to each weblog's workspace:
- Templates (/{handle}/templates): create, read, update and delete a
custom theme's templates, with the standard rendition as atom:content
and the mobile rendition as roller:rendition. Weblog administrators
only, and only while the weblog uses a custom theme and the site
allows custom themes. An empty mobile rendition removes it.
- Categories (/{handle}/categories): create, read, update and delete.
A category in use is removed only with ?moveTo={id}. The entries
collection lists categories inline and also references a new RFC 5023
category document at /{handle}/categories.atomcat.
- Comments (/{handle}/comments): moderation only. List (filter by status
or entry), change roller:status, delete. thr:in-reply-to (RFC 4685)
links to the weblog entry.
Move the template rules from the Templates and TemplateEdit pages into
WeblogTemplateEditor so the UI and AtomPub enforce the same rules, and
add WeblogManager.removeTemplateRendition() for mobile renditions.
* Address PR #209 review findings
- Refuse to delete a weblog's last category (409), as the Categories
page does.
- Make isWeblogCategoryInUse() null-safe for weblogs without a default
category.
- Test that deleting the default category with moveTo hands the default
over, and that the servlet serves the category document.
* Apply the category editor's field rules to AtomPub
- roller:image must be an http or https URL, as on the Categories page,
which now uses the same check. The category wrapper gives templates
only such URLs.
- Category names and descriptions, and template names, links and
descriptions, are limited to 255 characters, as in the editors.
- Test that AtomPub tags use the shared tag character rules.
* Add an AtomPub reference guide (#211)
* Add an AtomPub reference guide
docs/roller-atompub-guide.adoc documents Roller's whole AtomPub
interface: enabling and limits, BASIC and OAuth authentication, the
service document, and the entries, media, category, template and comment
resources (URIs, permissions, elements, status codes), with a curl
session and an error table. It is built to PDF and shipped with the
other guides.
- docs/atompub/examples: XML examples included by the guide. Response
examples are generated from AtomWriter by AtomPubDocExamplesTest, which
fails when they no longer match (-Datompub.docs.update=true rewrites
them). Request examples are hand-written and must parse.
- docs/atompub/roller-atompub.rnc: RELAX NG grammar for the roller:* and
thr:in-reply-to elements; the test validates every example against it
and against the RFC 4287/5023 grammars.
- Move the Jing helper into RelaxNgValidator for both schema tests.
* Document the category image and length rules in the AtomPub guideApache Roller is a Java-based, full-featured, multi-user and group-blog server suitable for blog sites large and small. Roller is typically run with Apache Tomcat and MySQL. Roller is made up of the following Maven projects:
The Roller Install, User and Template Guides are available in ODT format (for OpenOffice or LibraOffice):
Hit the Roller Confluence wiki:
If you want to run Roller in production, then you should down load the latest official release and install it by following the Installation Guide, which you can find at the documentation link: https://github.com/apache/roller/tree/master/docs.
You probably should not run Roller in production using this technique, but it‘s a relatively easy way to try Roller for yourself. Assuming you’ve got a UNIX shell, Java, Maven and Git:
Get the code:
$ git clone https://github.com/apache/roller.git
Compile and build Roller:
$ cd roller $ mvn -DskipTests=true install
Run Roller in Jetty with an embedded Derby database (for testing only):
$ mvn jetty:run
Once Jetty is up and running browse to http://localhost:8080/roller to try to Roller.
Another way to try Roller is to use Docker. This is actually easier than running via Maven because you do not need Maven or Java. If you‘ve got Docker, here’s how you can run Roller for demo purposes.
Get the code:
$ git clone https://github.com/apache/roller.git
Run Docker Compose to build and launch Roller along with a PostgreSQL database:
$ cd roller $ docker-compose up
It will take a while to build and start the Docker image. Once it's done browse to http://localhost:8080/roller to try Roller.