Daisy Open Source CMS

org.outerj.daisy.repository.spi.local
Interface PreSaveHook


public interface PreSaveHook

A pre-save hook is executed after the repository user requested to save the document, but before the document is actually saved.

This hook can modify the content of the document before saving. For example, to extract information from images or other types of documents and assign it to parts or fields.

The PreSaveHook should be registered as a plugin with the PluginRegistry


Method Summary
 void process(Document document, Repository repository)
          Performs the pre-save work by modifying the supplied Document object.
 

Method Detail

process

void process(Document document,
             Repository repository)
             throws Exception
Performs the pre-save work by modifying the supplied Document object.

If this method throws an exception, it will be logged, but the document will still be saved. Hence, a pre-save hook cannot prevent a document from being saved.

Throws:
Exception

Daisy Open Source CMS