use of org.ff4j.services.domain.FlippingStrategyApiBean in project ff4j by ff4j.
the class FeatureServices method initFlippingStrategy.
private void initFlippingStrategy(FeatureApiBean featureApiBean, Feature feature) {
FlippingStrategyApiBean flipApiBean = featureApiBean.getFlippingStrategy();
if (null != flipApiBean) {
try {
Map<String, String> initParams = flipApiBean.getInitParams();
feature.setFlippingStrategy(MappingUtil.instanceFlippingStrategy(featureApiBean.getUid(), flipApiBean.getType(), initParams));
} catch (FeatureAccessException exception) {
throw new FlippingStrategyBadRequestException(exception);
}
}
}
Aggregations