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

  • Constructor Details

    • ImportFolderCrawler

      public ImportFolderCrawler()
  • Method Details

    • getCacheManager

      public ImportFolderCacheManager getCacheManager()
    • setCacheManager

      public void setCacheManager(ImportFolderCacheManager cacheManager)
    • 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
    • beforeDocumentImported

      public static void beforeDocumentImported(ImportFolder importFolder, com.logicaldoc.core.document.AbstractDocument document, String originalPath, com.logicaldoc.core.document.DocumentHistory transaction)
      To be invoked before a file gets imported
      Parameters:
      importFolder - the used import folder
      document - the target created / updated document
      originalPath - the original path of the file
      transaction - the current event
    • afterDocumentImported

      public void afterDocumentImported(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()
    • getImportFolderDao

      public ImportFolderDAO getImportFolderDao()
    • setImportFolderDao

      public void setImportFolderDao(ImportFolderDAO importFolderDao)
    • setSequenceDao

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

      public void setImportFolderHistoryDao(ImportFolderHistoryDAO importFolderHistoryDao)