final Locale locale = this.fromApiJsonHelper.extractLocaleParameter(elementObject);
final String currencyCode = command.stringValueOfParameterNamed(currencyCodeParamName);
final Long chartId = command.subentityId();// returns chart id
final InterestRateChart chart = this.interestRateChartRepositoryWrapper.findOneWithNotFoundDetection(chartId);
final List<ApiParameterError> dataValidationErrors = new ArrayList<>();
final DataValidatorBuilder baseDataValidator = new DataValidatorBuilder(dataValidationErrors)
.resource(INTERESTRATE_CHART_SLAB_RESOURCE_NAME);
final InterestRateChartSlab newChartSlab = assembleChartSlabs(chart, elementObject, currencyCode, locale);
// validate chart Slabs
newChartSlab.slabFields().validateChartSlabPlatformRules(command, baseDataValidator, locale);
chart.validateChartSlabs(baseDataValidator);
throwExceptionIfValidationWarningsExist(dataValidationErrors);
return newChartSlab;
}