}
else
{
// path is "/clusters/{clusterName}/configs/cluster|particicpant|resource/
// {clusterName}|{participantName}|{resourceName}"
ConfigScope scope;
if (scopeProperty == ConfigScopeProperty.CLUSTER)
{
scope = new ConfigScopeBuilder().build(scopeProperty, clusterName);
}
else
{
scope = new ConfigScopeBuilder().build(scopeProperty, clusterName, scopeKey1);
}
representation = getConfigs(scope, scopeProperty, scopeKey1);
}
break;
case PARTITION:
scopeKey1 = getValue("scopeKey1");
String scopeKey2 = getValue("scopeKey2");
if (scopeKey1 == null)
{
// path is "/clusters/{clusterName}/configs/partition"
throw new HelixException("Missing resourceName");
}
else if (scopeKey2 == null)
{
// path is "/clusters/{clusterName}/configs/partition/resourceName"
representation = getConfigKeys(scopeProperty, scopeKey1);
}
else
{
// path is
// "/clusters/{clusterName}/configs/partition/resourceName/partitionName"
ConfigScope scope =
new ConfigScopeBuilder().build(scopeProperty,
clusterName,
scopeKey1,
scopeKey2);
representation = getConfigs(scope, scopeProperty, scopeKey1, scopeKey2);