コード例 #1
0
 @Override
 public void retainOrRollOver(
     String subscriberNumber, boolean retainExistingChildCareSubscription) {
   Subscription pregnancyProgramWaitingForRollOver =
       allSubscriptions.findBy(
           subscriberNumber, ProgramType.PREGNANCY, WAITING_FOR_ROLLOVER_RESPONSE);
   Subscription existingChildCare =
       allSubscriptions.findActiveSubscriptionFor(subscriberNumber, ProgramType.CHILDCARE);
   if (retainExistingChildCareSubscription) {
     for (ISubscriptionFlowProcess process : asList(validation, campaign, persistence)) {
       if (!process.retainExistingChildCare(pregnancyProgramWaitingForRollOver, existingChildCare))
         break;
     }
   } else {
     for (ISubscriptionFlowProcess process : asList(validation, campaign, persistence)) {
       if (!process.rollOverToNewChildCareProgram(
           pregnancyProgramWaitingForRollOver,
           rollOverSubscriptionFrom(pregnancyProgramWaitingForRollOver),
           existingChildCare)) break;
     }
   }
 }
コード例 #2
0
 @Override
 public List<Subscription> activeSubscriptions(String subscriberNumber) {
   return allSubscriptions.getAllActiveSubscriptionsForSubscriber(subscriberNumber);
 }
コード例 #3
0
 @Override
 public Subscription findActiveSubscriptionFor(String subscriberNumber, String programName) {
   return allSubscriptions.findActiveSubscriptionFor(subscriberNumber, programName);
 }