class BusinessObjectDataInitiateDestroyHelperServiceImpl implements BusinessObjectDataInitiateDestroyHelperService {

    int getAndValidateFinalDestroyInDays()
    {
        // Get the configured delay (in days) for business object data finalize destroy.
        int finalDestroyInDays = herdStringHelper.getConfigurationValueAsInteger(ConfigurationValue.BDATA_FINAL_DESTROY_DELAY_IN_DAYS);

        // Validate the finalize delay configuration value.
        if (finalDestroyInDays <= 0)
        {
            throw new IllegalStateException(
                String.format("Configuration \"%s\" must be a positive integer.", ConfigurationValue.BDATA_FINAL_DESTROY_DELAY_IN_DAYS.getKey()));
        }

        return finalDestroyInDays;
    }

}