|
Dekoh platform API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdekoh.portal.fwk.importer.ImportServiceImpl
public class ImportServiceImpl
Implementation of ImportService that imports matching file types from selected directories in local file
system.
ImportProcessor by calling ImportService.registerObserver(ScanObserver) method.It maintains a hash for each directory to be imported. The value
of hash for each directory is determined by (immediate filename+size+lasModifiedTime). Addition/Changes are commited
after each directory or max 100 photos
| Field Summary | |
|---|---|
static ImportLogger |
importLogger
|
protected ImportProcessor |
importProcessor
|
| Constructor Summary | |
|---|---|
ImportServiceImpl(String id)
Deprecated. use ImportServiceImpl.ImportServiceImpl(String,ImportProcessor) |
|
ImportServiceImpl(String id,
ImportProcessor importProcessor)
|
|
| Method Summary | |
|---|---|
long |
getLastImportTime()
|
protected void |
initService(ImportContext importContext,
ImportProgressObject importProgressObject)
|
void |
registerObserver(ScanObserver scanObserver)
Method to register the scanObserver to ImportService |
void |
setLastImportTime(long lastImportTime,
String id)
|
ImportProgressObject |
start(ImportContext importContext)
Starts importing files in a separate thread and returns the progressObject to the caller. |
ImportProgressObject |
start(ImportContext importContext,
ImportProgressObject importProgressObject)
Starts importing files in a separate thread and returns the progressObject to the caller. |
protected ImportProgressObject |
startImporterThread(ImportContext importContext,
ImportProgressObject importProgressObject)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final ImportLogger importLogger
protected ImportProcessor importProcessor
| Constructor Detail |
|---|
public ImportServiceImpl(String id)
ImportServiceImpl.ImportServiceImpl(String,ImportProcessor)
id -
public ImportServiceImpl(String id,
ImportProcessor importProcessor)
| Method Detail |
|---|
public void registerObserver(ScanObserver scanObserver)
registerObserver in interface ImportServicescanObserver - public ImportProgressObject start(ImportContext importContext)
start in interface ImportServiceimportContext -
ImportProgressObject
public ImportProgressObject start(ImportContext importContext,
ImportProgressObject importProgressObject)
ImportProcessor must be registered with this importService before this method
can be executed.
start in interface ImportServiceimportContext - importProgressObject -
ImportProgressObject
IllegalStateException - if instance of importProcessor is not registered
protected void initService(ImportContext importContext,
ImportProgressObject importProgressObject)
protected ImportProgressObject startImporterThread(ImportContext importContext,
ImportProgressObject importProgressObject)
public long getLastImportTime()
getLastImportTime in interface ImportService
public void setLastImportTime(long lastImportTime,
String id)
|
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