As I was creating my first robot, I wasn’t surprised on how little the number of resources available in the internet were, specially about capabilities.xml. I didn’t find any documentation on its schema yet. So, I decided to write about what I’ve learned.
My robot only needs the “document_changed” and “wavelet_self_added” events but I wanted to know what possible tags I can add up to the file for my robot settings. As of now I only know two properties that you can set in the file, the capabilities/events and the version of the file.
Here’s my capabilities.xml
<w:capability name="WAVELET_SELF_ADDED" content="true" />
Notice that it is not case sensitive and you don’t have to set the content=true attribute. Just add the event that you wanted to have for your robot and you can already support it in your servlet. You can see the supported list of events here.
Now about the version tag, you might be wondering how it is different from the version tag in your appengine-web.xml.
The version in capabilities.xml is to set (configure) what capabilities your robot can support. Every time you remove or add capabilities, you need to increment your capabilities version so that your changes will reflect on the server or else it would still be using the old capabilities. You don’t need to change the version when editing other parts of the project. While the version in appengine-web.xml is to tag all the releases of your robot.