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 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)
      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

      public static ArchiveVerifier getInstance(File dir, IndexHandler handler)
      Factory method for the verifier
      Parameters:
      dir - The archive directory
      handler - 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()
    • getReport

      public List<String> getReport()
    • setReport

      public void setReport(List<String> report)
    • setLogsLocale

      public void setLogsLocale(Locale logsLocale)
    • getArchiveName

      public String getArchiveName()
    • getIndex

      public Index getIndex()