}
@Override
public FeatureState getFeatureState(final String name)
{
FeatureState result;
try
{
final FeatureDescriptor featureDescriptor = propertyManager.getFeatureDescriptor(name);
result = featureDescriptor.process(contextManager);
}
catch (final FlipException ex)
{
logger.log(
Level.WARNING,
String.format(
"An exception has occured during Feature State extraction for feature named [%s]. Using [%s] value.",
name, FeatureState.DISABLED.toString()), ex);
result = FeatureState.DISABLED;
}
if (isFeatureHasParent(name))
{
final FeatureState parentResult = getFeatureState(getParentFeatureName(name));
result = FeatureState.getByState(parentResult.state() && result.state());
}
return result;
}