Package com.portal.web.comp
Class PPurchasePlansBeanImpl
java.lang.Object
com.portal.bas.PControllerImpl
com.portal.web.comp.PPurchasePlansBeanImpl
- All Implemented Interfaces:
PControllerBean,PPurchasePlansBean,Serializable,Remote,Unreferenced
public class PPurchasePlansBeanImpl
extends PControllerImpl
implements PPurchasePlansBean, Serializable
Controller object used for purchasing plans.
Implements the following functionality:
- Calls the
PortalOp.CUST_POL_GET_PLANSopcode to display the list of plans available to purchase. - Calls the
PortalOp.CUST_MODIFY_CUSTOMERopcode to purchase the user-selected plan.
- Author:
- sujata
- See Also:
-
Field Summary
Fields inherited from class com.portal.bas.PControllerImpl
mFList, mRemoteListeners, UPDATE_CLIENT, UPDATE_MODEL_CHANGE, UPDATE_NEW_MODEL, UPDATE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetPlans()Gets the list of plans available for purchase when the bean is loaded.getPlans(int index) Accesses the plan available for purchase at the specified index when the bean is loaded.getSelectionDataFor(String dataItem, int index) Given the name of a display data item and an optional index, returns the information needed for a Selection event.voidlistOfPlans(PModelHandle mH, ResourceBundle bundle) Displays the list of plans available for purchase for this account.protected voidprocessOutputFList(FList out) Parses the output flist of the plans available for purchase and stores it in aListfor the View to use.voidGets the array associated with the plan the user selected, sets the login and password specified, and purchases the plan.voidsetConfirmation(String sPassword) Sets the input data/hidden variableConfirmPasswordwith the value of the customer's password verificationString.voidSets the input data/hidden variableSelectedPlanIndexto purchase the selected plan.voidSets the input data/hidden variableServiceLoginwith the value of the customer's login.voidsetPassword(String sPassword) Sets the input data/hidden variableServicePasswordwith the value of the customer's password.protected voidAdds a plan to the list of plans available for purchase.voidTheupdatemethod is called by various internal methods when the data has changed enough to require changing the client display.Methods inherited from class com.portal.bas.PControllerImpl
addRemoteListener, closeSecContext, createClientException, distributeEventToListeners, fireModelChangeEvent, getAppController, getArrayRange, getContext, getField, getField, getField, getFieldWithRestriction, getFieldWithRestriction, getFieldWithRestriction, getModel, getRemoteListenerHandle, getSecContext, handleDistributeToListener, isLight, register, releaseContext, releaseRemoteListener, removeRemoteListener, setField, setField, setModel, unreferenced
-
Constructor Details
-
PPurchasePlansBeanImpl
Creates the controller for purchasing plans.- Throws:
RemoteException
-
-
Method Details
-
setIndex
Sets the input data/hidden variableSelectedPlanIndexto purchase the selected plan.- Specified by:
setIndexin interfacePPurchasePlansBean- Parameters:
index- a specific plan to purchase- Throws:
RemoteException
-
setLogin
Sets the input data/hidden variableServiceLoginwith the value of the customer's login.- Specified by:
setLoginin interfacePPurchasePlansBean- Parameters:
sLogin- aStringwith the customer's login value- Throws:
RemoteException
-
setPassword
Sets the input data/hidden variableServicePasswordwith the value of the customer's password.- Specified by:
setPasswordin interfacePPurchasePlansBean- Parameters:
sPassword- aStringwith the customer's password value- Throws:
RemoteException
-
setConfirmation
Sets the input data/hidden variableConfirmPasswordwith the value of the customer's password verificationString.- Specified by:
setConfirmationin interfacePPurchasePlansBean- Parameters:
sPassword- aStringwith the customer's password verification value- Throws:
RemoteException
-
getPlans
Gets the list of plans available for purchase when the bean is loaded.- Specified by:
getPlansin interfacePPurchasePlansBean- Returns:
- A
Listwith the available plans. - Throws:
RemoteException
-
getPlans
Accesses the plan available for purchase at the specified index when the bean is loaded.- Specified by:
getPlansin interfacePPurchasePlansBean- Parameters:
index- the location of the specific plan to retrieve- Returns:
- A
Stringwith the specific plan's name and description. - Throws:
RemoteException
-
setPlans
Adds a plan to the list of plans available for purchase.- Parameters:
sResult- aStringwith the plan's name and decription
-
update
Description copied from class:PControllerImplTheupdatemethod is called by various internal methods when the data has changed enough to require changing the client display. Must be overridden by a specific controller subclass.- Specified by:
updatein classPControllerImpl- Parameters:
reason- an integer constant that indicates the reason for the update (UPDATE_NEW_MODEL,UPDATE_PROPERTY,UPDATE_MODEL_CHANGE, orUPDATE_CLIENT)data- the data associated withupdate
-
getSelectionDataFor
Description copied from interface:PControllerBeanGiven the name of a display data item and an optional index, returns the information needed for a Selection event. The information returned is usually model data.- Specified by:
getSelectionDataForin interfacePControllerBean- Parameters:
dataItem- the name of a data item. Must match the name of an item changed by sending aPViewDataChangeEvent.index- an optional index into an array data item- Returns:
- Usually, a model handle or array of model handles.
-
listOfPlans
Description copied from interface:PPurchasePlansBeanDisplays the list of plans available for purchase for this account.- Specified by:
listOfPlansin interfacePPurchasePlansBean- Parameters:
mH- the account'sPModelHandlesaved in the sessionbundle- the resource bundle- Throws:
RemoteException
-
purchasePlans
Gets the array associated with the plan the user selected, sets the login and password specified, and purchases the plan.- Specified by:
purchasePlansin interfacePPurchasePlansBean- Parameters:
mH- the account'sPModelHandle- Throws:
RemoteException- thrown for null contexts, input flists or service arrays, as well as mismatched passwords or invalid field descriptions
-
processOutputFList
Parses the output flist of the plans available for purchase and stores it in aListfor the View to use.- Parameters:
out- the opcode's output flist containing plans available for purchase- Throws:
RemoteException- thrown if the array of plans or the plan's POID are null
-