@Override public boolean isFeatureEnabled(String featureId) { Optional<ExperimentalFeature> optional = getFeature(featureId); if (optional.isPresent()) { return optional.get().isEnabled(); } return true; }
@Override public boolean isFeatureEnabled(String featureId) { Optional<ExperimentalFeature> optional = getFeature(featureId); if (optional.isPresent()) { return optional.get().isEnabled(); } return true; }
@Override public void updateExperimentalFeature(String featureId, boolean enabled) { if (isExperimentalEnabled()) { Optional<ExperimentalFeature> optional = session.getFeaturesRegistry().getFeature(featureId); if (optional.isPresent()) { ExperimentalFeatureImpl feature = (ExperimentalFeatureImpl) optional.get(); if (feature.isEnabled() != enabled) { feature.setEnabled(enabled); event.fire(new NonPortableExperimentalFeatureModifiedEvent(feature)); } } } }
@Override public void updateExperimentalFeature(String featureId, boolean enabled) { if (isExperimentalEnabled()) { Optional<ExperimentalFeature> optional = session.getFeaturesRegistry().getFeature(featureId); if (optional.isPresent()) { ExperimentalFeatureImpl feature = (ExperimentalFeatureImpl) optional.get(); if (feature.isEnabled() != enabled) { feature.setEnabled(enabled); event.fire(new NonPortableExperimentalFeatureModifiedEvent(feature)); } } } }
@Override public boolean isFeatureEnabled(String featureId) { ExperimentalFeaturesRegistryImpl registry = getFeaturesRegistry(); if(!registry.getFeature(featureId).isPresent()) { return true; } return isExperimentalEnabled() && getFeaturesRegistry().isFeatureEnabled(featureId); }
@Override public boolean isFeatureEnabled(String featureId) { ExperimentalFeaturesRegistryImpl registry = getFeaturesRegistry(); if(!registry.getFeature(featureId).isPresent()) { return true; } return isExperimentalEnabled() && getFeaturesRegistry().isFeatureEnabled(featureId); }