Examples of addProductAttribute()


Examples of org.candlepin.model.Pool.addProductAttribute()

            sub.getEndDate(), sub.getContractNumber(), sub.getAccountNumber(),
            sub.getOrderNumber());
        p.setSourceSubscription(new SourceSubscription(sub.getId(), "master"));

        for (ProductAttribute attr : sub.getProduct().getAttributes()) {
            p.addProductAttribute(new ProductPoolAttribute(attr.getName(), attr.getValue(),
                sub.getProduct().getId()));
        }

        // Copy sub-product data if there is any:
        if (sub.getDerivedProduct() != null) {
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

        Entitlement e = mockEntitlement(consumer, productId, range, providedProductIds);
        e.setQuantity(quantity);
        Pool p = e.getPool();

        // Setup the attributes for stacking:
        p.addProductAttribute(new ProductPoolAttribute("stacking_id", stackId, productId));
        p.addProductAttribute(new ProductPoolAttribute("sockets", "2", productId));

        return e;
    }
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

        e.setQuantity(quantity);
        Pool p = e.getPool();

        // Setup the attributes for stacking:
        p.addProductAttribute(new ProductPoolAttribute("stacking_id", stackId, productId));
        p.addProductAttribute(new ProductPoolAttribute("sockets", "2", productId));

        return e;
    }

    private DateRange rangeRelativeToDate(Date relativeTo, int startMonths, int endMonths) {
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

        Random gen = new Random();
        int id = gen.nextInt(Integer.MAX_VALUE);
        e.setId(String.valueOf(id));
        Pool p = e.getPool();
        // Setup the attributes for stacking:
        p.addProductAttribute(new ProductPoolAttribute("stacking_id", stackId, productId));
        return e;
    }

    private Entitlement mockEntitlement(Consumer consumer, String productId, String name) {
        Pool p = new Pool(owner, productId, name, null,
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

        Pool p = new Pool();

        ProductPoolAttribute prodAttr = new ProductPoolAttribute("a", "1", "PRODID");
        prodAttr.setCreated(new Date());
        prodAttr.setUpdated(new Date());
        p.addProductAttribute(prodAttr);

        PoolAttribute poolAttr = new PoolAttribute("a", "1");
        poolAttr.setCreated(new Date());
        poolAttr.setUpdated(new Date());
        p.addAttribute(poolAttr);
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

        p.setSourceSubscription(
            new SourceSubscription("testsub" + TestUtil.randomInt(), "master"));
        p.setStartDate(startDate);
        p.setEndDate(endDate);
        for (ProductAttribute pa : product.getAttributes()) {
            p.addProductAttribute(new ProductPoolAttribute(pa.getName(),
                pa.getValue(), product.getId()));
        }
        return p;
    }
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

            new HashSet<Product>(), quantity, startDate, endDate,
            TestUtil.createDate(2010, 2, 12));
        subCurator.create(sub);
        p.setSourceSubscription(new SourceSubscription(sub.getId(), "master"));
        for (ProductAttribute pa : product.getAttributes()) {
            p.addProductAttribute(new ProductPoolAttribute(pa.getName(),
                pa.getValue(), product.getId()));
        }
        return poolCurator.create(p);
    }
View Full Code Here

Examples of org.candlepin.model.Pool.addProductAttribute()

        e.setId(String.valueOf(id));

        Pool p = e.getPool();

        // Setup the attributes for stacking:
        p.addProductAttribute(new ProductPoolAttribute("stacking_id", stackId, productId));

        return e;
    }

    private Entitlement mockStackedEntitlement(Consumer consumer, String stackId,
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.