Class DocumentScheme

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

    public class DocumentScheme
    extends Object
    implements com.logicaldoc.core.document.DocumentListener
    This listener handles schemes for the document being modified.
    Since:
    4.0
    Author:
    Matteo Caruso - LogicalDOC
    • Constructor Detail

      • DocumentScheme

        public DocumentScheme()
    • Method Detail

      • afterStore

        public void afterStore​(com.logicaldoc.core.document.Document document,
                               com.logicaldoc.core.document.DocumentHistory transaction,
                               Map<String,​Object> dictionary)
        Specified by:
        afterStore in interface com.logicaldoc.core.document.DocumentListener
      • beforeStore

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

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

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

        public static SchemeProcessor buildSchemeProcessor​(String type,
                                                           com.logicaldoc.core.document.Document document,
                                                           boolean checkin,
                                                           boolean update,
                                                           Map<String,​Long> sequenceMap)
        Finds the scheme processor of the proper type
        Parameters:
        type - type of scheme
        document - the document being processed
        checkin - if we are processing a checkin
        update - if we are processing an update of the metadata
        sequenceMap - the map containing the values to use for the different sequences
        Returns:
        the matching processor
      • buildSchemeProcessor

        public static SchemeProcessor buildSchemeProcessor​(String type,
                                                           com.logicaldoc.core.document.Document document,
                                                           boolean checkin,
                                                           boolean update,
                                                           Map<String,​Object> dictionary,
                                                           Map<String,​Long> sequenceMap)
        Finds the scheme processor of the proper type
        Parameters:
        type - type of scheme
        document - the document being processed
        checkin - if we are processing a checkin
        update - if we are processing an update of the metadata
        dictionary - optional dictionary to use in the automation
        sequenceMap - the map containing the values to use for the different sequences
        Returns:
        the matching processor
      • afterSaveHistory

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