Class ImportFolderCrawler

  • All Implemented Interfaces:
    Runnable

    public class ImportFolderCrawler
    extends com.logicaldoc.core.task.Task
    This component crawls all remote import folders importing found files in the dms.
    Since:
    2.1
    Author:
    Marco Meschieri- LogicalDOC
    • Constructor Detail

      • ImportFolderCrawler

        public ImportFolderCrawler()
    • Method Detail

      • getDocumentDao

        public com.logicaldoc.core.document.dao.DocumentDAO getDocumentDao()
      • setDocumentDao

        public void setDocumentDao​(com.logicaldoc.core.document.dao.DocumentDAO documentDao)
      • crawlImportFolders

        public void crawlImportFolders()
        Downloads all new files from all import folders. The stored document will be owned by the specified default owner
      • onImport

        public void onImport​(ImportFolder importFolder,
                             com.logicaldoc.core.document.Document document,
                             String originalPath,
                             boolean newFile)
        To be invoked after a file has been imported
        Parameters:
        importFolder - the used import folder
        document - the target created / updated document
        originalPath - the original path of the file
        newFile - if this is a new import or an update
      • onError

        public void onError​(ImportFolder importFolder,
                            com.logicaldoc.core.document.Document document,
                            String originalPath,
                            Throwable error)
        To be invoked after an error has been detected
        Parameters:
        importFolder - the used import folder
        document - the target document
        originalPath - the original path of the file
        error - the exception generated by the error
      • isIndeterminate

        public boolean isIndeterminate()
        Specified by:
        isIndeterminate in class com.logicaldoc.core.task.Task
      • isConcurrent

        public boolean isConcurrent()
        Specified by:
        isConcurrent in class com.logicaldoc.core.task.Task
      • setDefaultOwner

        public void setDefaultOwner​(String defaultOwner)
      • getRemoteCount

        public int getRemoteCount()
      • getLocalCount

        public int getLocalCount()
      • getImported

        public long getImported()
      • getUpdated

        public long getUpdated()
      • getErrors

        public long getErrors()
      • getDefaultOwner

        public String getDefaultOwner()
      • _next

        public void _next()
      • getLog

        public org.slf4j.Logger getLog()
      • setImportFolderDao

        public void setImportFolderDao​(ImportFolderDAO importFolderDao)
      • setSequenceDao

        public void setSequenceDao​(com.logicaldoc.core.sequence.SequenceDAO sequenceDao)
      • setImportFolderHistoryDao

        public void setImportFolderHistoryDao​(ImportFolderHistoryDAO importFolderHistoryDao)