Class WorkflowListener

  • All Implemented Interfaces:
    com.logicaldoc.core.document.DocumentListener

    public class WorkflowListener
    extends Object
    implements com.logicaldoc.core.document.DocumentListener
    This listener assigns a workflow to the document
    Since:
    5.5
    Author:
    Matteo Caruso - LogicalDOC
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void afterCheckin​(com.logicaldoc.core.document.Document document, com.logicaldoc.core.document.DocumentHistory transaction, Map<String,​Object> dictionary)  
      void afterStore​(com.logicaldoc.core.document.Document document, com.logicaldoc.core.document.DocumentHistory transaction, Map<String,​Object> dictionary)
      If the document is stored into the database, we start a workflow over this document according to the document template
      void beforeCheckin​(com.logicaldoc.core.document.Document document, com.logicaldoc.core.document.DocumentHistory transaction, Map<String,​Object> dictionary)  
      void beforeStore​(com.logicaldoc.core.document.Document document, com.logicaldoc.core.document.DocumentHistory transaction, Map<String,​Object> dictionary)
      This method verifies if the document is not already stored into the database.
    • Constructor Detail

      • WorkflowListener

        public WorkflowListener()
    • Method Detail

      • beforeStore

        public void beforeStore​(com.logicaldoc.core.document.Document document,
                                com.logicaldoc.core.document.DocumentHistory transaction,
                                Map<String,​Object> dictionary)
                         throws Exception
        This method verifies if the document is not already stored into the database. If so, we put an entry into the dictionary to recognizes the document after the store operation.
        Specified by:
        beforeStore in interface com.logicaldoc.core.document.DocumentListener
        Throws:
        Exception
      • afterStore

        public void afterStore​(com.logicaldoc.core.document.Document document,
                               com.logicaldoc.core.document.DocumentHistory transaction,
                               Map<String,​Object> dictionary)
                        throws Exception
        If the document is stored into the database, we start a workflow over this document according to the document template
        Specified by:
        afterStore in interface com.logicaldoc.core.document.DocumentListener
        Throws:
        Exception
      • beforeCheckin

        public void beforeCheckin​(com.logicaldoc.core.document.Document document,
                                  com.logicaldoc.core.document.DocumentHistory transaction,
                                  Map<String,​Object> dictionary)
                           throws Exception
        Specified by:
        beforeCheckin in interface com.logicaldoc.core.document.DocumentListener
        Throws:
        Exception
      • afterCheckin

        public void afterCheckin​(com.logicaldoc.core.document.Document document,
                                 com.logicaldoc.core.document.DocumentHistory transaction,
                                 Map<String,​Object> dictionary)
                          throws Exception
        Specified by:
        afterCheckin in interface com.logicaldoc.core.document.DocumentListener
        Throws:
        Exception