public class PlanAligner extends BaseAligner
TimedPhase when creating, changing Plan or to compute
next Phase on current Plan.| Constructor and Description |
|---|
PlanAligner(CatalogService catalogService) |
| Modifier and Type | Method and Description |
|---|---|
TimedPhase[] |
getCurrentAndNextTimedPhaseOnCreate(DefaultSubscriptionBase subscription,
Plan plan,
PhaseType initialPhase,
String priceList,
org.joda.time.DateTime requestedDate,
org.joda.time.DateTime effectiveDate)
Returns the current and next phase for the subscription in creation
|
TimedPhase |
getCurrentTimedPhaseOnChange(DefaultSubscriptionBase subscription,
Plan plan,
String priceList,
org.joda.time.DateTime requestedDate,
org.joda.time.DateTime effectiveDate)
Returns current Phase for that Plan change
|
TimedPhase |
getNextTimedPhase(DefaultSubscriptionBase subscription,
org.joda.time.DateTime requestedDate,
org.joda.time.DateTime effectiveDate)
Returns next Phase for that SubscriptionBase at a point in time
|
TimedPhase |
getNextTimedPhaseOnChange(DefaultSubscriptionBase subscription,
Plan plan,
String priceList,
org.joda.time.DateTime requestedDate,
org.joda.time.DateTime effectiveDate)
Returns next Phase for that Plan change
|
addDuration, removeDuration@Inject public PlanAligner(CatalogService catalogService)
public TimedPhase[] getCurrentAndNextTimedPhaseOnCreate(DefaultSubscriptionBase subscription, Plan plan, PhaseType initialPhase, String priceList, org.joda.time.DateTime requestedDate, org.joda.time.DateTime effectiveDate) throws CatalogApiException, SubscriptionBaseApiException
subscription - the subscription in creation (only the start date and the bundle start date are looked at)plan - the current PlaninitialPhase - the initialPhase on which we should create that subscription. can be nullpriceList - the priceListrequestedDate - the requested date (only used to load the catalog)effectiveDate - the effective creation date (driven by the catalog policy, i.e. when the creation occurs)CatalogApiException - for catalog errorsSubscriptionBaseApiException - for subscription errorspublic TimedPhase getCurrentTimedPhaseOnChange(DefaultSubscriptionBase subscription, Plan plan, String priceList, org.joda.time.DateTime requestedDate, org.joda.time.DateTime effectiveDate) throws CatalogApiException, SubscriptionBaseApiException
subscription - the subscription in change (only start date, bundle start date, current phase, plan and pricelist
are looked at)plan - the current PlanpriceList - the priceList on which we should change that subscription.requestedDate - the requested dateeffectiveDate - the effective change date (driven by the catalog policy, i.e. when the change occurs)CatalogApiException - for catalog errorsSubscriptionBaseApiException - for subscription errorspublic TimedPhase getNextTimedPhaseOnChange(DefaultSubscriptionBase subscription, Plan plan, String priceList, org.joda.time.DateTime requestedDate, org.joda.time.DateTime effectiveDate) throws CatalogApiException, SubscriptionBaseApiException
subscription - the subscription in change (only start date, bundle start date, current phase, plan and pricelist
are looked at)plan - the current PlanpriceList - the priceList on which we should change that subscription.requestedDate - the requested dateeffectiveDate - the effective change date (driven by the catalog policy, i.e. when the change occurs)CatalogApiException - for catalog errorsSubscriptionBaseApiException - for subscription errorspublic TimedPhase getNextTimedPhase(DefaultSubscriptionBase subscription, org.joda.time.DateTime requestedDate, org.joda.time.DateTime effectiveDate)
subscription - the subscription for which we need to compute the next Phase eventrequestedDate - the requested dateeffectiveDate - the date at which we look to compute that event. effective needs to be after last Plan change or initial PlanCopyright © 2010-2013. All Rights Reserved.