Created in: 2006-01-07 12:49:31
Author: martin
Size: 3809 bytes
Last updated: 2006-01-07 12:49:31
There isn't related documents
jLibrary includes its own version management system. With it, you'll find very easy to recover information after doing changes on your documents.
Each time a document is updated, jLibrary stores old document content in a new version. This versions can be restored later. As you can imagine, this versions take great amounts of disk space. If this is a problem for you, you can configure try to tune version storage as it will be explained at the end of this tutorial.
To restore a previous version of a document, you must first select that document. Then, right-click on it, and choose Restore previous version option menu. This option, can appear disabled. If it's disabled, then the selected document never have been modified. Update the document, right-click again on it, and you'll see how the restore menu option appears now enabled.
Once Restore previous version has been selected, the version magement dialog will appear. The upper dialog pane allows you to choose between the different versions. Those versions appear ordered chronologically in a tree.
If you select one of those versions, you'll see the content of that selected version on the left lower pane. In the right pane, it will
always be fixed the current version content. The tabs at the bottom of the panes, will allow you to compare content and metadata of the
document versions. Remember, that any minimal change on a document, generates a new version. So if you find two documents that appear to be
equals on their content, maybe they are different on their metadata. So, remember always to check metadata and content.
If you wish to restore a previous version, press the Restore button. Immediately the metadata and content of the choosen version will be loaded on your active editor. The document, will pass to updated state, and the Save toolbar button will be enabled. You must save the document to restore a version definitely. This save requirement offer a final opportunity to cancel the changes if you find that the version isn't appropiate. So if you don't want to restore that version, simply close the document and don't save the changes.
Congratulations ! Now, you know how to manage your document versions :-)
Advanced: How to tune version storage
Version storage can be configured from the conf/repository.xml file. In that file there is an special section in which you can configure the persistence space for the version storage system. In that section you can configure where you want to storage file contents and where you want to storage logical structure contents. This is an example that uses an XML based persistence manager and a file local based filesystem:
<Versioning rootPath="${rep.home}/versions">
<FileSystem class="org.apache.jackrabbit.core.fs.local.LocalFileSystem">
<param name="path" value="${rep.home}/versions"/>
</FileSystem>
<PersistenceManager class="org.apache.jackrabbit.core.state.xml.XMLPersistenceManager" />
</Versioning>
So, you can for example use a database persistence manager on your preferred database engine, for storing version contents. Take a look to jLibrary installation guide to learn how to configure database persistence managers and filesystems.