Package com.logicaldoc.impex
Class ArchiveVerifier
- java.lang.Object
-
- com.logicaldoc.impex.ArchiveVerifier
-
- Direct Known Subclasses:
DefaultVerifier
public abstract class ArchiveVerifier extends Object
Abstract class to verify an archive. Concrete implementations must check the validity for a specific archive format.- Since:
- 4.5
- Author:
- Matteo Caruso - LogicalDOC
-
-
Constructor Summary
Constructors Constructor Description ArchiveVerifier()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description String
getArchiveName()
File
getDocsDir()
Index
getIndex()
static ArchiveVerifier
getInstance(File dir)
Factory method for the verifier.static ArchiveVerifier
getInstance(File dir, IndexHandler handler)
Factory method for the verifierList<String>
getReport()
boolean
isCheckDocs()
boolean
isCheckDocsNumber()
boolean
isCheckHashes()
boolean
isCheckResources()
boolean
isValid()
void
setLogsLocale(Locale logsLocale)
void
setReport(List<String> report)
abstract boolean
verify()
It is the abstract method of the class.
-
-
-
Method Detail
-
isCheckResources
public boolean isCheckResources()
-
isCheckDocsNumber
public boolean isCheckDocsNumber()
-
isCheckDocs
public boolean isCheckDocs()
-
isCheckHashes
public boolean isCheckHashes()
-
getInstance
public static ArchiveVerifier getInstance(File dir)
Factory method for the verifier. The IndexHandler is used.- Parameters:
dir
- The archive directory- Returns:
- The verifier that match with the directory structure
- See Also:
getInstance(java.io.File,com.logicaldoc.impex.IndexHandler)
-
getInstance
public static ArchiveVerifier getInstance(File dir, IndexHandler handler)
Factory method for the verifier- Parameters:
dir
- The archive directoryhandler
- The handler to be used to read the index file- Returns:
- The verifier that match with the directory structure
-
verify
public abstract boolean verify()
It is the abstract method of the class. It is implemented by the inherit classes DefaultVerifier and StorageVerifier- Returns:
- true if all checks are successfully
-
isValid
public boolean isValid()
-
getDocsDir
public File getDocsDir()
-
setLogsLocale
public void setLogsLocale(Locale logsLocale)
-
getArchiveName
public String getArchiveName()
-
getIndex
public Index getIndex()
-
-