Package com.logicaldoc.impex
Class ArchiveImporter
- java.lang.Object
-
- com.logicaldoc.core.task.Task
-
- com.logicaldoc.impex.ArchiveImporter
-
- All Implemented Interfaces:
Runnable
public class ArchiveImporter extends com.logicaldoc.core.task.TaskThis component imports all the documents that are into archives ready to be imported.- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description ArchiveImporter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArchiveDAOgetArchiveDao()ArchiveManagergetArchiveManager()ArchiveCacheManagergetCacheManager()StringgetDefaultOwner()com.logicaldoc.core.document.dao.DocumentDAOgetDocumentDao()com.logicaldoc.core.document.DocumentManagergetDocumentManager()longgetErrors()longgetImported()org.slf4j.LoggergetLog()longgetUpdated()voidimportArchives()Imports all new documents from all archives.booleanisConcurrent()booleanisIndeterminate()voidsetArchiveDao(ArchiveDAO archiveDao)voidsetArchiveManager(ArchiveManager archiveManager)voidsetCacheManager(ArchiveCacheManager cacheManager)voidsetDefaultOwner(String defaultOwner)voidsetDocumentDao(com.logicaldoc.core.document.dao.DocumentDAO documentDao)voidsetDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager)voidsetErrors(long errors)voidsetFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao)voidsetImported(long imported)voidsetTenantDao(com.logicaldoc.core.security.dao.TenantDAO tenantDao)voidsetUpdated(long updated)longupdateSizeAndType(Archive archive)Used to update the archive number of documents and the archive type reading the attributes 'count' on index file-
Methods inherited from class com.logicaldoc.core.task.Task
addTaskListener, getCompletionPercentage, getConfig, getName, getProgress, getReportRecipients, getScheduling, getSize, getStatus, interrupt, isInterrupted, isInterruptRequested, isRunning, isSendActivityReport, notifyReport, removeTaskListener, run, save, saveWork, setConfig, setLockManager, setReportRecipients, setSendActivityReport, setSender, setSize, setSystemLoadMonitor, setUserDao
-
-
-
-
Field Detail
-
NAME
public static final String NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDefaultOwner
public String getDefaultOwner()
-
getArchiveDao
public ArchiveDAO getArchiveDao()
-
setArchiveDao
public void setArchiveDao(ArchiveDAO archiveDao)
-
getArchiveManager
public ArchiveManager getArchiveManager()
-
setArchiveManager
public void setArchiveManager(ArchiveManager archiveManager)
-
getDocumentManager
public com.logicaldoc.core.document.DocumentManager getDocumentManager()
-
setDocumentManager
public void setDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager)
-
getCacheManager
public ArchiveCacheManager getCacheManager()
-
setCacheManager
public void setCacheManager(ArchiveCacheManager cacheManager)
-
isIndeterminate
public boolean isIndeterminate()
- Specified by:
isIndeterminatein classcom.logicaldoc.core.task.Task
-
isConcurrent
public boolean isConcurrent()
- Specified by:
isConcurrentin classcom.logicaldoc.core.task.Task
-
getImported
public long getImported()
-
getUpdated
public long getUpdated()
-
getErrors
public long getErrors()
-
importArchives
public void importArchives() throws com.logicaldoc.core.PersistenceExceptionImports all new documents from all archives. The stored document will be owned by the specified default owner.- Throws:
com.logicaldoc.core.PersistenceException- error in the database
-
setDefaultOwner
public void setDefaultOwner(String defaultOwner)
-
getDocumentDao
public com.logicaldoc.core.document.dao.DocumentDAO getDocumentDao()
-
setDocumentDao
public void setDocumentDao(com.logicaldoc.core.document.dao.DocumentDAO documentDao)
-
getLog
public org.slf4j.Logger getLog()
-
setImported
public void setImported(long imported)
-
setUpdated
public void setUpdated(long updated)
-
setErrors
public void setErrors(long errors)
-
updateSizeAndType
public long updateSizeAndType(Archive archive)
Used to update the archive number of documents and the archive type reading the attributes 'count' on index file- Parameters:
archive- the archive to update- Returns:
- the total number of entries in the archive
-
setFolderDao
public void setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao)
-
setTenantDao
public void setTenantDao(com.logicaldoc.core.security.dao.TenantDAO tenantDao)
-
-