|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ImportProcessor
ImportProcessor provides methods to import files into Dekoh. Importing a file means creating instance of
DigitalObject for a File.
| Method Summary | |
|---|---|
void |
beginImport()
Marks the begin for batched commit of files to Dekoh. |
void |
close()
Close Resources (if any) used by processor. |
void |
commitChanges()
Commit all the changes that have been batched since last ImportProcessor.beginImport() callback. |
List |
findFilesThatAreRemovedFromFileSystem(File dir)
Find all files in the specified directory which are actually removed form the file system but are yet to be removed from Dekoh |
ImportStatusInfo |
importDigitalObject(ImportRequest importRequest)
|
ImportStatusInfo |
importDigitalObject(RootFolder rootFolder,
File file)
Create a DigitalObject for this file in dekoh if it does not exist previously |
ImportStatusInfo |
importDigitalObject(RootFolder rootFolder,
File file,
String digitalObjectName)
|
boolean |
isNewDirectory(File directory,
RootFolder rootFolder)
ImportService will use this method to check if Dekoh Database has DigitialObject representations of Files that are removed from filesystem. |
ImportStatusInfo |
removeFileFromDB(File file)
Remove the digitalObject for this file from Dekoh. |
void |
rollback()
Rollback if there is an active transaction started by ImportProcessor.beginImport() |
| Method Detail |
|---|
ImportStatusInfo importDigitalObject(RootFolder rootFolder,
File file)
rootFolder - file - @return one of ImportStatus#digitalObjectStatus()
IllegalStateException - if the method is while no transaction is active.
ImportStatusInfo importDigitalObject(RootFolder rootFolder,
File file,
String digitalObjectName)
ImportStatusInfo importDigitalObject(ImportRequest importRequest)
boolean isNewDirectory(File directory,
RootFolder rootFolder)
ImportedDirectories.getDirectoryStatus(java.io.File,RootFolder)}
cannot determine the state of a directory.
directory - rootFolder -
ImportProcessor.findFilesThatAreRemovedFromFileSystem(java.io.File)List findFilesThatAreRemovedFromFileSystem(File dir)
dir -
ImportStatusInfo removeFileFromDB(File file)
ImportProcessor.findFilesThatAreRemovedFromFileSystem(java.io.File), other cases when this mehtod may be called is when user
triggers deletion.
file -
IllegalStateException - if the method is while no transaction is active.void beginImport()
pre-set limit is reached while importing files
in a directory.
Implementations are expected to start a new Transaction when this method is called.
ImportProcessor.commitChanges(),
ImportProcessor.isNewDirectory(java.io.File,RootFolder),
ImportConfig.getNumberOfFilesInBatch(),
dekoh.portal.fwk.persistence.DIOEntityManagerFactory#createDIOEntityManager()}void commitChanges()
ImportProcessor.beginImport() callback. Batching of commits is
required to control heap usage by the created but yet to be persisted DigitalObjects
dekoh.portal.fwk.persistence.DIOEntityManager#commitTx()}void close()
void rollback()
ImportProcessor.beginImport()
|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
© 2009 Pramati Technologies - Dekoh - Portal for Developers