Class TmaSubscriptionPageController

java.lang.Object
de.hybris.platform.addonsupport.controllers.AbstractAddOnController
de.hybris.platform.addonsupport.controllers.page.AbstractAddOnPageController
de.hybris.platform.b2ctelcoaddon.controllers.pages.AbstractSearchPageController
de.hybris.platform.b2ctelcoaddon.controllers.pages.TmaSubscriptionPageController

@Controller @RequestMapping("/my-account/subscription") public class TmaSubscriptionPageController extends AbstractSearchPageController
Controller for home page.
  • Field Details

    • userFacade

      protected de.hybris.platform.commercefacades.user.UserFacade userFacade
  • Constructor Details

    • TmaSubscriptionPageController

      public TmaSubscriptionPageController()
  • Method Details

    • subscriptions

      @RequestMapping(method=GET) public String subscriptions(@Nonnull org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      subscriptions is get method.It finds available subscriptions, paymentInfoMap, Breadcrum for loggedin user.
      Returns:
      Throws:
      de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
    • subscription

      @RequestMapping(value="/{subscriptionId:.*}/{actionVal}", method=GET) public String subscription(@PathVariable("subscriptionId") String subscriptionId, @PathVariable("actionVal") String actionVal, org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      Get method finds available subscription details for loggedin user for manage subscription Page.
      Parameters:
      subscriptionId - Subscription ID
      actionVal - manage or details
      Returns:
      Throws:
      de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
    • subscriptionBaseServices

      @RequestMapping(value="/subscription-base/{billingSystemId}/{subscriberIdentity}", method=GET) public String subscriptionBaseServices(@Nonnull @PathVariable(value="billingSystemId",required=true) String billingSystemId, @Nonnull @PathVariable(value="subscriberIdentity",required=true) String subscriberIdentity, @Nonnull org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      Get method finds available subscription-base details for loggedin user for show related service details.
      Parameters:
      billingSystemId - ID of billing system
      subscriberIdentity - ID of TmaSubscriptionBase
      Returns:
      Throws:
      de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
    • extendSubscriptionTermDuration

      @RequestMapping(value="/extend-term-duration", method=POST) public String extendSubscriptionTermDuration(@RequestParam(value="contractDurationExtension",required=true) Integer contractDurationExtension, @RequestParam(value="subscriptionId",required=true) String subscriptionId, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      This Post method responsible for extending TMAservice's Term for duration.
      Parameters:
      contractDurationExtension - Integer value for which contract need to be extended
      subscriptionId - Id for subscription for with terms need to be extended
      Returns:
    • upgradeSubscriptionComparison

      @RequestMapping(value="/upgrades-comparison", method=GET) public String upgradeSubscriptionComparison(@Nonnull @RequestParam("subscriptionId") String subscriptionId, @Nonnull org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      This Get method responsible for loading upgrading option for subsription.
      Parameters:
      subscriptionId - Id for subscription for with terms need to be extended
      Returns:
      Throws:
      de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
    • upgradesubscription

      @RequestMapping(value="/upgrade", method=POST) public String upgradesubscription(@RequestParam(value="productCode",required=true) String productCode, @RequestParam(value="subscriptionId",required=true) String subscriptionId, org.springframework.ui.Model model, @RequestParam(value="qty",required=false,defaultValue="1") long qty, @RequestParam(value="subscriberId",required=true) String subscriberId, @RequestParam(value="subscriberBillingId",required=true) String subscriberBillingId, @RequestParam(value="rootBpoCode",required=false) String rootBpoCode, @RequestParam(value="cartGroupNo",required=false,defaultValue="-1") int cartGroupNo, @RequestParam(value="subscriptionTermId",required=true) String subscriptionTermId)
      This Post method responsible for upgrading subscription.
      Parameters:
      subscriptionId - Id for subscription for with terms need to be extended
      originalOrderCode -
      originalEntryNumber -
      Returns:
    • changeSubscriptionState

      @RequestMapping(value="/change-state", method=POST) public String changeSubscriptionState(@RequestParam(value="newState",required=true) String newState, @RequestParam(value="subscriptionId",required=true) String subscriptionId, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      This Post method responsible for changing state of subscription.
      Parameters:
      newState -
      subscriptionId - Id for subscription for with terms need to be extended
      Returns:
    • setAutorenewalStatus

      @RequestMapping(value="/set-autorenewal-status", method=POST) public String setAutorenewalStatus(@RequestParam(value="autorenew",required=true) boolean autorenew, @RequestParam(value="subscriptionId",required=true) String subscriptionId, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      This Post method responsible for updating sAutorenewalStatus state of subscription.
      Parameters:
      autorenew -
      subscriptionId - Id for subscription for with terms need to be extended
      Returns:
    • cancelsubscription

      @RequestMapping(value="/cancel/{subscriptionId:.*}", method=GET) public String cancelsubscription(@PathVariable("subscriptionId") String subscriptionId, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      This Post method responsible for Canceling subscription.
      Parameters:
      subscriptionId - Id for subscription for with terms need to be extended
      Returns:
    • viewSubscriptionBillingActivity

      @RequestMapping(value="/billing-activity", method=GET) public String viewSubscriptionBillingActivity(@RequestParam(value="subscriptionId",required=true) String subscriptionId, org.springframework.ui.Model model) throws de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
      This get method show billing acitvity of user.
      Parameters:
      subscriptionId - ID of TmaService
      Throws:
      de.hybris.platform.cms2.exceptions.CMSItemNotFoundException
    • replaceSubscriptionPaymentMethod

      @RequestMapping(value="/billing-activity/payment-method/replace", method=POST) public String replaceSubscriptionPaymentMethod(@RequestParam(value="paymentMethodId",required=true) String paymentMethodId, @RequestParam(value="subscriptionId",required=true) String subscriptionId, @RequestParam(value="effectiveFrom",required=true) String effectiveFrom, org.springframework.web.servlet.mvc.support.RedirectAttributes redirectAttributes)
      This Post method responsible for updating default payment of TMAservice.
      Parameters:
      paymentMethodId - Sting value for service need to be updated
      subscriptionId - Id for subscription for with terms need to be extended
      effectiveFrom - Date from which it will be effective
      Returns:
    • getTmaProductOfferFacade

      protected TmaProductOfferFacade getTmaProductOfferFacade()