Dekoh platform API

dekoh.portal.fwk.importer
Class ImportConfig

java.lang.Object
  extended by dekoh.portal.fwk.importer.ImportConfig

public class ImportConfig
extends Object

ImportConfig stores the information required by ImportService for selecting files to import.

Since:
Nov 14, 2006

Constructor Summary
ImportConfig(RootFolder[] rootFolder, FilenameFilter filenameFilter)
           
ImportConfig(RootFolder[] searchDirs, FilenameFilter filenameFilter, int numberOfFilesInBatch)
           
ImportConfig(RootFolder[] searchDirs, FilenameFilter filenameFilter, int totalFileCount, int numberOfFilesInBatch)
           
 
Method Summary
 RootFolder[] getDirectories()
          Gets the directories that need to be scanned to find matching files needed to be imported to Dekoh.
 FilenameFilter getFilenameFilter()
          Gets the filter to be applied when getting list of files to import from a directory.
 int getNumberOfFilesInBatch()
          Number of imported files to be batched to save to database in a Transaction.
 int getTotalFileCount(ImportProgressObject importProgressObject)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImportConfig

public ImportConfig(RootFolder[] rootFolder,
                    FilenameFilter filenameFilter)

ImportConfig

public ImportConfig(RootFolder[] searchDirs,
                    FilenameFilter filenameFilter,
                    int totalFileCount,
                    int numberOfFilesInBatch)

ImportConfig

public ImportConfig(RootFolder[] searchDirs,
                    FilenameFilter filenameFilter,
                    int numberOfFilesInBatch)
Parameters:
searchDirs -
filenameFilter -
numberOfFilesInBatch - (optional, defaults to 10) all the files in a directory are saved to database unless a directory contains large number of files. In such cases when a director may contain lot of files, this parameter controls how many files can be batched in one attempt to
Method Detail

getDirectories

public RootFolder[] getDirectories()
Gets the directories that need to be scanned to find matching files needed to be imported to Dekoh.

Returns:
directories

getFilenameFilter

public FilenameFilter getFilenameFilter()
Gets the filter to be applied when getting list of files to import from a directory.

Returns:
filter

getNumberOfFilesInBatch

public int getNumberOfFilesInBatch()
Number of imported files to be batched to save to database in a Transaction. To control runtime memory usage when importing large number of files, flushing the imported files to DB periodically is a good idea.

Returns:

getTotalFileCount

public int getTotalFileCount(ImportProgressObject importProgressObject)

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers