inFromPriceList = catalog.findCurrentPricelist(plan.getPriceListName()); } else { inFromProduct = catalog.findCurrentProduct(from.getProductName()); inFromBillingPeriod = from.getBillingPeriod(); inFromProductCategory = inFromProduct.getCategory(); inToPriceList = catalog.findCurrentPricelist(plan.getPriceListName()); } else { inToProduct = catalog.findCurrentProduct(to.getProductName()); inToBillingPeriod = to.getBillingPeriod(); inToProductCategory = inToProduct.getCategory();
protected boolean satisfiesCase(final PlanSpecifier planPhase, final StaticCatalog c) throws CatalogApiException { final Product product; final BillingPeriod billingPeriod; final ProductCategory productCategory; final PriceList priceList; if (planPhase.getPlanName() != null) { final Plan plan = c.findCurrentPlan(planPhase.getPlanName()); product = plan.getProduct(); billingPeriod = plan.getRecurringBillingPeriod(); productCategory = plan.getProduct().getCategory(); priceList = c.findCurrentPricelist(plan.getPriceListName()); } else { product = c.findCurrentProduct(planPhase.getProductName()); billingPeriod = planPhase.getBillingPeriod(); productCategory = product.getCategory(); priceList = getPriceList() != null ? c.findCurrentPricelist(planPhase.getPriceListName()) : null; } return (getProduct() == null || getProduct().equals(product)) && (getProductCategory() == null || getProductCategory().equals(productCategory)) && (getBillingPeriod() == null || getBillingPeriod().equals(billingPeriod)) && (getPriceList() == null || getPriceList().equals(priceList)); }
protected boolean satisfiesCase(final PlanSpecifier planPhase, final StaticCatalog c) throws CatalogApiException { final Product product; final BillingPeriod billingPeriod; final ProductCategory productCategory; final PriceList priceList; if (planPhase.getPlanName() != null) { final Plan plan = c.findCurrentPlan(planPhase.getPlanName()); product = plan.getProduct(); billingPeriod = plan.getRecurringBillingPeriod(); productCategory = plan.getProduct().getCategory(); priceList = c.findCurrentPricelist(plan.getPriceListName()); } else { product = c.findCurrentProduct(planPhase.getProductName()); billingPeriod = planPhase.getBillingPeriod(); productCategory = product.getCategory(); priceList = getPriceList() != null ? c.findCurrentPricelist(planPhase.getPriceListName()) : null; } return (getProduct() == null || getProduct().equals(product)) && (getProductCategory() == null || getProductCategory().equals(productCategory)) && (getBillingPeriod() == null || getBillingPeriod().equals(billingPeriod)) && (getPriceList() == null || getPriceList().equals(priceList)); }
inFromPriceList = catalog.findCurrentPricelist(plan.getPriceListName()); } else { inFromProduct = catalog.findCurrentProduct(from.getProductName()); inFromBillingPeriod = from.getBillingPeriod(); inFromProductCategory = inFromProduct.getCategory(); inToPriceList = catalog.findCurrentPricelist(plan.getPriceListName()); } else { inToProduct = catalog.findCurrentProduct(to.getProductName()); inToBillingPeriod = to.getBillingPeriod(); inToProductCategory = inToProduct.getCategory();