public static <K> K getResult(final DefaultCase<K>[] cases, final PlanSpecifier planSpec, final StaticCatalog catalog) throws CatalogApiException { if (cases != null) { for (final DefaultCase<K> c : cases) { final K result = c.getResult(planSpec, catalog); if (result != null) { return result; } } } return null; }
public PlanAlignmentCreate getPlanCreateAlignment(final PlanSpecifier specifier, final StaticCatalog catalog) throws CatalogApiException { final PlanAlignmentCreate result = DefaultCase.getResult(createAlignmentCase, specifier, catalog); return (result != null) ? result : PlanAlignmentCreate.START_OF_BUNDLE; }
public T getResult(final PlanSpecifier planPhase, final StaticCatalog c) throws CatalogApiException { if (satisfiesCase(planPhase, c)) { return getResult(); } return null; }
Result.LALA); final Result r1 = DefaultCase.getResult(new DefaultCaseResult[]{cr0, cr1, cr2, cr3}, new PlanSpecifier(product.getName(), BillingPeriod.MONTHLY, priceList.getName()), cat); Assert.assertEquals(r1, Result.FOO); final Result r2 = DefaultCase.getResult(new DefaultCaseResult[]{cr0, cr1, cr2}, new PlanSpecifier(product.getName(), BillingPeriod.ANNUAL, priceList.getName()), cat); Assert.assertEquals(r2, Result.DIPSY);
public static <K> K getResult(final DefaultCase<K>[] cases, final PlanSpecifier planSpec, final StaticCatalog catalog) throws CatalogApiException { if (cases != null) { for (final DefaultCase<K> c : cases) { final K result = c.getResult(planSpec, catalog); if (result != null) { return result; } } } return null; }
public PlanAlignmentCreate getPlanCreateAlignment(final PlanSpecifier specifier, final StaticCatalog catalog) throws CatalogApiException { final PlanAlignmentCreate result = DefaultCase.getResult(createAlignmentCase, specifier, catalog); return (result != null) ? result : PlanAlignmentCreate.START_OF_BUNDLE; }
public T getResult(final PlanSpecifier planPhase, final StaticCatalog c) throws CatalogApiException { if (satisfiesCase(planPhase, c)) { return getResult(); } return null; }
Result.LALA); final Result r1 = DefaultCase.getResult(new DefaultCaseResult[]{cr0, cr1, cr2, cr3}, new PlanSpecifier(product.getName(), BillingPeriod.MONTHLY, priceList.getName()), cat); Assert.assertEquals(r1, Result.FOO); final Result r2 = DefaultCase.getResult(new DefaultCaseResult[]{cr0, cr1, cr2}, new PlanSpecifier(product.getName(), BillingPeriod.ANNUAL, priceList.getName()), cat); Assert.assertEquals(r2, Result.DIPSY);