Class ImportFolderCrawler

java.lang.Object
com.logicaldoc.core.task.Task
com.logicaldoc.importfolder.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
  • Field Details Link icon

  • Constructor Details Link icon

    • ImportFolderCrawler Link icon

      public ImportFolderCrawler()
  • Method Details Link icon

    • getCacheManager Link icon

      public ImportFolderCacheManager getCacheManager()
    • setCacheManager Link icon

      public void setCacheManager(ImportFolderCacheManager cacheManager)
    • getDocumentDao Link icon

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

      public void setDocumentDao(com.logicaldoc.core.document.DocumentDAO documentDao)
    • crawlImportFolders Link icon

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

      public void afterCrawlingCompleted(ImportFolder importFolder)
      To be invoked after the crawling has completed
      Parameters:
      importFolder - the used import folder
    • beforeDocumentImported Link icon

      public static void beforeDocumentImported(ImportFolder importFolder, com.logicaldoc.core.document.DocumentHistory transaction)
      To be invoked before a file gets imported
      Parameters:
      importFolder - the used import folder
      transaction - the target created / updated document event (the original path is expected to be the pathOld)
    • afterDocumentImported Link icon

      public void afterDocumentImported(ImportFolder importFolder, com.logicaldoc.core.document.DocumentHistory transaction)
      To be invoked after a file has been imported
      Parameters:
      importFolder - the used import folder
      transaction - the target created / updated document event (the original path is expected to be the pathOld)
    • onError Link icon

      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 Link icon

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

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

      public void setDefaultOwner(String defaultOwner)
    • getRemoteCount Link icon

      public int getRemoteCount()
    • getLocalCount Link icon

      public int getLocalCount()
    • getImported Link icon

      public long getImported()
    • getUpdated Link icon

      public long getUpdated()
    • getErrors Link icon

      public long getErrors()
    • getDefaultOwner Link icon

      public String getDefaultOwner()
    • following Link icon

      public void following()
    • getLog Link icon

      public org.slf4j.Logger getLog()
    • getImportFolderDao Link icon

      public ImportFolderDAO getImportFolderDao()
    • setImportFolderDao Link icon

      public void setImportFolderDao(ImportFolderDAO importFolderDao)
    • setSequenceDao Link icon

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

      public void setImportFolderHistoryDao(ImportFolderHistoryDAO importFolderHistoryDao)