Class 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 Detail

      • ArchiveVerifier

        public ArchiveVerifier()
    • 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,
                                                  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()
      • setReport

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

        public void setLogsLocale​(Locale logsLocale)
      • getArchiveName

        public String getArchiveName()
      • getIndex

        public Index getIndex()