Dekoh platform API

dekoh.portal.fwk.importer
Class ImportedDirectories

java.lang.Object
  extended by dekoh.portal.fwk.importer.ImportedDirectories
Direct Known Subclasses:
AggregatedImportedDirectories

public class ImportedDirectories
extends Object

ImportedDirectories is a log of directories imported. A hash of a directory imported is also logged to quickly determine whether any files were added/removed.

Since:
Jan 17, 2007

Field Summary
protected  Properties currentImportHashProperties
           
 FilenameFilter filenameFilter
           
protected  Properties lastImportedHashProperties
           
protected  List moniteredDirectories
           
 
Constructor Summary
protected ImportedDirectories()
           
  ImportedDirectories(FilenameFilter filenameFilter, File portalContextRootDir)
           
 
Method Summary
protected  RootFolder createRootFolder(String dir)
           
 List findDirectoriesThatHaveChangedFromLastImport()
           
 Set getAllRootFolders()
           
protected  File getDirectoryFromPath(String dirPath)
           
 ImportStatus getDirectoryStatus(File dir, RootFolder rootFolder)
          Consults the log of previous import run to determine if the supplied directory is modified.
protected  String getHashKey(File dir)
           
 boolean isPublic(RootFolder root)
           
 void rollbackImportedChange()
          If import process is inturrupted abruptly by user has should be rolled back to its old state
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

lastImportedHashProperties

protected Properties lastImportedHashProperties

currentImportHashProperties

protected Properties currentImportHashProperties

moniteredDirectories

protected List moniteredDirectories

filenameFilter

public FilenameFilter filenameFilter
Constructor Detail

ImportedDirectories

protected ImportedDirectories()

ImportedDirectories

public ImportedDirectories(FilenameFilter filenameFilter,
                           File portalContextRootDir)
Method Detail

getDirectoryStatus

public ImportStatus getDirectoryStatus(File dir,
                                       RootFolder rootFolder)
Consults the log of previous import run to determine if the supplied directory is modified.

Parameters:
dir - directory whose status need to be checked
rootFolder -
Returns:
one of unknown,modified,no change and parent added

getHashKey

protected String getHashKey(File dir)

findDirectoriesThatHaveChangedFromLastImport

public List findDirectoriesThatHaveChangedFromLastImport()
Returns:
List of directories that have changed from what was seen in last import, if the directory was not registered with importService earlier it will also be included in the list

getDirectoryFromPath

protected File getDirectoryFromPath(String dirPath)

rollbackImportedChange

public void rollbackImportedChange()
If import process is inturrupted abruptly by user has should be rolled back to its old state


getAllRootFolders

public Set getAllRootFolders()

createRootFolder

protected RootFolder createRootFolder(String dir)

isPublic

public boolean isPublic(RootFolder root)

Dekoh platform API

© 2009 Pramati Technologies - Dekoh - Portal for Developers