Search in sources :

Example 1 with PageItemCriteria

use of org.broadleafcommerce.cms.page.domain.PageItemCriteria in project BroadleafCommerce by BroadleafCommerce.

the class PageServiceUtility method buildItemCriteriaDTOList.

protected List<ItemCriteriaDTO> buildItemCriteriaDTOList(Page page) {
    List<ItemCriteriaDTO> itemCriteriaDTOList = new ArrayList<ItemCriteriaDTO>();
    for (PageItemCriteria criteria : page.getQualifyingItemCriteria()) {
        ItemCriteriaDTO criteriaDTO = new ItemCriteriaDTO();
        criteriaDTO.setMatchRule(criteria.getMatchRule());
        criteriaDTO.setQty(criteria.getQuantity());
        itemCriteriaDTOList.add(criteriaDTO);
    }
    return itemCriteriaDTOList;
}
Also used : PageItemCriteria(org.broadleafcommerce.cms.page.domain.PageItemCriteria) ArrayList(java.util.ArrayList) ItemCriteriaDTO(org.broadleafcommerce.common.structure.dto.ItemCriteriaDTO)

Aggregations

ArrayList (java.util.ArrayList)1 PageItemCriteria (org.broadleafcommerce.cms.page.domain.PageItemCriteria)1 ItemCriteriaDTO (org.broadleafcommerce.common.structure.dto.ItemCriteriaDTO)1