Class PPaymentPageBeanImpl

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

public class PPaymentPageBeanImpl extends PIAComponentCollectionBean implements PPaymentPageBean
Controller class for obtaining payment related information Opcodes used PortalOp.AR_GET_ACCT_ACTION_ITEMS PortalOp.CUST_SET_TAXINFO
Author:
subhendhu, savitha, ramaprasad, manjunatha l
See Also:
  • Constructor Details

  • Method Details

    • createSubordPayhandle

      public PModelHandle createSubordPayhandle()
      put your documentation comment here
      Returns:
    • update

      public void update(int reason, Object incoming) throws RemoteException
      put your documentation comment here
      Overrides:
      update in class PIAComponentCollectionBean
      Parameters:
      reason -
      incoming -
      Throws:
      RemoteException
    • getModelForSettingNextBillingStartAndEnd

      public PModelHandle getModelForSettingNextBillingStartAndEnd(Date start, Date end) throws RemoteException
      Returns the model containing the fields for next billing start and end dates
      Specified by:
      getModelForSettingNextBillingStartAndEnd in interface PPaymentPageBean
      Parameters:
      start - begining date of the next billing cycle
      end - date of the next billing cycle
      Returns:
      model handle containing FldNextBillT and FldActgFutureT
      Throws:
      RemoteException
    • readPayinfoDdObj

      public PModelHandle readPayinfoDdObj() throws RemoteException
      Reads the /payinfo/dd object
      Specified by:
      readPayinfoDdObj in interface PPaymentPageBean
      Returns:
      model handle for the /payinfo/dd object
      Throws:
      RemoteException
    • readServiceObj

      public PModelHandle readServiceObj(Poid servPoid) throws RemoteException
      put your documentation comment here
      Parameters:
      servPoid -
      Returns:
      Throws:
      RemoteException
    • readARBillInfoObj

      public void readARBillInfoObj(PModelHandle handle)
      reads the ar bill info for the given account given in the model handle
      Parameters:
      handle - PModelHandle
    • readARBillInfoObj

      public void readARBillInfoObj(boolean isAcctCreation)
      Specified by:
      readARBillInfoObj in interface PPaymentPageBean
    • readParentBillInfoObj

      public HashMap<String,Poid> readParentBillInfoObj(PModelHandle handle)
      reads billinfo object for the given account in the model handle
      Parameters:
      handle - PModelHandle, contains the acccount poid
      Returns:
      HashMap, returns the billinfo name and billinfo poid map
    • setParentModelHandle

      public void setParentModelHandle(PModelHandle mAccountHandle)
      sets the parent model handle
      Parameters:
      mAccountHandle - PModelHandle
    • getParentModelHandle

      public PModelHandle getParentModelHandle()
      returns the parent model handle which was set using setParentModelHandle() method
      Returns:
      PModelHandle
    • getParentBillInfo

      public PModelHandle[] getParentBillInfo()
      put your documentation comment here
      Specified by:
      getParentBillInfo in interface PPaymentPageBean
      Returns:
    • getBillInfo

      public PModelHandle[] getBillInfo(boolean refresh, PModelHandle parentMH) throws RemoteException
      gets the billinfo of the current account
      Specified by:
      getBillInfo in interface PPaymentPageBean
      Parameters:
      refresh - boolean
      parentMH - PModelHandle
      Returns:
      PModelHandle[]
      Throws:
      RemoteException
    • getChildsModelHandle

      public PModelHandle[] getChildsModelHandle(FList in)
      returns the childs of the current account model handle array
    • getShowAllParentsBillUnits

      public Object[][] getShowAllParentsBillUnits(Vector parentMhV)
      returns the data of all the parents which are there in currenct account hierarchy
      Parameters:
      parentMhV - Vector, list of parents which are in the current account hierarchy.
      Returns:
      Object[][]
    • getParentAccountPoid

      public Poid getParentAccountPoid() throws RemoteException
      returns the parent account poid of the current account
      Returns:
      Poid, parent account poid
      Throws:
      RemoteException
    • getParentBUARBillInfoObjMap

      public HashMap<String,Poid> getParentBUARBillInfoObjMap()
      returns the parents bill unit and ar bill info object map
      Returns:
      HashMap
    • readParentBillInfoObj

      public HashMap<String,Poid> readParentBillInfoObj()
      reads the parents bill unit name and the corresponding billinfo poid
      Returns:
      HashMap
    • setParentAccountPoid

      public void setParentAccountPoid(PModelHandle parentMH)
      sets the parent account poid
      Parameters:
      parentMH - PModelHandle this is parent account's model handle
    • setNoOfBU

      public void setNoOfBU(int size)
      sets the bill info count for the current selected account
      Parameters:
      size - int
    • getNoOfBU

      public int getNoOfBU()
      returns the bill info count for the current active account.
      Returns:
      int
    • getDataForTable

      public Vector<String> getDataForTable(Vector parentBillOption) throws Exception
      returns the data for table in payments page. retrieves the data depending and on if the account is in hierarchy or not
      Parameters:
      parentBillOption - Vector, parents billinfos
      Returns:
      Vector
      Throws:
      Exception
    • getBUNameAndPaytypeParentBIMap

      public HashMap<String,String> getBUNameAndPaytypeParentBIMap()
      returns the bill unit name and pay type-parent bill unit option map for the current account
      Returns:
      HashMap
    • getDataForMoveAcctConfirmDlg

      public Vector<String> getDataForMoveAcctConfirmDlg(PModelHandle selectedAcctModelHandle, Vector parentBillOption) throws Exception
      returns the data structure for move account confirmation dialog
      Parameters:
      parentBillOption - Vector
      Returns:
      Vector
      Throws:
      Exception
    • getPaymentOptions

      public HashMap<String,String> getPaymentOptions() throws RemoteException
      put your documentation comment here
      Specified by:
      getPaymentOptions in interface PPaymentPageBean
      Returns:
      Throws:
      RemoteException
    • getAccountBillUnits

      public Object[][] getAccountBillUnits(PModelHandle acctMH, Vector parentBillUnitsV) throws RemoteException
      gets the bill unit details of the account
      Parameters:
      acctMH - PModelHandle, contains the account poid to which details have to be got
      parentBillUnitsV - Vector, parents billinfo of the account poid which is sent acctMH
      Returns:
      Object[][], data structure for view BU hierarchy table
      Throws:
      RemoteException
    • getAcctNameBUnameAndBillInfoMap

      public HashMap<String,Poid> getAcctNameBUnameAndBillInfoMap()
      Returns the HashMap containing the Account Name,Poid and Bill Unit Name as key, BillInfo Poid as the Value.
      Returns:
      HashMap
    • readPaymentDetails

      public PModelHandle readPaymentDetails(PModelHandle payHandle) throws RemoteException
      reads the payment details of the model and forms the model handle of the payment details and sends back
      Specified by:
      readPaymentDetails in interface PPaymentPageBean
      Parameters:
      payHandle -
      Returns:
      Throws:
      RemoteException
    • addSubordMH

      public void addSubordMH()
    • refreshPayMH

      public void refreshPayMH(int payIndex, boolean isSubordinate)
      put your documentation comment here
      Specified by:
      refreshPayMH in interface PPaymentPageBean
      Parameters:
      payIndex -
      isSubordinate -
    • refreshPaymentMH

      public void refreshPaymentMH(Vector paymentInfo)
      Specified by:
      refreshPaymentMH in interface PPaymentPageBean
    • updatePaymentToMH

      public void updatePaymentToMH(int payDefault, PModelHandle billMH, PModelHandle eventMH) throws RemoteException
      put your documentation comment here
      Specified by:
      updatePaymentToMH in interface PPaymentPageBean
      Parameters:
      payDefault -
      billMH -
      eventMH -
      Throws:
      RemoteException
    • updateBillInfoDetails

      public boolean updateBillInfoDetails(FList billInfo) throws RemoteException
      updates the payment and billinfo details, it calls CUST_SET_BILLINFO opcodes to perform the same
      Specified by:
      updateBillInfoDetails in interface PPaymentPageBean
      Parameters:
      billInfo - FList, list contains payment type and bill info detail
      Returns:
      boolean
      Throws:
      RemoteException
    • updateBillInfoDetails

      public boolean updateBillInfoDetails(PModelHandle billMH, int payType, int billType, boolean isSubordinate) throws RemoteException
      Specified by:
      updateBillInfoDetails in interface PPaymentPageBean
      Throws:
      RemoteException
    • getResponsibleForOtherAcctCount

      public int getResponsibleForOtherAcctCount(FList billUnitFList) throws Exception
      uses search to return the count of child bill units to which this current accounts bill unit pays directly.
      Parameters:
      billUnitFList - FList, contains the ar bill info object and payment type information of the current accounts bill unit to which the method has to find the direct childers
      Returns:
      int
      Throws:
      Exception
    • getParentBillUnitsChildCount

      public int getParentBillUnitsChildCount(String buName, Poid poid) throws Exception
      for the given bill unit name and bill info poid this method returns the child count
      Parameters:
      buName - String name of the bill unit from the payment billing method combobox
      poid - Poid billinfo poid
      Returns:
      int child count of the billinfo poid
      Throws:
      Exception
    • getPayInfo

      public PModelHandle[] getPayInfo(PModelHandle acctMh) throws RemoteException
      Throws:
      RemoteException
    • getDefaultPaymentInfo

      public PModelHandle getDefaultPaymentInfo(PModelHandle billhandle, int[] paymentIndex) throws RemoteException
      Specified by:
      getDefaultPaymentInfo in interface PPaymentPageBean
      Throws:
      RemoteException
    • isAccountInHierarchy

      public boolean isAccountInHierarchy() throws RemoteException
      this finds if the current account is in hierarchy or not
      Specified by:
      isAccountInHierarchy in interface PPaymentPageBean
      Returns:
      boolean
      Throws:
      RemoteException
    • isAccountInHierarchy

      public boolean isAccountInHierarchy(PModelHandle acctHandle) throws RemoteException
      this method finds if the account is in hierarchy or not for account poid given in the acctHandle
      Parameters:
      acctHandle - PModelHandle, contains the account poid to which the method has to check if account is in hierarchy or not. This method uses BILL_GROUP_GET_PARENT opcode do the same.
      Returns:
      boolean
      Throws:
      RemoteException
    • getARBillinfo

      public void getARBillinfo(PModelHandle billMH, int[] billIndex) throws RemoteException
      returns the parents bill info model handle
      Specified by:
      getARBillinfo in interface PPaymentPageBean
      Parameters:
      billMH - PModelHandle
      billIndex - int[]
      Throws:
      RemoteException
    • getParentAcctNum

      public long getParentAcctNum()
      returns the parent account number of the current account.
      Specified by:
      getParentAcctNum in interface PPaymentPageBean
      Returns:
      long
    • getParentAccountNumber

      public String getParentAccountNumber()
      Returns the parent account number, i.e., contents of PIN_FLD_ACCOUNT_NO of /account object
      Specified by:
      getParentAccountNumber in interface PPaymentPageBean
      Returns:
      String parent account number
    • getAccountNumberFromPoid

      public String getAccountNumberFromPoid(Poid acctPoid)
      Returns the account number, i.e., contents of PIN_FLD_ACCOUNT_NO of /account object
      Returns:
      String parent account number
    • getServicesForBillInfo

      public List<PModelHandle> getServicesForBillInfo(PModelHandle pm, PModelHandle[] servHandle) throws RemoteException
      put your documentation comment here
      Specified by:
      getServicesForBillInfo in interface PPaymentPageBean
      Parameters:
      pm -
      servHandle - []
      Returns:
      Throws:
      RemoteException
    • addChilMH

      public void addChilMH()
    • getbillUnitPoidHash

      public Hashtable<Poid,Vector> getbillUnitPoidHash()
    • getBalanceGroupsAndServicesArray

      public SparseArray getBalanceGroupsAndServicesArray(Poid tempBillInfoPoid, Poid acctPoid) throws RemoteException
      Throws:
      RemoteException
    • getPayments

      public Hashtable<Integer,PModelHandle> getPayments()
      Specified by:
      getPayments in interface PPaymentPageBean
    • getParentBills

      public Hashtable<Integer,String> getParentBills()
      put your documentation comment here
      Specified by:
      getParentBills in interface PPaymentPageBean
      Returns:
    • getPaymentInfo

      public FList getPaymentInfo() throws RemoteException
      Specified by:
      getPaymentInfo in interface PPaymentPageBean
      Throws:
      RemoteException
    • getPayInfo

      public PModelHandle[] getPayInfo() throws RemoteException
      Specified by:
      getPayInfo in interface PPaymentPageBean
      Throws:
      RemoteException
    • updatePaymentOptions

      public void updatePaymentOptions(String debitNo, String maskedNo)
      This method will keep the hashmap updated with the actual debitNo and the masked debit No
      Specified by:
      updatePaymentOptions in interface PPaymentPageBean
    • getServicesFromMH

      public ArrayList<PModelHandle> getServicesFromMH(PModelHandle mhandle) throws RemoteException
      put your documentation comment here
      Specified by:
      getServicesFromMH in interface PPaymentPageBean
      Parameters:
      mhandle -
      Returns:
      Throws:
      RemoteException
    • getPaymentTblModel

      public PModelHandle getPaymentTblModel(PModelHandle arMh, boolean bIsSub, PARPaymentSearchCriteria pPmtSearchCriteria) throws RemoteException
      Gets the model handle of the payment table
      Specified by:
      getPaymentTblModel in interface PPaymentPageBean
      Parameters:
      arMh - AR account modelhandle
      bIsSub - Is this a subordinate account
      pPmtSearchCriteria - Class that has the saved payment search criteria from the dialog
      Returns:
      PModelHandle Model Handle of the table.
      Throws:
      RemoteException
    • updatePaymentMethod

      public FList updatePaymentMethod(FList itemFlist) throws RemoteException
      This method adds the PayType and sets it to 0, if it is not found in the FList
      Parameters:
      itemFlist - FList
      Returns:
      FList
      Throws:
      RemoteException
    • updateBUName

      public FList updateBUName(FList itemFlist) throws RemoteException
      reads the bill info id by passing bill info poid and updates the billinfo id to the FList passed.
      Parameters:
      itemFlist - FList
      Returns:
      FList
      Throws:
      RemoteException
    • getExemptionsTableModel

      public PModelHandle getExemptionsTableModel(PModelHandle exTblModel, PTaxExemptionData pTaxData, boolean bIsChanging, String vatCertificate) throws RemoteException
      Gets the Model Handle of the exemption table
      Specified by:
      getExemptionsTableModel in interface PPaymentPageBean
      Parameters:
      exTblModel - Model Handle of the table
      pTaxData - Tax Exemption Data that needs to be added. Will be ignored if changing or deleting exemptions.
      bIsChanging - True if changing or deleting. False if adding exemptions
      Returns:
      mAcctModel The account model for updating the panel
      Throws:
      RemoteException
    • getExemptionType

      public int getExemptionType(PModelHandle mh) throws RemoteException
      Gets the exemption type of a row selected in the exemption table.
      Specified by:
      getExemptionType in interface PPaymentPageBean
      Parameters:
      mh - model handle of the row selected in the exemptions table
      Returns:
      Returns the exemption type of the row selected in the exemption table. The values can be between 0-6
      Throws:
      RemoteException
    • getAccountModel

      public PModelHandle getAccountModel()
      Returns the model handle of the account.
      Specified by:
      getAccountModel in interface PPaymentPageBean
      Returns:
      model handle of the account
    • IsAccountDDebit

      public boolean IsAccountDDebit()
      The payment type of this account
      Specified by:
      IsAccountDDebit in interface PPaymentPageBean
      Returns:
      true if the payment type is direct debit, false otherwise
    • isAccountIncorporated

      public boolean isAccountIncorporated()
      Determines if this account is incorporated inside a city
      Specified by:
      isAccountIncorporated in interface PPaymentPageBean
      Returns:
      true if account is incorporated
    • save

      public com.portal.app.util.CustomerValErrorData[] save(PModelHandle act, PTaxExemptionData pTaxData, PModelHandle modl) throws RemoteException
      This saves the Billing cycle related info and Taxsetup related info.
      Specified by:
      save in interface PPaymentPageBean
      Parameters:
      act -
      pTaxData - Tax Data that needs to be updated.
      toSave -
      Returns:
      CustomerValErrorData[]
      Throws:
      RemoteException
    • clear

      public void clear() throws RemoteException
      Specified by:
      clear in interface PPaymentPageBean
      Throws:
      RemoteException
    • modifyPayInfo

      public com.portal.app.util.CustomerValErrorData[] modifyPayInfo(PModelHandle payModel, int index) throws RemoteException
      This validates the payinfo and stores, not committing to server
      Specified by:
      modifyPayInfo in interface PPaymentPageBean
      Parameters:
      payModel -
      index -
      Returns:
      Throws:
      RemoteException
    • validatePayInfo

      public com.portal.app.util.CustomerValErrorData[] validatePayInfo(PModelHandle payModel) throws RemoteException
      put your documentation comment here
      Specified by:
      validatePayInfo in interface PPaymentPageBean
      Parameters:
      payModel -
      Returns:
      Throws:
      RemoteException
    • deletePayInfo

      public void deletePayInfo(int index) throws RemoteException
      put your documentation comment here
      Specified by:
      deletePayInfo in interface PPaymentPageBean
      Parameters:
      index -
      Throws:
      RemoteException
    • deletePayInfo

      public com.portal.app.util.CustomerValErrorData[] deletePayInfo(PModelHandle payModel) throws RemoteException
      put your documentation comment here
      Specified by:
      deletePayInfo in interface PPaymentPageBean
      Parameters:
      payModel -
      Returns:
      Throws:
      RemoteException
    • getNewPayInfoObject

      public Poid getNewPayInfoObject()
      Returns Newly created payment info object details
      Specified by:
      getNewPayInfoObject in interface PPaymentPageBean
      Returns:
      Poid
    • setPayInfo

      public com.portal.app.util.CustomerValErrorData[] setPayInfo(PModelHandle accModel, PModelHandle payModel) throws RemoteException
      This method calls the CUST_SET_PAYINFO opcode to create/modify the payment methods.
      Specified by:
      setPayInfo in interface PPaymentPageBean
      Parameters:
      accModel - Account model passed to retrieve the account poid.
      payModel - Payment method model to be saved.
      Returns:
      CustomerValErrorData If any errors found then CustomerValErrorData will be returned otherwise null.
      Throws:
      RemoteException
    • getPaymentMethods

      public Vector getPaymentMethods()
      put your documentation comment here
      Specified by:
      getPaymentMethods in interface PPaymentPageBean
      Returns:
    • setPaymentMethodArray

      public PModelHandle[] setPaymentMethodArray()
      put your documentation comment here
      Returns:
    • getbalGrpAndSvcFromPlanPoid

      public Hashtable<String,Vector> getbalGrpAndSvcFromPlanPoid(FList modelHandle) throws RemoteException
      Specified by:
      getbalGrpAndSvcFromPlanPoid in interface PPaymentPageBean
      Throws:
      RemoteException
    • getDefaultBalGrp

      public Vector<String> getDefaultBalGrp(PModelHandle modelHandle) throws RemoteException
      Specified by:
      getDefaultBalGrp in interface PPaymentPageBean
      Throws:
      RemoteException
    • populateBalanceGroupInfo

      public FList populateBalanceGroupInfo(PModelHandle mh, boolean isPlanOption, boolean isCollectData)
      method used to populate PIN_FLD_BALINFO array to the plan model handle, if isPlanOption is true then it will remove non-purchased deals from the original model handle
      Specified by:
      populateBalanceGroupInfo in interface PPaymentPageBean
      Parameters:
      mh - plan modelhandle
      isPlanOption - flag to indicate if the selected plan is plan with option
      isCollectData - flag to indicate if method is called during collectData
      Returns:
      new FList after populating the Balance Group information
    • getPaytypesPayinfoMap

      public HashMap<Integer,String> getPaytypesPayinfoMap()
      does search in /config/payment object and forms paytype and payinfo type as key and value maps serch template : 0 PIN_FLD_RESULTS ARRAY [*] allocated 1, used 1 1 PIN_FLD_PAY_TYPES ARRAY [*] allocated 1, used 1 2 PIN_FLD_PAYINFO_TYPE STR [0] NULL 0 PIN_FLD_POID POID [0] 0.0.0.1 /search -1 0 0 PIN_FLD_ARGS ARRAY [1] allocated 1, used 1 1 PIN_FLD_POID POID [0] 0.0.0.1 /config/payment -1 0 0 PIN_FLD_TEMPLATE STR [0] "select X from /config/payment where F1 like V1 " 0 PIN_FLD_FLAGS INT [0] 256
      Returns:
    • getDefaultBillInfo

      public String getDefaultBillInfo() throws RemoteException
      Specified by:
      getDefaultBillInfo in interface PPaymentPageBean
      Throws:
      RemoteException
    • getDetailedBillInfos

      public Hashtable<String,FList> getDetailedBillInfos(FList accFList)
      Specified by:
      getDetailedBillInfos in interface PPaymentPageBean
    • getBillInfos

      public Hashtable<String,Poid> getBillInfos(FList accFList)
      Specified by:
      getBillInfos in interface PPaymentPageBean
    • getArBillinfo

      public FList getArBillinfo(Poid arPoid)
    • getBalanceGroupsAndServicesArray

      public SparseArray getBalanceGroupsAndServicesArray(Poid tempBillInfoPoid) throws RemoteException
      Specified by:
      getBalanceGroupsAndServicesArray in interface PPaymentPageBean
      Throws:
      RemoteException
    • getPurchasedDataInfo

      public FList getPurchasedDataInfo(Poid aPoid) throws RemoteException
      Specified by:
      getPurchasedDataInfo in interface PPaymentPageBean
      Throws:
      RemoteException
    • getOpenBIlls

      public Object getOpenBIlls(FList balInfoList)
      returns true if there is any open bill amount else false
      Parameters:
      balInfoList - FList
      Returns:
      Object
    • getPayInfoObj

      public Poid getPayInfoObj(int payTYPE, String payMethod, FList payMet) throws Exception
      this method gets the Pay info object poid for the selected pay method
      Parameters:
      payTYPE - int actual pay type number for the selected pay method, this will help in deciding the pay info strings. like if payTYPE is 10001 then the pay info is going to be "/payinfo/invoice
      payMethod - String selected payment method from payment method column combobox, this would help in getting the billinfo poid.
      payMet - FList is the payment infromation of the current account
      Returns:
      Poid
      Throws:
      Exception
    • getBillUnitDlgData

      public Object[][] getBillUnitDlgData(Poid billUnitPoid) throws RemoteException
      Returns the Object array containing the Child Account Name,Child Account Number and Bill Unit Name to populate the table for concerned bill unit clicked in BillUnitDialog.
      Returns:
      Object[][]
      Throws:
      RemoteException
    • setModelHandle

      public void setModelHandle(PModelHandle mHandle)
      to set the model handle.
      Specified by:
      setModelHandle in interface PPaymentPageBean
      Parameters:
      mHandle - PModelHandle
    • getModelHandle

      public PModelHandle getModelHandle()
      get the model handle.
      Specified by:
      getModelHandle in interface PPaymentPageBean
      Returns:
      PModelHandle
    • prepareModel

      public PModelHandle prepareModel(PModelHandle model) throws RemoteException
      Removes FldInheritedInfo from the model handle. This is used for display purpose.
      Returns:
      model handle
      Throws:
      RemoteException
    • getPaymentIndex

      public int getPaymentIndex(String className) throws RemoteException
      Gives the payment index for the given payment class
      Returns:
      payment index
      Throws:
      RemoteException
    • isInvoiceNameExists

      public boolean isInvoiceNameExists(FList inFlist)
      returns true if the invoice name mentioned in the inFlist already exists
      Specified by:
      isInvoiceNameExists in interface PPaymentPageBean
      Parameters:
      inFlist - FList
      Returns:
      boolean
    • removeBalInfoIndex

      public void removeBalInfoIndex(PModelHandle model)
      This method will remove 'PIN_FLD_BAL_INFO_INDEX' under Services FList during Plan Purchase If there are multiple services,get the index of PIN_FLD_BAL_INFO_INDEX in each service,search for an balinfo array at that index in the main flist and if it does not exist remove the PIN_FLD_BAL_INFO_INDEX from the services flist If there is only one service array and if it contains PIN_FLD_BAL_INFO_INDEX and if the main flist does not contain the balinfo array,then also remove the PIN_FLD_BAL_INFO_INDEX from the service flist
      Specified by:
      removeBalInfoIndex in interface PPaymentPageBean
      Parameters:
      model -
    • setPaymentMethods

      public void setPaymentMethods(Vector paymentMethods)
      Set the payment methods
      Parameters:
      vecotr - vector of payment methods