Package org.apache.sling.caconfig.resource.impl.util

# Class ConfigNameUtil

java.lang.Object
org.apache.sling.caconfig.resource.impl.util.ConfigNameUtil

public final class ConfigNameUtil extends Object
Helper methods for configuration names.

## Method Summary

Modifier and Type
Method
Description
`static void`
`ensureValidConfigName(String configName)`
Ensure that the config name is valid.
`static String[]`
`getAllPartialConfigNameVariations(String configName)`
Returns all partial combinations like: a, a/b, a/b/c from config name a/b/c/d
`static boolean`
`isValid(String configName)`
Check if the config name is valid.
`static boolean`
`isValid(Collection<String> configNames)`
Check if the config name is valid.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Method Details

### isValid

public static boolean isValid(String configName)
Check if the config name is valid.

Parameters:
  `configName` - The name
Returns:
  `true` if it is valid

### isValid

public static boolean isValid(Collection<String> configNames)
Check if the config name is valid.

Parameters:
  `configNames` - The names
Returns:
  `true` if it is valid

### ensureValidConfigName

public static void ensureValidConfigName(String configName)
Ensure that the config name is valid.

Parameters:
  `configName` - The name
Throws:
  `IllegalArgumentException` - if the config name is not valid

### getAllPartialConfigNameVariations

public static String[] getAllPartialConfigNameVariations(String configName)
Returns all partial combinations like: a, a/b, a/b/c from config name a/b/c/d

Parameters:
  `configName` - Config name
Returns:
  All partial combinations