Class PSharingController

java.lang.Object
com.portal.app.cc.sharing.PSharingController
Direct Known Subclasses:
PChargeSharingController, PCollectionsSharingController, PDiscountSharingController, PProfileSharingController

public abstract class PSharingController extends Object
Abstract Controller class for the entire sharing tab. This class retrieves all the data related to Sharing tab.
  • Field Details

    • db

      protected long db
    • id

      protected long id
    • mGroupType

      protected String mGroupType
    • mSharingType

      protected String mSharingType
    • sharingArrayField

      protected ArrayField sharingArrayField
    • sharingPoidField

      protected PoidField sharingPoidField
  • Constructor Details

    • PSharingController

      public PSharingController()
  • Method Details

    • getGroupType

      public String getGroupType()
      This will return the type of sharing. That mean the existing controller is of type discount/charge.
      Returns:
      String the group type
    • getGroupInfo

      public PGroupData getGroupInfo(Poid groupPoid) throws SharingException
      This method gets the group related information from the server and fills it up in to the object PGroupData and returns that object.
      Parameters:
      groupPoid - Poid the group poid
      Returns:
      PGroupData the group info object
      Throws:
      SharingException
    • createGroup

      public void createGroup(PGroupData gData) throws SharingException
      This method will create a group by using passed PGroupData. This will throw SharingException if there is any problem while creating the group.
      Parameters:
      gData - PGroupData the group information object
      Throws:
      SharingException
    • modifyGroup

      public void modifyGroup(PGroupData gData) throws SharingException
      This method used to modify the group by using passed PGroupData. This will throw SharingException when there is a problem while updating the group.
      Parameters:
      gData - PGroupData the group information object
      Throws:
      SharingException
    • deleteGroups

      public final void deleteGroups(Poid[] groupPoids) throws SharingException
      This method will delete an existing groups.
      Parameters:
      groupPoids - Poid[] the array of group poids for deleting the groups.
      Throws:
      SharingException
    • search

      public final FList search(int FLAG, FList in) throws SharingException
      This method will invoke search opcode with passed input flist and flag. This will return the search result as output flist.
      Parameters:
      FLAG - int the search flag
      in - FList the input flist
      Returns:
      FList the output flist
      Throws:
      SharingException
    • search

      public final FList search(int Flag, FList in, boolean isServiceSearch) throws SharingException
      This method will invoke search opcode with passed input flist and flag. This will return the search result as output flist.
      Parameters:
      Flag - int the search flag
      in - FList the input flist
      isServiceSearch - boolean Pass as true if you have base object "/service" in your search template. if true passed then serviceSearch() method of PortalContext will be called otherwise normal opcode() method will be called. This is to avoid the timesten limitation of not returning search results when only "/service" found in the template.
      Returns:
      FList the output flist
      Throws:
      SharingException
    • deleteCollectionMembers

      public final void deleteCollectionMembers(Poid groupPoid, Poid[] memberBillUnitPoids) throws SharingException
      Deletes the members from the collection group.
      Parameters:
      groupPoid -
      memberBillUnitPoids -
      Throws:
      SharingException
    • deleteMembers

      public final void deleteMembers(Poid groupPoid, Poid[] account) throws SharingException
      Throws:
      SharingException
    • getServiceLoginAndType

      protected final String getServiceLoginAndType(Poid servPoid) throws SharingException
      This method will return the formatted service login and type for the passed service poid.
      Parameters:
      servPoid - Poid the service poid
      Returns:
      String the formatted string
      Throws:
      SharingException
    • acceptParticipation

      public final void acceptParticipation(Hashtable alist, Hashtable rlist) throws SharingException
      Throws:
      SharingException
    • setPriorities

      public final void setPriorities(ArrayList alist, Poid acctPoid) throws SharingException
      Throws:
      SharingException
    • getMemberData

      public final ArrayList getMemberData(Poid acctObj) throws SharingException
      Throws:
      SharingException
    • getCollectionsGroupMembers

      public final ArrayList<com.portal.app.cc.sharing.PGroupMemberData> getCollectionsGroupMembers(Poid groupPoid, Poid parentPoid) throws SharingException
      Prepares input flist for COLLECTIONS_GROUP_GET_BILLINFO opcode to get the details of member billunits associated with the Collection group
      Parameters:
      groupPoid -
      parentPoid -
      Returns:
      Arraylist of billunits.
      Throws:
      SharingException
    • getGroupMembers

      public final ArrayList<com.portal.app.cc.sharing.PGroupMemberData> getGroupMembers(Poid groupPoid) throws SharingException
      Throws:
      SharingException
    • getGlobalCSGMemberServices

      public ArrayList<Poid> getGlobalCSGMemberServices(Poid groupPoid) throws SharingException
      Returns the member services associated with the global charge sharing group
      Parameters:
      groupPoid -
      Returns:
      Throws:
      SharingException
    • isGlobalCSG

      public boolean isGlobalCSG(Poid groupPoid)
      Indicates whether the passed group is global charge sharing group or not.
      Parameters:
      groupPoid - Poid charge sharing group poid
      Returns:
      boolean true means the charge sharing group is global CSG otherwise returns false.
    • isAccountPoidTypeOnly

      public static boolean isAccountPoidTypeOnly(Poid poid)
    • isServicePoidTypeOnly

      public static boolean isServicePoidTypeOnly(Poid poid)
    • getParticipatingGroups

      public final ArrayList getParticipatingGroups(Poid acctObj) throws SharingException
      Throws:
      SharingException
    • getCurrentAccountNo

      public String getCurrentAccountNo(Poid acctObj) throws EBufException
      This method will return the account number for the passed account poid.
      Parameters:
      acctObj - Poid an account poid
      Returns:
      String an account number
      Throws:
      EBufException
    • getAllServices

      public final ArrayList getAllServices(Poid acctPoid) throws SharingException
      This method will return the list of the services in an account.
      Parameters:
      acctPoid - Poid an account poid
      Returns:
      ArrayList the list of services
      Throws:
      SharingException
    • fillPayinfoData

      protected final void fillPayinfoData(com.portal.app.cc.sharing.PGroupOwnerElementData ownerElement) throws SharingException
      This will get the payinfo data from the server and updates the passed PGroupOwnerElementData.
      Parameters:
      ownerElement - PGroupOwnerElementData
      Throws:
      SharingException
    • fillBillinfoData

      protected final void fillBillinfoData(com.portal.app.cc.sharing.PGroupOwnerElementData ownerElement, Poid acctPoid) throws SharingException
      This will fetch the bill info data from the server and updates the PGroupOwnerElementData.
      Parameters:
      ownerElement - PGroupOwnerElementData
      acctPoid - Poid an account poid
      Throws:
      SharingException
    • getOwnershipData

      public ArrayList getOwnershipData(Poid acctPoid) throws SharingException
      This method gets the ownership data of Charge/Discount Sharing group depending on sharing mode. This method populates the PGroupData datastructure.
      Parameters:
      acctPoid - Poid an account poid
      Returns:
      ArrayList list of groups in an account
      Throws:
      SharingException
    • getGroupMembersInfoArray

      public ArrayList getGroupMembersInfoArray(Poid groupPoid) throws SharingException
      getGroupMembersInfoArray This will return the members in the group
      Parameters:
      groupPoid - Poid
      Returns:
      ArrayList
      Throws:
      SharingException
    • deleteMembersFromGroup

      public boolean deleteMembersFromGroup(Poid groupPoid, Poid[] acctPoids, Poid[] servicePoids) throws SharingException
      Throws:
      SharingException
    • getAllMemberServices

      public ArrayList getAllMemberServices(Poid[] acctPoids) throws SharingException
      Throws:
      SharingException
    • addMembersToCollectionGroup

      public void addMembersToCollectionGroup(Poid groupPoid, Poid[] acctPoids, Poid[] billUnitPoids, Poid parentPoid) throws SharingException
      Adds members to collection group.
      Parameters:
      groupPoid -
      acctPoids -
      billUnitPoids -
      parentPoid -
      Throws:
      SharingException
    • addMembersToGroup

      public void addMembersToGroup(Poid groupPoid, Poid[] acctPoids, Poid[] servicePoids) throws SharingException
      Throws:
      SharingException
    • searchWithInOperator

      protected ArrayList searchWithInOperator(String preTemplate, String postTemplate, FList inPutFList, Object[] poids) throws SharingException
      This method will invoke search opcode by using in operator. This will be invoked once for set of 50 poids. This is because the limitation what we are having in the data base side.
      Parameters:
      preTemplate - String the template before in operator
      postTemplate - String the template after the in operator
      inPutFList - FList the input flist
      poids - Object[] array of poids
      Returns:
      ArrayList list of output flists.
      Throws:
      SharingException
    • isAccountHavingDiscounts

      public boolean isAccountHavingDiscounts(Poid acctPoid) throws SharingException
      Searches for the Discount Object in the Account if the Account contains any discount either account level or service level returns true else false
      Parameters:
      acctPoid - Poid
      Returns:
      boolean
      Throws:
      SharingException
    • prepareIndexMapping

      protected abstract void prepareIndexMapping(HashMap indexMapping, SparseArray sharingsArray) throws EBufException
      Throws:
      EBufException
    • prepareFListforGroupInfoSharings

      protected abstract void prepareFListforGroupInfoSharings(FList sharingFList)
    • prepareFListforAGroupMember

      protected abstract void prepareFListforAGroupMember(FList memFList, PSharingItemData d)
    • extractGroupSharingsFromFList

      protected abstract void extractGroupSharingsFromFList(PGroupData gData, Enumeration sharingValueEnum, HashMap indexMapping, Poid accPoid) throws EBufException
      Throws:
      EBufException
    • getAvailableSharingObjects

      public abstract ArrayList getAvailableSharingObjects(Poid servicePoid) throws SharingException
      Throws:
      SharingException