Class DoumentScheme

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

    public class DoumentScheme
    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

      • DoumentScheme

        public DoumentScheme()
    • 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)
        Specified by:
        beforeStore in interface com.logicaldoc.core.document.DocumentListener
      • 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
      • 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
      • buildSchemeProcessor

        public static SchemeProcessor buildSchemeProcessor​(String type,
                                                           com.logicaldoc.core.document.Document document,
                                                           boolean checkin,
                                                           boolean update)
        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
        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)
        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
        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 Exception
        Specified by:
        afterSaveHistory in interface com.logicaldoc.core.document.DocumentListener
        Throws:
        Exception