Package com.logicaldoc.impex
Class ArchiveVerifier
java.lang.Object
com.logicaldoc.impex.ArchiveVerifier
- Direct Known Subclasses:
DefaultVerifier
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 -
Method Summary
Modifier and TypeMethodDescriptiongetIndex()static ArchiveVerifiergetInstance(File dir) Factory method for the verifier.static ArchiveVerifiergetInstance(File dir, IndexHandler handler) Factory method for the verifierbooleanbooleanbooleanbooleanbooleanisValid()voidsetLogsLocale(Locale logsLocale) voidabstract booleanverify()It is the abstract method of the class.
-
Constructor Details
-
ArchiveVerifier
public ArchiveVerifier()
-
-
Method Details
-
isCheckResources
public boolean isCheckResources() -
isCheckDocsNumber
public boolean isCheckDocsNumber() -
isCheckDocs
public boolean isCheckDocs() -
isCheckHashes
public boolean isCheckHashes() -
getInstance
public static ArchiveVerifier getInstance(File dir) throws ParserConfigurationException, SAXException, IOException Factory method for the verifier. The IndexHandler is used.- Parameters:
dir- The archive directory- Returns:
- The verifier that match with the directory structure
- Throws:
IOException- I/O errorSAXException- XML errorParserConfigurationException- XML error- See Also:
-
getInstance
public static ArchiveVerifier getInstance(File dir, IndexHandler handler) throws ParserConfigurationException, SAXException, IOException 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
- Throws:
IOException- I/O errorSAXException- XML errorParserConfigurationException- XML error
-
verify
public abstract boolean verify()It is the abstract method of the class. It is implemented by the inherit classes DefaultVerifier and StoreVerifier- Returns:
- true if all checks are successfully
-
isValid
public boolean isValid() -
getDocsDir
-
getReport
-
setReport
-
setLogsLocale
-
getArchiveName
-
getIndex
-