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_PLANS
opcode to display the list of plans available to purchase. - Calls the
PortalOp.CUST_MODIFY_CUSTOMER
opcode 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.void
listOfPlans
(PModelHandle mH, ResourceBundle bundle) Displays the list of plans available for purchase for this account.protected void
processOutputFList
(FList out) Parses the output flist of the plans available for purchase and stores it in aList
for the View to use.void
Gets the array associated with the plan the user selected, sets the login and password specified, and purchases the plan.void
setConfirmation
(String sPassword) Sets the input data/hidden variableConfirmPassword
with the value of the customer's password verificationString
.void
Sets the input data/hidden variableSelectedPlanIndex
to purchase the selected plan.void
Sets the input data/hidden variableServiceLogin
with the value of the customer's login.void
setPassword
(String sPassword) Sets the input data/hidden variableServicePassword
with the value of the customer's password.protected void
Adds a plan to the list of plans available for purchase.void
Theupdate
method 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 variableSelectedPlanIndex
to purchase the selected plan.- Specified by:
setIndex
in interfacePPurchasePlansBean
- Parameters:
index
- a specific plan to purchase- Throws:
RemoteException
-
setLogin
Sets the input data/hidden variableServiceLogin
with the value of the customer's login.- Specified by:
setLogin
in interfacePPurchasePlansBean
- Parameters:
sLogin
- aString
with the customer's login value- Throws:
RemoteException
-
setPassword
Sets the input data/hidden variableServicePassword
with the value of the customer's password.- Specified by:
setPassword
in interfacePPurchasePlansBean
- Parameters:
sPassword
- aString
with the customer's password value- Throws:
RemoteException
-
setConfirmation
Sets the input data/hidden variableConfirmPassword
with the value of the customer's password verificationString
.- Specified by:
setConfirmation
in interfacePPurchasePlansBean
- Parameters:
sPassword
- aString
with the customer's password verification value- Throws:
RemoteException
-
getPlans
Gets the list of plans available for purchase when the bean is loaded.- Specified by:
getPlans
in interfacePPurchasePlansBean
- Returns:
- A
List
with the available plans. - Throws:
RemoteException
-
getPlans
Accesses the plan available for purchase at the specified index when the bean is loaded.- Specified by:
getPlans
in interfacePPurchasePlansBean
- Parameters:
index
- the location of the specific plan to retrieve- Returns:
- A
String
with the specific plan's name and description. - Throws:
RemoteException
-
setPlans
Adds a plan to the list of plans available for purchase.- Parameters:
sResult
- aString
with the plan's name and decription
-
update
Description copied from class:PControllerImpl
Theupdate
method 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:
update
in 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:PControllerBean
Given 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:
getSelectionDataFor
in 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:PPurchasePlansBean
Displays the list of plans available for purchase for this account.- Specified by:
listOfPlans
in interfacePPurchasePlansBean
- Parameters:
mH
- the account'sPModelHandle
saved 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:
purchasePlans
in 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 aList
for 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
-