return brc.getJavaLocale();
}
@Override
protected Currency getCurrency(ExtractValueRequest extractValueRequest, Property property) {
BroadleafCurrency bc = null;
if (extractValueRequest.getEntity() instanceof Product && isDefaultSkuProperty(extractValueRequest, property)) {
Product p = (Product) extractValueRequest.getEntity();
bc = p.getDefaultSku().getCurrency();
} else if (extractValueRequest.getEntity() instanceof Sku) {
Sku s = (Sku) extractValueRequest.getEntity();
bc = s.getCurrency();
}
if (bc == null) {
BroadleafRequestContext brc = BroadleafRequestContext.getBroadleafRequestContext();
return brc.getJavaCurrency();
} else {
return Currency.getInstance(bc.getCurrencyCode());
}
}