Class PDiscountSharingController

java.lang.Object
com.portal.app.cc.sharing.PSharingController
com.portal.app.cc.sharing.PDiscountSharingController

public class PDiscountSharingController extends PSharingController
This is extends PSharingController class, which carries all the business logic related to data for discount sharing. The opcode calls are done in this class. The controller separation logic is implemented in this controller so that this controller can be customized.
  • Constructor Details

    • PDiscountSharingController

      public PDiscountSharingController()
      Default constructor to initialize mGroupType, mSharingType, sharingArrayField and sharingPoidField.
  • Method Details

    • prepareIndexMapping

      protected void prepareIndexMapping(HashMap indexMapping, SparseArray sharingsArray) throws EBufException
      This method will prepare the indexes hashmap for each and every discount purchased by the account. This will maintain key as discount poid and node location to differentiate when an account purchase same discount more than once.
      Specified by:
      prepareIndexMapping in class PSharingController
      Parameters:
      indexMapping - HashMap
      sharingsArray - SparseArray: The part of group output flist having the discounts as group members.
      Throws:
      EBufException
    • prepareFListforGroupInfoSharings

      protected void prepareFListforGroupInfoSharings(FList sharingFList)
      This will prepare an input flist for discounts while getting the group information.
      Specified by:
      prepareFListforGroupInfoSharings in class PSharingController
      Parameters:
      sharingFList - FList the input flist.
    • extractGroupSharingsFromFList

      protected void extractGroupSharingsFromFList(PGroupData gData, Enumeration sharingValueEnum, HashMap indexMapping, Poid accPoid) throws EBufException
      This method will extract the discounts from the output flist and stored the discounts into PGroupData object.
      Specified by:
      extractGroupSharingsFromFList in class PSharingController
      Parameters:
      gData - PGroupData the group data which contains all the info related to sharing group
      sharingValueEnum - Enumeration the partial output flist
      indexMapping - HashMap the indexed map to get the each and every discounts index in sharing group with respect to the node location
      accPoid - Poid the account poid.
      Throws:
      EBufException
    • prepareFListforAGroupMember

      protected void prepareFListforAGroupMember(FList memFList, PSharingItemData sid)
      This method prepares the input flist for discounts which are becoming members of group.
      Specified by:
      prepareFListforAGroupMember in class PSharingController
      Parameters:
      memFList - FList the input flist.
      sid - PSharingItemData the discount objects information which becomming the member of a group.
    • getAvailableSharingObjects

      public ArrayList getAvailableSharingObjects(Poid servicePoid) throws SharingException
      This method returns available discount(s) of the given service poid.
      Specified by:
      getAvailableSharingObjects in class PSharingController
      Throws:
      SharingException
    • getAllMemberServices

      public ArrayList getAllMemberServices(Poid[] acctPoids, Poid parentServicePoid) throws SharingException
      Throws:
      SharingException