Package com.logicaldoc.core.document
Class DocumentValidator
java.lang.Object
com.logicaldoc.core.metadata.validation.Validator
com.logicaldoc.core.document.DocumentValidator
- All Implemented Interfaces:
DocumentListener
This listener takes care of logically validate a document. If the document
has a template and the template declares a validation script, it is executed
- Since:
- 8.8.1
- Author:
- Marco Meschieri - LogicalDOC
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidafterCheckin(Document document, DocumentHistory transaction, Map<String, Object> dictionary) Called after a document is checked invoidafterSaveHistory(Document document, DocumentHistory event, Map<String, Object> dictionary) Called after an event has been storedvoidafterStore(Document document, DocumentHistory transaction, Map<String, Object> dictionary) Called after a document is stored in the databasevoidbeforeCheckin(Document document, DocumentHistory transaction, Map<String, Object> dictionary) Called before a document is checked invoidbeforeStore(Document document, DocumentHistory transaction, Map<String, Object> dictionary) Called before a document is stored in the database
-
Constructor Details
-
DocumentValidator
public DocumentValidator()
-
-
Method Details
-
beforeStore
public void beforeStore(Document document, DocumentHistory transaction, Map<String, Object> dictionary) throws PersistenceExceptionDescription copied from interface:DocumentListenerCalled before a document is stored in the database- Specified by:
beforeStorein interfaceDocumentListener- Parameters:
document- The document to be storedtransaction- Transaction informationsdictionary- Dictionary of the execution pipeline- Throws:
PersistenceException- raised if something went wrong
-
beforeCheckin
public void beforeCheckin(Document document, DocumentHistory transaction, Map<String, Object> dictionary) throws PersistenceExceptionDescription copied from interface:DocumentListenerCalled before a document is checked in- Specified by:
beforeCheckinin interfaceDocumentListener- Parameters:
document- The document to be checked intransaction- Transaction informationsdictionary- Dictionary of the execution pipeline- Throws:
PersistenceException- raised if something went wrong
-
afterStore
public void afterStore(Document document, DocumentHistory transaction, Map<String, Object> dictionary) throws PersistenceExceptionDescription copied from interface:DocumentListenerCalled after a document is stored in the database- Specified by:
afterStorein interfaceDocumentListener- Parameters:
document- The document to be storedtransaction- Transaction informationsdictionary- Dictionary of the execution pipeline- Throws:
PersistenceException- raised if something went wrong
-
afterCheckin
public void afterCheckin(Document document, DocumentHistory transaction, Map<String, Object> dictionary) throws PersistenceExceptionDescription copied from interface:DocumentListenerCalled after a document is checked in- Specified by:
afterCheckinin interfaceDocumentListener- Parameters:
document- The document to be checked intransaction- Transaction informationsdictionary- Dictionary of the execution pipeline- Throws:
PersistenceException- raised if something went wrong
-
afterSaveHistory
public void afterSaveHistory(Document document, DocumentHistory event, Map<String, Object> dictionary) throws PersistenceExceptionDescription copied from interface:DocumentListenerCalled after an event has been stored- Specified by:
afterSaveHistoryin interfaceDocumentListener- Parameters:
document- The document the event is relative toevent- The saved eventdictionary- Dictionary of the execution pipeline- Throws:
PersistenceException- raised if something went wrong
-