Package com.logicaldoc.impex
Class ArchiveImporter
java.lang.Object
com.logicaldoc.core.task.Task
com.logicaldoc.impex.ArchiveImporter
- All Implemented Interfaces:
Runnable
@Component("archiveImporter")
public class ArchiveImporter
extends com.logicaldoc.core.task.Task
This component imports all the documents that are into archives ready to be
imported.
- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
-
Field Summary
Fields inherited from class com.logicaldoc.core.task.Task
STATUS_IDLE, STATUS_RUNNING, STATUS_STOPPING
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.logicaldoc.core.document.DocumentDAO
com.logicaldoc.core.document.DocumentManager
long
long
org.slf4j.Logger
getLog()
long
void
Imports all new documents from all archives.boolean
boolean
void
setArchiveDao
(ArchiveDAO archiveDao) void
setArchiveManager
(ArchiveManager archiveManager) void
setCacheManager
(ArchiveCacheManager cacheManager) void
setDefaultOwner
(String defaultOwner) void
setDocumentDao
(com.logicaldoc.core.document.DocumentDAO documentDao) void
setDocumentManager
(com.logicaldoc.core.document.DocumentManager documentManager) void
setErrors
(long errors) void
setFolderDao
(com.logicaldoc.core.folder.FolderDAO folderDao) void
setImported
(long imported) void
setTenantDao
(com.logicaldoc.core.security.TenantDAO tenantDao) void
setUpdated
(long updated) long
updateSizeAndType
(Archive archive) Used to update the archive number of documents and the archive type reading the attributes 'count' on index fileMethods 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, setReportRecipients, setSendActivityReport, setSize
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
ArchiveImporter
public ArchiveImporter()
-
-
Method Details
-
getDefaultOwner
-
getArchiveDao
-
setArchiveDao
-
getArchiveManager
-
setArchiveManager
-
getDocumentManager
public com.logicaldoc.core.document.DocumentManager getDocumentManager() -
setDocumentManager
public void setDocumentManager(com.logicaldoc.core.document.DocumentManager documentManager) -
getCacheManager
-
setCacheManager
-
isIndeterminate
public boolean isIndeterminate()- Specified by:
isIndeterminate
in classcom.logicaldoc.core.task.Task
-
isConcurrent
public boolean isConcurrent()- Specified by:
isConcurrent
in 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 at data layer
-
setDefaultOwner
-
getDocumentDao
public com.logicaldoc.core.document.DocumentDAO getDocumentDao() -
setDocumentDao
public void setDocumentDao(com.logicaldoc.core.document.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
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
- Throws:
com.logicaldoc.core.PersistenceException
- Error in the data layer
-
setFolderDao
public void setFolderDao(com.logicaldoc.core.folder.FolderDAO folderDao) -
setTenantDao
public void setTenantDao(com.logicaldoc.core.security.TenantDAO tenantDao)
-