IAnnotationRepository Plugin

With Vizit 6.3 comes the ability to implement a plugin that lets you save Vizit annotations in a different place than the default. When a document is loaded in Vizit Pro, the annotation file is retrieved and then rendered as a separate layer on top of the document. By default, these annotations are stored in a library called the VizitDataStore which resides in the root SPWeb of the Site Collection of the target document. By implementing an IAnnotationRepository, you can replace the default annotation storage mechanism with one that provides more specific functionality or simply stores the annotations in a different location. Some examples would be to store annotations on a network file storage device, provide separate annotation workspaces for individual users or groups of users, or save annotations in a way that provides version management associated with versions of the target document.

Getting Started

If you haven't already, take a look at this article and follow the instructions in it to get started writing your custom code: http://support.vizit.com/entries/52705159-Getting-Started-With-Vizit-APIs


The rest of this article will explain the details of how to write the specific code for the IAnnotationRepository plugin.

The Basics

Your Vizit install contains an assembly named Vizit.API.Interfaces. For this plugin, you must implement the IAnnotationRepository interface:

public interface IAnnotationRepository : IPlugin 

    void SaveAnnotations(SPFile annotatedDocument, Stream annotationXmlStream, bool documentModified);

    void DeleteAnnotations(SPFile annotatedDocument);

    Stream GetAnnotationXmlStream(SPFile annotatedDocument);

    DateTime GetAnnotationLastModified(SPFile annotatedDocument);

    SPUser GetAnnotationModifiedBy(SPFile annotatedDocument);

    bool AnnotationXmlExists(SPFile annotatedDocument); 
}

Implementing the IAnnotationRepository Interface

We are currently working on code that will provide an example of an IAnnotationRepository.

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk