Package com.logicaldoc.core.document

# Interface DocumentListener

All Known Implementing Classes:
  `DocumentInitializer`, `DocumentValidator`

public interface DocumentListener
This interface defines hooks called before and after a particular event occurs on the specified document.

Each methods has access to a dictionary map that can be used through the execution pipeline in order to carry needed informations among all listeners.

Since:
  4.0
Author:
  Marco Meschieri - LogicalDOC

## Method Summary

Modifier and Type
Method
Description
`void`
`afterCheckin(Document document, DocumentHistory transaction, Map<String,Object> dictionary)`
Called after a document is checked in
`void`
`afterFileStore(Document document, DocumentHistory transaction, Map<String,Object> dictionary)`
Called after a document's file gets stored after a creation or checkin.
`void`
`afterSaveHistory(Document document, DocumentHistory event, Map<String,Object> dictionary)`
Called after an event has been stored
`void`
`afterStore(Document document, DocumentHistory transaction, Map<String,Object> dictionary)`
Called after a document is stored in the database
`void`
`beforeCheckin(Document document, DocumentHistory transaction, Map<String,Object> dictionary)`
Called before a document is checked in
`void`
`beforeStore(Document document, DocumentHistory transaction, Map<String,Object> dictionary)`
Called before a document is stored in the database

## Method Details

### beforeStore

void beforeStore(Document document, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called before a document is stored in the database

Parameters:
  `document` - The document to be stored
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raised if something went wrong

### afterStore

void afterStore(Document document, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called after a document is stored in the database

Parameters:
  `document` - The document to be stored
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raised if something went wrong

### afterFileStore

void afterFileStore(Document document, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called after a document's file gets stored after a creation or checkin.

Parameters:
  `document` - The document to be stored
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raised if something went wrong

### beforeCheckin

void beforeCheckin(Document document, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called before a document is checked in

Parameters:
  `document` - The document to be checked in
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raised if something went wrong

### afterCheckin

void afterCheckin(Document document, DocumentHistory transaction, Map<String,Object> dictionary) throws PersistenceException
Called after a document is checked in

Parameters:
  `document` - The document to be checked in
  `transaction` - Transaction informations
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raised if something went wrong

### afterSaveHistory

void afterSaveHistory(Document document, DocumentHistory event, Map<String,Object> dictionary) throws PersistenceException
Called after an event has been stored

Parameters:
  `document` - The document the event is relative to
  `event` - The saved event
  `dictionary` - Dictionary of the execution pipeline
Throws:
  `PersistenceException` - raised if something went wrong