/** * Helper method used to extract Property Rebuild Value from the requestData * * @param requestData * @return value of property */ protected double getPropertyRebuildValue(final QuotationRequestData requestData) { if (StringUtils.isNotEmpty( requestData.getProperties().get(FinancialfacadesConstants.PROPERTY_DETAILS_REBUILD_COST))) { return Double.valueOf( requestData .getProperties() .get(FinancialfacadesConstants.PROPERTY_DETAILS_REBUILD_COST)) .doubleValue(); } else { return NumberUtils.DOUBLE_ZERO; } }
/** * Helper method used to extract Property Content Value from the requestData * * @param requestData * @return value of property */ protected double getPropertyContentValue(final QuotationRequestData requestData) { final String coverRequired = requestData.getProperties().get(FinancialfacadesConstants.PROPERTY_DETAILS_COVER_REQUIRED); if (PRO_TYPE_CONTENT_ONLY.equalsIgnoreCase(coverRequired) || PRO_TYPE_BUILDING_AND_CONTENT.equalsIgnoreCase(coverRequired)) { validateParameterNotNullStandardMessage( "Property Is Standard 50000 Content Cover", requestData .getProperties() .get(FinancialfacadesConstants.PROPERTY_DETAILS_IS_STANDARD_50000_CONTENT_COVER)); final String isStandard = requestData .getProperties() .get(FinancialfacadesConstants.PROPERTY_DETAILS_IS_STANDARD_50000_CONTENT_COVER); if (PRO_STANDARD_YES.equalsIgnoreCase(isStandard)) { return 50000; } else { validateParameterNotNullStandardMessage( "Property Defined Content Cover", requestData .getProperties() .get(FinancialfacadesConstants.PROPERTY_DETAILS_CONTENT_COVER_MULTIPLE_OF_10000)); if (StringUtils.isNotEmpty( requestData .getProperties() .get(FinancialfacadesConstants.PROPERTY_DETAILS_CONTENT_COVER_MULTIPLE_OF_10000))) { return Double.valueOf( requestData .getProperties() .get( FinancialfacadesConstants .PROPERTY_DETAILS_CONTENT_COVER_MULTIPLE_OF_10000)) .doubleValue(); } else { return NumberUtils.DOUBLE_ZERO; } } } return NumberUtils.DOUBLE_ZERO; }