cometa.exist.triggers
Class ProductReferentialIntegrity

java.lang.Object
  extended by org.exist.collections.triggers.FilteringTrigger
      extended by cometa.exist.triggers.ProductReferentialIntegrity
All Implemented Interfaces:
org.exist.collections.triggers.DocumentTrigger, org.exist.collections.triggers.Trigger, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public class ProductReferentialIntegrity
extends org.exist.collections.triggers.FilteringTrigger

This class extends the eXist database

FilteringTrigger
class and it verifies that the referential integritiy for products is respected. It is executed when a new product metadata is stored to the database or when a product metadata is modified.


Field Summary
 
Fields inherited from class org.exist.collections.triggers.FilteringTrigger
collection, lexicalOutputHandler, LOG, outputHandler, validating
 
Fields inherited from interface org.exist.collections.triggers.Trigger
CREATE_COLLECTION_EVENT, DELETE_COLLECTION_EVENT, REMOVE_DOCUMENT_EVENT, RENAME_COLLECTION_EVENT, STORE_DOCUMENT_EVENT, UPDATE_DOCUMENT_EVENT
 
Constructor Summary
ProductReferentialIntegrity()
           
 
Method Summary
 void finish(int event, org.exist.storage.DBBroker broker, org.exist.storage.txn.Txn transaction, org.exist.dom.DocumentImpl document)
          This method is triggered when the store / update operation is over.
 void prepare(int event, org.exist.storage.DBBroker broker, org.exist.storage.txn.Txn transaction, org.exist.xmldb.XmldbURI documentPath, org.exist.dom.DocumentImpl existingDocument)
          Method that is triggered before the storing / update operation.
 
Methods inherited from class org.exist.collections.triggers.FilteringTrigger
characters, comment, configure, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, getCollection, getInputHandler, getLexicalInputHandler, getLexicalOutputHandler, getLogger, getOutputHandler, ignorableWhitespace, isValidating, processingInstruction, setDocumentLocator, setLexicalOutputHandler, setOutputHandler, setValidating, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductReferentialIntegrity

public ProductReferentialIntegrity()
Method Detail

prepare

public void prepare(int event,
                    org.exist.storage.DBBroker broker,
                    org.exist.storage.txn.Txn transaction,
                    org.exist.xmldb.XmldbURI documentPath,
                    org.exist.dom.DocumentImpl existingDocument)
             throws org.exist.collections.triggers.TriggerException
Method that is triggered before the storing / update operation.

Throws:
org.exist.collections.triggers.TriggerException

finish

public void finish(int event,
                   org.exist.storage.DBBroker broker,
                   org.exist.storage.txn.Txn transaction,
                   org.exist.dom.DocumentImpl document)
This method is triggered when the store / update operation is over.

Specified by:
finish in interface org.exist.collections.triggers.DocumentTrigger
Overrides:
finish in class org.exist.collections.triggers.FilteringTrigger