Class ConfigurationModulePath

java.lang.Object
sk.iway.iwcm.system.ConfigurationModulePath

public final class ConfigurationModulePath extends Object
Parses hierarchical configuration module paths.
  • Method Details

    • parse

      public static List<String> parse(String modules)
      Splits semicolon-separated module memberships, removes invalid entries and preserves the declaration order while removing duplicates.
      Parameters:
      modules - semicolon-separated module paths
      Returns:
      normalized module paths
    • normalize

      public static String normalize(String modules)
      Returns the canonical semicolon-separated representation of module paths.
      Parameters:
      modules - semicolon-separated module paths
      Returns:
      normalized module memberships
    • isInBranch

      public static boolean isInBranch(String modules, String branch)
      Tests whether any declared path is the selected branch or its descendant.
      Parameters:
      modules - semicolon-separated module paths
      branch - selected hierarchy branch
      Returns:
      true when a membership belongs to the branch
    • matchesLegacyModule

      public static boolean matchesLegacyModule(String modules, String module)
      Matches the historical flat module identifier against a complete segment of a hierarchical path. A hierarchical module identifier must match the full path.
      Parameters:
      modules - semicolon-separated module paths
      module - historical module identifier or a full module path
      Returns:
      true when the module matches exactly
    • isValidPath

      public static boolean isValidPath(String path)
      Tests whether a value consists only of valid dot-separated path segments.
      Parameters:
      path - module path
      Returns:
      true for a valid module path