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:
  • Constructor Details

  • Method Details

    • setIndex

      public void setIndex(String index) throws RemoteException
      Sets the input data/hidden variable SelectedPlanIndex to purchase the selected plan.
      Specified by:
      setIndex in interface PPurchasePlansBean
      Parameters:
      index - a specific plan to purchase
      Throws:
      RemoteException
    • setLogin

      public void setLogin(String sLogin) throws RemoteException
      Sets the input data/hidden variable ServiceLogin with the value of the customer's login.
      Specified by:
      setLogin in interface PPurchasePlansBean
      Parameters:
      sLogin - a String with the customer's login value
      Throws:
      RemoteException
    • setPassword

      public void setPassword(String sPassword) throws RemoteException
      Sets the input data/hidden variable ServicePassword with the value of the customer's password.
      Specified by:
      setPassword in interface PPurchasePlansBean
      Parameters:
      sPassword - a String with the customer's password value
      Throws:
      RemoteException
    • setConfirmation

      public void setConfirmation(String sPassword) throws RemoteException
      Sets the input data/hidden variable ConfirmPassword with the value of the customer's password verification String.
      Specified by:
      setConfirmation in interface PPurchasePlansBean
      Parameters:
      sPassword - a String with the customer's password verification value
      Throws:
      RemoteException
    • getPlans

      public List getPlans() throws RemoteException
      Gets the list of plans available for purchase when the bean is loaded.
      Specified by:
      getPlans in interface PPurchasePlansBean
      Returns:
      A List with the available plans.
      Throws:
      RemoteException
    • getPlans

      public String getPlans(int index) throws RemoteException
      Accesses the plan available for purchase at the specified index when the bean is loaded.
      Specified by:
      getPlans in interface PPurchasePlansBean
      Parameters:
      index - the location of the specific plan to retrieve
      Returns:
      A String with the specific plan's name and description.
      Throws:
      RemoteException
    • setPlans

      protected void setPlans(String sResult)
      Adds a plan to the list of plans available for purchase.
      Parameters:
      sResult - a String with the plan's name and decription
    • update

      public void update(int reason, Object data)
      Description copied from class: PControllerImpl
      The update 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 class PControllerImpl
      Parameters:
      reason - an integer constant that indicates the reason for the update (UPDATE_NEW_MODEL, UPDATE_PROPERTY, UPDATE_MODEL_CHANGE, or UPDATE_CLIENT)
      data - the data associated with update
    • getSelectionDataFor

      public Object getSelectionDataFor(String dataItem, int index)
      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 interface PControllerBean
      Parameters:
      dataItem - the name of a data item. Must match the name of an item changed by sending a PViewDataChangeEvent.
      index - an optional index into an array data item
      Returns:
      Usually, a model handle or array of model handles.
    • listOfPlans

      public void listOfPlans(PModelHandle mH, ResourceBundle bundle) throws RemoteException
      Description copied from interface: PPurchasePlansBean
      Displays the list of plans available for purchase for this account.
      Specified by:
      listOfPlans in interface PPurchasePlansBean
      Parameters:
      mH - the account's PModelHandle saved in the session
      bundle - the resource bundle
      Throws:
      RemoteException
    • purchasePlans

      public void purchasePlans(PModelHandle mH) throws RemoteException
      Gets the array associated with the plan the user selected, sets the login and password specified, and purchases the plan.
      Specified by:
      purchasePlans in interface PPurchasePlansBean
      Parameters:
      mH - the account's PModelHandle
      Throws:
      RemoteException - thrown for null contexts, input flists or service arrays, as well as mismatched passwords or invalid field descriptions
    • processOutputFList

      protected void processOutputFList(FList out) throws RemoteException
      Parses the output flist of the plans available for purchase and stores it in a List 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