Class PPurchasePanelBeanImpl

All Implemented Interfaces:
PPurchasePanelBean, PIACollectionBean, PControllerBean, Serializable, Remote, Unreferenced

public class PPurchasePanelBeanImpl extends PIAComponentCollectionBean implements PPurchasePanelBean
Controller class for purchase offering of a service or a deal.
Version:
%version: 22 % %date_modified: Wed Dec 05 15:53:21 2001 %
Author:
kowang
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • initForExistingServices

      public void initForExistingServices(PModelHandle acctMH) throws RemoteException
      Initialize class member for storing Existing Services related info during purchase offering.
      Specified by:
      initForExistingServices in interface PPurchasePanelBean
      Parameters:
      accountMH - model handle for the account object.
      Throws:
      RemoteException
    • initForExistingServices

      public int initForExistingServices(PModelHandle acctMH, int threshold) throws RemoteException
      Initialize class member for storing Existing Services related info during purchase offering.
      Specified by:
      initForExistingServices in interface PPurchasePanelBean
      Parameters:
      threshold -
      accountMH - model handle for the account object.
      Throws:
      RemoteException
    • setService

      public void setService(PModelHandle serviceMH)
      Sets the service cache
      Specified by:
      setService in interface PPurchasePanelBean
      Parameters:
      serviceMH -
    • getDealModelHandle

      public PModelHandle getDealModelHandle(int serviceIndex, String dealName) throws RemoteException
      Retrieves a deal model handle for a specific deal when Existing Services is selected during purchase offering.
      Specified by:
      getDealModelHandle in interface PPurchasePanelBean
      Parameters:
      serviceIndex - index to the flist array where the service flists are stored in corresponds to the order in the Existing Services combobox.
      dealName - deal name of the selected deal for the selected service/(Account).
      Returns:
      PModelHandle that contains model handle for the selected deal and service.
      Throws:
      RemoteException
    • getPlanModelHandle

      public PModelHandle getPlanModelHandle(String planName) throws RemoteException
      Retrieves plan model for a specific plan during purchase offering or account creation.
      Specified by:
      getPlanModelHandle in interface PPurchasePanelBean
      Parameters:
      planName - plan name of the specific plan.
      Returns:
      PModelHandle that contains model handle for the selected plan.
      Throws:
      RemoteException
    • getExistingServicesModel

      public PModelHandle getExistingServicesModel() throws RemoteException
      Retrieves model handle for the specific account.
      Specified by:
      getExistingServicesModel in interface PPurchasePanelBean
      Returns:
      model handle of the services.
      Throws:
      RemoteException
    • getServiceFlist

      public FList getServiceFlist(int index)
      Retrieves Service FLists from an array .
      Specified by:
      getServiceFlist in interface PPurchasePanelBean
      Parameters:
      index - index to the array where Service FLists are stored.
      Returns:
      FList which is a service FList
    • getDealsNamesStrings

      public String[] getDealsNamesStrings(int dealIndex) throws RemoteException
      Retrieves sorted names of deals from an array of Vector during purchase offering.
      Specified by:
      getDealsNamesStrings in interface PPurchasePanelBean
      Parameters:
      dealIndex - index to the array where deal names are stored for a specific service/(Account).
      Returns:
      String array that contains all deal names belongs to a service/(Account).
      Throws:
      RemoteException
    • hasSponsoredProduct

      public boolean hasSponsoredProduct(PModelHandle planModelHandle, ArrayList sponsoredProducts) throws RemoteException
      Description copied from interface: PPurchasePanelBean
      This will return true if the selected plan has a product which is present in the list of the sponsored products
      Specified by:
      hasSponsoredProduct in interface PPurchasePanelBean
      Parameters:
      planModelHandle - modelHandle containing the products of the selected plan
      sponsoredProducts - the list of the sponsored products
      Returns:
      Throws:
      RemoteException
    • getPlans

      protected FList getPlans(FList in) throws RemoteException
      This method returns all the plans for the given account poid. Override this method with custom input flist for CUST_POL_GET_PLANS.
      Parameters:
      in -
      Returns:
      Throws:
      RemoteException
    • getDeals

      protected FList getDeals(FList in) throws RemoteException
      This method returns all the deals for the given service poid. Override this method with custom input flist for CUST_POL_GET_DEALS.
      Parameters:
      in -
      Returns:
      Throws:
      RemoteException
    • collectDealData

      public void collectDealData(PModelHandle inMH, int serviceIndex, String dealName) throws RemoteException
      Builds PModdelHandle by appending the deal model handle to the input model handle during purchase offering.
      Specified by:
      collectDealData in interface PPurchasePanelBean
      Parameters:
      serviceIndex - index to the flist array where the service flists are stored.
      dealName - string of the deal name..
      Throws:
      RemoteException
    • collectBackDateData

      public void collectBackDateData(PModelHandle inMH, Date backDate) throws RemoteException
      Builds PModelHandle by appending the deal/plan model handle to the input model handle during purchase offering.
      Specified by:
      collectBackDateData in interface PPurchasePanelBean
      Parameters:
      inMH - PModelHandle
      backDate -
      Throws:
      RemoteException
    • collectPlanData

      public void collectPlanData(PModelHandle inMH, String planName) throws RemoteException
      Builds PModdelHandle by appending the plan model handle to the input model handle during purchase offering and account creation.
      Specified by:
      collectPlanData in interface PPurchasePanelBean
      Parameters:
      planName - string of the plan name..
      Throws:
      RemoteException
    • getPlanNamesStrings

      public String[] getPlanNamesStrings() throws RemoteException
      Retrieves sorted plan names when New Services is getting selected on Purchase Panel during purchase offering or account creation.
      Specified by:
      getPlanNamesStrings in interface PPurchasePanelBean
      Returns:
      String array that contains strings of plan names.
      Throws:
      RemoteException
    • setAacAccess

      public void setAacAccess(String strAccess) throws RemoteException
      Sets the auto-account-creation access string which is used to determine the list of plans that will be made available to choose during account creation and purchase offering for additional services. "admintool" is the string that will be used by default when fetching the plan list.
      Specified by:
      setAacAccess in interface PPurchasePanelBean
      Parameters:
      strAccess - auto-account-creation access string.
      Throws:
      RemoteException
    • resetAcctCreationData

      public void resetAcctCreationData() throws RemoteException
      Clears cached data used during New Account Creation Wizard. An example of when the cache would want to be refreshed is when a brand change occurs.
      Specified by:
      resetAcctCreationData in interface PPurchasePanelBean
      Throws:
      RemoteException
    • resetPurchaseOfferingData

      public void resetPurchaseOfferingData() throws RemoteException
      Clears cached data used during Purchase Offering Wizard. An example of when the cache would want to be refreshed is when an account change occurs.
      Specified by:
      resetPurchaseOfferingData in interface PPurchasePanelBean
      Throws:
      RemoteException
    • getCurrentPlanName

      public String getCurrentPlanName(PModelHandle accModel)
      Retrives the plan name of the current account
      Specified by:
      getCurrentPlanName in interface PPurchasePanelBean
      Throws:
      RemoteException
    • isAcctHasPlan

      public boolean isAcctHasPlan(PModelHandle accModel) throws RemoteException
      Checks if the current account has products associated with it.
      Specified by:
      isAcctHasPlan in interface PPurchasePanelBean
      Returns:
      true if account has products else returns false. Default value is true.
      Throws:
      RemoteException
    • isBestDeal

      public boolean isBestDeal(String dealName) throws RemoteException
      Checks if the current deal is best configured deal.
      Specified by:
      isBestDeal in interface PPurchasePanelBean
      Returns:
      true if deal is best configured else returns false
      Throws:
      RemoteException
    • getInactiveReqProdNamesForCurAccount

      public Object[] getInactiveReqProdNamesForCurAccount(PModelHandle accModel) throws RemoteException
      Returns an array products which are inactive in the current account.
      Specified by:
      getInactiveReqProdNamesForCurAccount in interface PPurchasePanelBean
      Returns:
      an array products which are inactive in the current account.
      Throws:
      RemoteException
    • getSubscribedPlansForCurrentAccount

      public PModelHandle[] getSubscribedPlansForCurrentAccount(PModelHandle accModel) throws RemoteException
      Retrives the list of subscribed plans of the current account
      Specified by:
      getSubscribedPlansForCurrentAccount in interface PPurchasePanelBean
      Returns:
      PModelHandle array of subscribed plans
      Throws:
      RemoteException
    • getCurrentPlanPoid

      public Poid getCurrentPlanPoid() throws RemoteException
      Gets current plan poid
      Specified by:
      getCurrentPlanPoid in interface PPurchasePanelBean
      Returns:
      current plan poid
      Throws:
      RemoteException
    • getTransitionablePlanStrings

      public Object[] getTransitionablePlanStrings(PModelHandle planHandle, int iTransitionType) throws RemoteException
      Returns an array of plan names which are available for transition from the current plan.
      Specified by:
      getTransitionablePlanStrings in interface PPurchasePanelBean
      Parameters:
      planHandle - plan model handle
      iTransitionType - Transition type such as upgrade, downgrade, red, etc.,
      Returns:
      an array of plan names which are available for transition from the current plan.
      Throws:
      RemoteException
    • getDealsForTransition

      public Vector getDealsForTransition(PModelHandle currAccModel, int iTransitionType) throws RemoteException
      Returns the vector of deal objects which can be transitioned to other deals.
      Specified by:
      getDealsForTransition in interface PPurchasePanelBean
      Parameters:
      currAccModel - current account model
      iTransitionType - - denotes current transition type(upgrade or downgrade or etc.,)
      curAccModel - current account model
      Returns:
      the vector of subscribed deal objects from the plan/plans of the given account which has transitionable deals.
      Throws:
      RemoteException
    • getTransitionableDealStrings

      public Object[] getTransitionableDealStrings(PModelHandle dealHandle, PModelHandle currActHandle, int iTransitionType) throws RemoteException
      Returns the array of transitionable deal names of the given deal.
      Specified by:
      getTransitionableDealStrings in interface PPurchasePanelBean
      Parameters:
      dealHandle -
      currActHandle -
      iTransitionType - Transition type such as upgrade, downgrade, red, etc.,
      currAcctHandle -
      Returns:
      the array of transitionable deal names of the given deal.
      Throws:
      RemoteException
    • getTransitionableDealModelHandle

      public PModelHandle getTransitionableDealModelHandle(String name) throws RemoteException
      Returns the deal handle given the deal name.
      Specified by:
      getTransitionableDealModelHandle in interface PPurchasePanelBean
      Parameters:
      name -
      Returns:
      the deal handle given the deal name.
      Throws:
      RemoteException
    • getTransitionablePlanModelHandle

      public PModelHandle getTransitionablePlanModelHandle(String planName) throws RemoteException
      Returns plan model handle associated with given plan string.
      Specified by:
      getTransitionablePlanModelHandle in interface PPurchasePanelBean
      Parameters:
      planName - name of the plan
      Returns:
      plan model handle associated with given plan string.
      Throws:
      RemoteException
    • collectDataForPlanTransition

      public void collectDataForPlanTransition(PModelHandle inMH, PModelHandle fromPlan, String planToUpgrade, PModelHandle accModel, int iTransitionType) throws RemoteException
      The flist being formed is of the form 0 PIN_FLD_POID POID [0] 0.0.0.1 /account 41349 0 0 PIN_FLD_FROM_PLAN POID [0] 0.0.0.1 /plan 40980 0 0 PIN_FLD_TO_PLAN POID [0] 0.0.0.1 /plan 44436 0 0 PIN_FLD_PROGRAM_NAME STR [0] "testnap" 0 PIN_FLD_TRANSITION_TYPE ENUM [0] 0 0 PIN_FLD_SERVICES ARRAY [0] allocated 20, used 2 1 PIN_FLD_FROM_SERVICE SUBSTRUCT [0] allocated 20, used 1 2 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/ip 41029 0 1 PIN_FLD_TO_SERVICE SUBSTRUCT [0] allocated 20, used 3 2 PIN_FLD_SERVICE_ID STR [0] "Test1" 2 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/ip -1 2 2 PIN_FLD_DEALS ARRAY [0] allocated 20, used 1 3 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 42388 0 0 PIN_FLD_SERVICES ARRAY [1] allocated 20, used 1 1 PIN_FLD_FROM_SERVICE SUBSTRUCT [0] allocated 20, used 1 2 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/email 43333 0 0 PIN_FLD_SERVICES ARRAY [2] allocated 20, used 1 1 PIN_FLD_TO_SERVICE SUBSTRUCT [0] allocated 20, used 5 2 PIN_FLD_SERVICE_ID STR [0] "Test2" 2 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/ip -1 2 2 PIN_FLD_DEALS ARRAY [0] allocated 20, used 1 3 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 11822 0
      Specified by:
      collectDataForPlanTransition in interface PPurchasePanelBean
      Parameters:
      inMH - input modelhandle to which collected data need to be updated
      fromPlan - from plan model handle
      planToUpgrade - name of the plan to which the account is getting upgraded to.
      accModel - account model handle
      iTransitionType - Transition type such as upgrade, downgrade, red, etc.,
      Throws:
      RemoteException
    • collectPlanDataForRequiredDeals

      public void collectPlanDataForRequiredDeals(PModelHandle inMH, String planName) throws RemoteException
      Collects plan data for the required deals to be used by COMMIT_CUSTOMER.
      Specified by:
      collectPlanDataForRequiredDeals in interface PPurchasePanelBean
      Throws:
      RemoteException
    • collectDataForDealTransition

      public void collectDataForDealTransition(PModelHandle origModel, PModelHandle acctModel, PModelHandle fromDeal, PModelHandle serviceModel, String toPlanName, int iTransitionType) throws RemoteException
      The Input flist being formed is of the form 0 PIN_FLD_POID POID [0] 0.0.0.1 /account 41349 0 0 PIN_FLD_PROGRAM_NAME STR [0] "Customer Center" 0 PIN_FLD_TRANSITION_TYPE ENUM [0] 1 0 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/ip 43813 0 0 PIN_FLD_FROM_DEAL_INFO SUBSTRUCT [0] allocated 20, used 1 1 PIN_FLD_PACKAGE_ID INT [0] 2 0 PIN_FLD_TO_DEAL_INFO SUBSTRUCT [0] allocated 20, used 1 1 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 42980 0
      Specified by:
      collectDataForDealTransition in interface PPurchasePanelBean
      Parameters:
      origModel - model associated with Collect data event.
      acctModel - current account model.
      fromDeal - from deal handle.
      serviceModel - service model of the from deal.
      toPlanName - to deal handle
      iTransitionType - Transition type such as upgrade, downgrade, red, etc.,
      Throws:
      RemoteException
    • collectDataForChangeOption

      public void collectDataForChangeOption(PModelHandle origMH, PModelHandle curAccModel, PModelHandle curPlanHandle, SparseArray dealsToBePurchased) throws RemoteException
      Description copied from interface: PPurchasePanelBean
      Collects data for change options
      Specified by:
      collectDataForChangeOption in interface PPurchasePanelBean
      Parameters:
      origMH - input modelhandle to which collected data need to be updated
      curAccModel - current account model
      curPlanHandle - current plan model
      dealsToBePurchased - list of deals which are selected in planoptions page to purchase.
      Throws:
      RemoteException
    • getPlans

      public Vector getPlans(PModelHandle curAccModel)
      Gets the plans for the current account model. Wraps each plan object in Subscribedplan object and returns these objects in a vector.
      Specified by:
      getPlans in interface PPurchasePanelBean
      Parameters:
      curAccModel -
      Returns:
      subscribed plan objects
    • hasRequiredServices

      public boolean hasRequiredServices(PModelHandle planHandle, boolean planOptionsFlag) throws RemoteException
      Returns true if plan has required deals/services.
      Specified by:
      hasRequiredServices in interface PPurchasePanelBean
      Parameters:
      planHandle -
      planOptionsFlag - is a customized flag which conveys if plan options page should be enabled if plan being used contains only optional deals. If it is true, then we will see if PIN_FLD_TYPE is present in any deal in the plan and return true. If planOptionsFlag is false, then we will see if a required deal (PIN_FLD_TYPE is 1) is there are not, if present, we will return true.
      Returns:
      Throws:
      RemoteException
    • getTransitionTypes

      public Vector getTransitionTypes() throws RemoteException
      Reads the transition types from /config/transition_type object
      Specified by:
      getTransitionTypes in interface PPurchasePanelBean
      Returns:
      the PModelHandle containing the content transition_type object.
      Throws:
      RemoteException
    • hasPlanSubcriptionGroup

      public boolean hasPlanSubcriptionGroup(String planName) throws RemoteException
      Finds out if the given plan contains subscription group
      Specified by:
      hasPlanSubcriptionGroup in interface PPurchasePanelBean
      Parameters:
      planName - name of the selected plan
      Returns:
      true if plan has subscription group, false otherwise
      Throws:
      RemoteException
    • formBalanceGrpCurrencyMap

      public HashMap formBalanceGrpCurrencyMap(PModelHandle hOrig) throws RemoteException
      This method forms an hashmap with balance group index as keys and the corresonding credit limits as values
      Specified by:
      formBalanceGrpCurrencyMap in interface PPurchasePanelBean
      Parameters:
      hOrig - PModelHandle, is the orginal model handle for the selected plan
      Returns:
      HashMap balancegroup index and credit limits map
      Throws:
      Exception
      RemoteException
    • updatePlanModelHandle

      public void updatePlanModelHandle(PModelHandle pmh) throws RemoteException
      This is a method used to update Plan model handle for account creation input Flist 0 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account 1 0 0 PIN_FLD_POID POID [0] 0.0.0.1 /plan 9582 0 0 PIN_FLD_SERVICES ARRAY [0] allocated 6, used 6 1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/email -1 0 1 PIN_FLD_LOGIN STR [0] "fhgf" 1 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 11886 0 1 PIN_FLD_BAL_INFO_INDEX INT [0] 0 1 PIN_FLD_DEALS ARRAY [0] allocated 13, used 13 0 PIN_FLD_SERVICES ARRAY [1] allocated 6, used 6 1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/ip -1 0 1 PIN_FLD_LOGIN STR [0] "gfhgfh" 1 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 9838 0 1 PIN_FLD_BAL_INFO_INDEX INT [0] 1 1 PIN_FLD_DEALS ARRAY [0] allocated 13, used 13 . . . 0 PIN_FLD_DESCR STR [0] "" 0 PIN_FLD_BAL_INFO ARRAY [1] allocated 1, used 1 1 PIN_FLD_LIMIT ARRAY [840] allocated 3, used 3 2 PIN_FLD_CREDIT_LIMIT DECIMAL [0] 100 2 PIN_FLD_CREDIT_FLOOR DECIMAL [0] 0 2 PIN_FLD_CREDIT_THRESHOLDS INT [0] 0 1 PIN_FLD_LIMIT ARRAY [1000001] allocated 3, used 3 2 PIN_FLD_CREDIT_LIMIT DECIMAL [0] 100 2 PIN_FLD_CREDIT_FLOOR DECIMAL [0] 0 2 PIN_FLD_CREDIT_THRESHOLDS INT [0] 0 Output Flist is 0 PIN_FLD_ACCOUNT_OBJ POID [0] 0.0.0.1 /account 1 0 0 PIN_FLD_POID POID [0] 0.0.0.1 /plan 9582 0 0 PIN_FLD_SERVICES ARRAY [0] allocated 6, used 6 1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/email -1 0 1 PIN_FLD_LOGIN STR [0] "fhgf" 1 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 11886 0 1 PIN_FLD_BAL_INFO ARRAY [0] NULL 1 PIN_FLD_DEALS ARRAY [0] allocated 13, used 13 0 PIN_FLD_SERVICES ARRAY [1] allocated 6, used 6 1 PIN_FLD_SERVICE_OBJ POID [0] 0.0.0.1 /service/ip -1 0 1 PIN_FLD_LOGIN STR [0] "gfhgfh" 1 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.1 /deal 9838 0 1 PIN_FLD_BAL_INFO ARRAY [1] NULL 1 PIN_FLD_DEALS ARRAY [0] allocated 13, used 13 0 PIN_FLD_DEAL_OBJ POID [0] 0.0.0.0 / 0 0 . . . 0 PIN_FLD_BAL_INFO ARRAY [0] allocated 1, used 1 1 PIN_FLD_POID POID [0] 0.0.0.1 /balance_group -1 0 0 PIN_FLD_BAL_INFO ARRAY [1] allocated 2, used 2 1 PIN_FLD_POID POID [0] 0.0.0.1 /balance_group -1 0 1 PIN_FLD_LIMIT ARRAY [840] allocated 3, used 3 2 PIN_FLD_CREDIT_LIMIT DECIMAL [0] 100 2 PIN_FLD_CREDIT_FLOOR DECIMAL [0] 0 2 PIN_FLD_CREDIT_THRESHOLDS INT [0] 0 1 PIN_FLD_LIMIT ARRAY [1000001] allocated 3, used 3 2 PIN_FLD_CREDIT_LIMIT DECIMAL [0] 100 2 PIN_FLD_CREDIT_FLOOR DECIMAL [0] 0 2 PIN_FLD_CREDIT_THRESHOLDS INT [0] 0 0 PIN_FLD_BAL_INFO ARRAY [1] allocated 2, used 2 1 PIN_FLD_POID POID [0] 0.0.0.1 /balance_group -1 0 1 PIN_FLD_LIMIT ARRAY [840] allocated 3, used 3 2 PIN_FLD_CREDIT_LIMIT DECIMAL [0] 100 2 PIN_FLD_CREDIT_FLOOR DECIMAL [0] 0 2 PIN_FLD_CREDIT_THRESHOLDS INT [0] 0
      Specified by:
      updatePlanModelHandle in interface PPurchasePanelBean
      Parameters:
      pmh -
      Throws:
      RemoteException
    • getLoginIDs

      public Object[] getLoginIDs(PModelHandle serviceModelHandle) throws RemoteException
      Returns the Object[] contains the following. Object[0] contains the login id to be displayed. Object[1] contains the service type of the service.
      Specified by:
      getLoginIDs in interface PPurchasePanelBean
      Parameters:
      serviceModelHandle -
      Returns:
      Object[]
      Throws:
      RemoteException