Package org.candlepin.model

Examples of org.candlepin.model.PoolFilterBuilder


        req.setPage(3);
        req.setPerPage(2);

        Date activeOn = TestUtil.createDate(2011, 2, 2);
        Page<List<Pool>> page = poolCurator.listAvailableEntitlementPools(
            null, owner, product.getId(), activeOn, false, new PoolFilterBuilder(),
            req, false);
        assertEquals(Integer.valueOf(5), page.getMaxRecords());
        assertEquals(1, page.getPageData().size());
    }
View Full Code Here


        req.setPage(1);
        req.setPerPage(10);

        Date activeOn = TestUtil.createDate(2011, 2, 2);
        Page<List<Pool>> page = poolCurator.listAvailableEntitlementPools(
            null, owner, product.getId(), activeOn, false, new PoolFilterBuilder(),
            req, false);
        assertEquals(Integer.valueOf(0), page.getMaxRecords());
        assertEquals(0, page.getPageData().size());
    }
View Full Code Here

                        activationKeyName));
            }
        }

        // Process the filters passed for the attributes
        PoolFilterBuilder poolFilters = new PoolFilterBuilder();
        for (KeyValueParameter filterParam : attrFilters) {
            poolFilters.addAttributeFilter(filterParam.key(), filterParam.value());
        }
        if (!StringUtils.isEmpty(matches)) {
            poolFilters.addMatchesFilter(matches);
        }

        Page<List<Pool>> page = poolManager.listAvailableEntitlementPools(c, key, owner,
            productId, activeOnDate, true, listAll, poolFilters, pageRequest);
        List<Pool> poolList = page.getPageData();
View Full Code Here

            throw new ForbiddenException(i18n.tr("User {0} cannot access all pools.",
                    principal.getPrincipalName()));
        }

        Page<List<Pool>> page = poolManager.listAvailableEntitlementPools(c, null, o,
            productId, activeOnDate, true, listAll, new PoolFilterBuilder(), pageRequest);
        List<Pool> poolList = page.getPageData();

        if (c != null) {
            for (Pool p : poolList) {
                p.setCalculatedAttributes(
View Full Code Here

TOP

Related Classes of org.candlepin.model.PoolFilterBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.