Package com.portal.app.cc.sharing
Class PSharingController
java.lang.Object
com.portal.app.cc.sharing.PSharingController
- Direct Known Subclasses:
PChargeSharingController
,PCollectionsSharingController
,PDiscountSharingController
,PProfileSharingController
Abstract Controller class for the entire sharing tab. This class retrieves all the data
related to Sharing tab.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected long
protected long
protected String
protected String
protected ArrayField
protected PoidField
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal void
acceptParticipation
(Hashtable alist, Hashtable rlist) void
addMembersToCollectionGroup
(Poid groupPoid, Poid[] acctPoids, Poid[] billUnitPoids, Poid parentPoid) Adds members to collection group.void
addMembersToGroup
(Poid groupPoid, Poid[] acctPoids, Poid[] servicePoids) void
createGroup
(PGroupData gData) This method will create a group by using passedPGroupData
.final void
deleteCollectionMembers
(Poid groupPoid, Poid[] memberBillUnitPoids) Deletes the members from the collection group.final void
deleteGroups
(Poid[] groupPoids) This method will delete an existing groups.final void
deleteMembers
(Poid groupPoid, Poid[] account) boolean
deleteMembersFromGroup
(Poid groupPoid, Poid[] acctPoids, Poid[] servicePoids) protected abstract void
extractGroupSharingsFromFList
(PGroupData gData, Enumeration sharingValueEnum, HashMap indexMapping, Poid accPoid) protected final void
fillBillinfoData
(com.portal.app.cc.sharing.PGroupOwnerElementData ownerElement, Poid acctPoid) This will fetch the bill info data from the server and updates thePGroupOwnerElementData
.protected final void
fillPayinfoData
(com.portal.app.cc.sharing.PGroupOwnerElementData ownerElement) This will get the payinfo data from the server and updates the passedPGroupOwnerElementData
.getAllMemberServices
(Poid[] acctPoids) final ArrayList
getAllServices
(Poid acctPoid) This method will return the list of the services in an account.abstract ArrayList
getAvailableSharingObjects
(Poid servicePoid) final ArrayList
<com.portal.app.cc.sharing.PGroupMemberData> getCollectionsGroupMembers
(Poid groupPoid, Poid parentPoid) Prepares input flist for COLLECTIONS_GROUP_GET_BILLINFO opcode to get the details of member billunits associated with the Collection groupgetCurrentAccountNo
(Poid acctObj) This method will return the account number for the passed account poid.getGlobalCSGMemberServices
(Poid groupPoid) Returns the member services associated with the global charge sharing groupgetGroupInfo
(Poid groupPoid) This method gets the group related information from the server and fills it up in to the objectPGroupData
and returns that object.
final ArrayList
<com.portal.app.cc.sharing.PGroupMemberData> getGroupMembers
(Poid groupPoid) getGroupMembersInfoArray
(Poid groupPoid) getGroupMembersInfoArray This will return the members in the groupThis will return the type of sharing.final ArrayList
getMemberData
(Poid acctObj) getOwnershipData
(Poid acctPoid) This method gets the ownership data of Charge/Discount Sharing group depending on sharing mode.final ArrayList
getParticipatingGroups
(Poid acctObj) protected final String
getServiceLoginAndType
(Poid servPoid) This method will return the formatted service login and type for the passed service poid.boolean
isAccountHavingDiscounts
(Poid acctPoid) Searches for the Discount Object in the Account if the Account contains any discount either account level or service level returns true else falsestatic boolean
isAccountPoidTypeOnly
(Poid poid) boolean
isGlobalCSG
(Poid groupPoid) Indicates whether the passed group is global charge sharing group or not.static boolean
isServicePoidTypeOnly
(Poid poid) void
modifyGroup
(PGroupData gData) This method used to modify the group by using passedPGroupData
.protected abstract void
prepareFListforAGroupMember
(FList memFList, PSharingItemData d) protected abstract void
prepareFListforGroupInfoSharings
(FList sharingFList) protected abstract void
prepareIndexMapping
(HashMap indexMapping, SparseArray sharingsArray) final FList
This method will invoke search opcode with passed input flist and flag.final FList
This method will invoke search opcode with passed input flist and flag.protected ArrayList
searchWithInOperator
(String preTemplate, String postTemplate, FList inPutFList, Object[] poids) This method will invoke search opcode by using in operator.final void
setPriorities
(ArrayList alist, Poid acctPoid)
-
Field Details
-
db
protected long db -
id
protected long id -
mGroupType
-
mSharingType
-
sharingArrayField
-
sharingPoidField
-
-
Constructor Details
-
PSharingController
public PSharingController()
-
-
Method Details
-
getGroupType
This will return the type of sharing. That mean the existing controller is of type discount/charge.- Returns:
- String the group type
-
getGroupInfo
This method gets the group related information from the server and fills it up in to the objectPGroupData
and returns that object.
- Parameters:
groupPoid
- Poid the group poid- Returns:
- PGroupData the group info object
- Throws:
SharingException
-
createGroup
This method will create a group by using passedPGroupData
. This will throwSharingException
if there is any problem while creating the group.- Parameters:
gData
- PGroupData the group information object- Throws:
SharingException
-
modifyGroup
This method used to modify the group by using passedPGroupData
. This will throwSharingException
when there is a problem while updating the group.- Parameters:
gData
- PGroupData the group information object- Throws:
SharingException
-
deleteGroups
This method will delete an existing groups.- Parameters:
groupPoids
- Poid[] the array of group poids for deleting the groups.- Throws:
SharingException
-
search
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 flagin
- FList the input flist- Returns:
- FList the output flist
- Throws:
SharingException
-
search
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 flagin
- FList the input flistisServiceSearch
- 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
- Throws:
SharingException
-
getServiceLoginAndType
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
- Throws:
SharingException
-
setPriorities
- Throws:
SharingException
-
getMemberData
- 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
Returns the member services associated with the global charge sharing group- Parameters:
groupPoid
-- Returns:
- Throws:
SharingException
-
isGlobalCSG
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
-
isServicePoidTypeOnly
-
getParticipatingGroups
- Throws:
SharingException
-
getCurrentAccountNo
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
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 passedPGroupOwnerElementData
.- 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 thePGroupOwnerElementData
.- Parameters:
ownerElement
- PGroupOwnerElementDataacctPoid
- Poid an account poid- Throws:
SharingException
-
getOwnershipData
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
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
- 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 operatorpostTemplate
- String the template after the in operatorinPutFList
- FList the input flistpoids
- Object[] array of poids- Returns:
- ArrayList list of output flists.
- Throws:
SharingException
-
isAccountHavingDiscounts
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
-
prepareFListforAGroupMember
-
extractGroupSharingsFromFList
protected abstract void extractGroupSharingsFromFList(PGroupData gData, Enumeration sharingValueEnum, HashMap indexMapping, Poid accPoid) throws EBufException - Throws:
EBufException
-
getAvailableSharingObjects
- Throws:
SharingException
-