Enabling auto versioning of resources
Resources can be automatically versioned when they are added or updated. However, this feature is disabled by default. It can be enabled by adding following to
Creating versions of resources
Collections are not versioned automatically due to performance considerations. However, you can create versions of collections or resources using the API. It is recommended that collection versions are created only for making checkpoints of the sub-tree you are working on. When connecting to the server from the client side, it is possible to create versions.
Use the following command to create a version of your resource/collection:
Retrieving versions of a given resource
You can list all of the versions of a given resource using the code given below. The result would be an array of
String type, containing links to the different versions of the resource.
Restoring to an old version
Since the Registry comes with versioning, we can restore a resource to any of its versions. This can be done using the registry as well. In the Retrieving versions of a given resource section, we discussed how to retrieve versions for a give resource. The following line of code demonstrates how we can restore back an old version of the registry instance. Note that in the process of restoration, the content, properties, comments, tags, ratings, associations and dependencies will be restored, but subscriptions and permissions related to resources will not be restored.
Managing Metadata - for information on checking versions using the Management Console.