Interface DocumentListener


  • 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 Detail

      • beforeStore

        void beforeStore​(Document document,
                         DocumentHistory transaction,
                         Map<String,​Object> dictionary)
                  throws Exception
        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:
        Exception - raised if something went wrong
      • afterStore

        void afterStore​(Document document,
                        DocumentHistory transaction,
                        Map<String,​Object> dictionary)
                 throws Exception
        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:
        Exception - raised if something went wrong
      • beforeCheckin

        void beforeCheckin​(Document document,
                           DocumentHistory transaction,
                           Map<String,​Object> dictionary)
                    throws Exception
        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:
        Exception - raised if something went wrong
      • afterCheckin

        void afterCheckin​(Document document,
                          DocumentHistory transaction,
                          Map<String,​Object> dictionary)
                   throws Exception
        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:
        Exception - raised if something went wrong