use of org.broadleafcommerce.profile.core.dto.CustomerRuleHolder in project BroadleafCommerce by BroadleafCommerce.
the class PromotionMessageDTOServiceImpl method convertPromotionMessagesToDTOs.
@Override
public Map<String, List<PromotionMessageDTO>> convertPromotionMessagesToDTOs(Set<PromotionMessage> promotionMessages, Offer offer) {
MultiValueMap promotionMessageDTOs = new MultiValueMap();
for (PromotionMessage message : promotionMessages) {
PromotionMessageDTO dto = new PromotionMessageDTO(message);
CustomerRuleHolder customerRuleHolder = buildCustomerRuleHolder(offer);
dto.setCustomerRuleHolder(customerRuleHolder);
promotionMessageDTOs.put(dto.getMessagePlacement(), dto);
}
return promotionMessageDTOs;
}
Aggregations