Class InclusionsValidator

  • All Implemented Interfaces:

    
    public final class InclusionsValidator
    
                        

    Validator for the inclusions-concern of a server pack configuration: existing sources, valid destinations, valid in-/exclusion-filter regexes and the lazy-mode special-case. Extracted from ConfigurationHandler (refactor Phase 1c); ConfigurationHandler remains the facade through which consumers access these checks.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final ConfigCheck checkInclusions(List<InclusionSpecification> inclusions, String modpackDir, ConfigCheck configCheck, Boolean printLog) Checks whether the passed list of directories which are supposed to be in the modpack directory is empty, or whether all directories in the list exist in the modpack directory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • InclusionsValidator

        InclusionsValidator()
    • Method Detail

      • checkInclusions

         final ConfigCheck checkInclusions(List<InclusionSpecification> inclusions, String modpackDir, ConfigCheck configCheck, Boolean printLog)

        Checks whether the passed list of directories which are supposed to be in the modpack directory is empty, or whether all directories in the list exist in the modpack directory. If the user specified a source/file;destination/file-combination, it is checked whether the specified source-file exists on the host.

        Parameters:
        inclusions - Directories, or source/file;destination/file-combinations, to check for existence.
        modpackDir - Path to the modpack directory in which to check for existence of the passed list of directories.
        Returns:

        true if every directory was found in the modpack directory. If any single one was not found, false is returned.