Class InclusionsValidator
-
- All Implemented Interfaces:
public final class InclusionsValidatorValidator 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.
-
-
Constructor Summary
Constructors Constructor Description InclusionsValidator()
-
Method Summary
Modifier and Type Method Description final ConfigCheckcheckInclusions(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. -
-
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, orsource/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:
trueif every directory was found in the modpack directory. If any single one was not found, false is returned.
-
-
-
-