Class AbstractBulkFilesystemImporter

java.lang.Object
org.alfresco.repo.bulkimport.impl.AbstractBulkFilesystemImporter
All Implemented Interfaces:
BulkFilesystemImporter, org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Direct Known Subclasses:
MultiThreadedBulkFilesystemImporter

public abstract class AbstractBulkFilesystemImporter extends Object implements BulkFilesystemImporter, org.springframework.beans.factory.InitializingBean, org.springframework.context.ApplicationContextAware
Since:
4.0
  • Field Details

  • Constructor Details

    • AbstractBulkFilesystemImporter

      public AbstractBulkFilesystemImporter()
  • Method Details

    • setRuleService

      public void setRuleService(RuleService ruleService)
    • setBehaviourFilter

      public void setBehaviourFilter(BehaviourFilter behaviourFilter)
    • setJobLockService

      public void setJobLockService(JobLockService jobLockService)
    • setImportStatus

      public void setImportStatus(BulkImportStatusImpl importStatus)
    • setDirectoryAnalyser

      public final void setDirectoryAnalyser(DirectoryAnalyser directoryAnalyser)
    • setFileFolderService

      public void setFileFolderService(FileFolderService fileFolderService)
    • setTransactionService

      public void setTransactionService(TransactionService transactionService)
    • setPermissionService

      public void setPermissionService(PermissionService permissionService)
    • getStatus

      public final BulkImportStatus getStatus()
      Specified by:
      getStatus in interface BulkFilesystemImporter
      Returns:
      A status object that describes the current state of the bulk filesystem importer.
      See Also:
    • afterPropertiesSet

      public void afterPropertiesSet() throws Exception
      Specified by:
      afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
      Throws:
      Exception
    • bulkImportImpl

      protected abstract void bulkImportImpl(BulkImportParameters bulkImportParameters, NodeImporter nodeImporter, String lockToken)
    • getLock

      protected String getLock(long time)
      Attempts to get the lock. If the lock couldn't be taken, then null is returned.
      Returns:
      Returns the lock token or null
    • refreshLock

      protected void refreshLock(String lockToken, long time)
    • releaseLock

      protected void releaseLock(String lockToken)
    • mapToString

      protected final String mapToString(Map<?,?> map)
    • getRepositoryPath

      protected final String getRepositoryPath(NodeRef nodeRef)
    • validateNodeRefIsWritableSpace

      protected final void validateNodeRefIsWritableSpace(NodeRef target)
    • getFileName

      protected String getFileName(File file)
    • getLockToken

      protected String getLockToken()
    • validateSourceIsReadableDirectory

      public void validateSourceIsReadableDirectory(File source)
    • asyncBulkImport

      public void asyncBulkImport(BulkImportParameters bulkImportParameters, NodeImporter nodeImporter)
      Description copied from interface: BulkFilesystemImporter
      Initiates a bulk filesystem import asynchronously i.e. in a background thread. Note: getStatus().inProgress() must be false prior to calling this method or an Exception will be thrown.
      Specified by:
      asyncBulkImport in interface BulkFilesystemImporter
      Parameters:
      bulkImportParameters - The target bulk import parameters.
      nodeImporter - The node importer.
    • bulkImport

      public void bulkImport(BulkImportParameters bulkImportParameters, NodeImporter nodeImporter)
      Description copied from interface: BulkFilesystemImporter
      Initiates a bulk filesystem import. Note: getStatus().inProgress() must be false prior to calling this method or an Exception will be thrown.
      Specified by:
      bulkImport in interface BulkFilesystemImporter
      Parameters:
      bulkImportParameters - The target bulk import parameters.
      nodeImporter - The node importer.
      See Also:
    • setApplicationContext

      public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
      Specified by:
      setApplicationContext in interface org.springframework.context.ApplicationContextAware
      Throws:
      org.springframework.beans.BeansException