Class PChangeStatusPage

All Implemented Interfaces:
PAccountViewPage, PCCPage, DeferralChangeListener, HoldingsChangeListener, ServiceChangeListener, StatusChangeListener, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ActionListener, ContainerListener, ItemListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible

Allows modification of the customer's account/services status. Modification is done through the PChangeStatusPage.

This page supports the addition of a custom panel on the right. Something along the lines of:
        public class ModStatus extends PChangeStatusPage {
                public ModStatus() {
                PIACustomizablePanel p = new PIACustomizablePanel();
                        GridBagConstraints gbc = new GridBagConstraints(
                            0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST,
                            GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0);
                        p.setLayout(new GridBagLayout());
                        p.add(new JButton("AAA"), gbc);
                        gbc.gridy++;
                        p.add(new JButton("BBB"), gbc);
                        gbc.gridy++;
                        p.add(new JButton("CCC"), gbc);
                        gbc.gridy++;
                        p.add(new JButton("DDD"), gbc);
                        p.add(new JLabel(), new GridBagConstraints(
                                1, 0, 2, 4, 1.0, 1.0 ,GridBagConstraints.WEST,
                                GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0));
                        setCustomData(p);
        }
 
See Also:
  • Field Details

  • Constructor Details

    • PChangeStatusPage

      public PChangeStatusPage()
      Creates a panel that displays account status
  • Method Details

    • enteringPage

      public void enteringPage()
      This method will be called when the control enters the change status page.
      Specified by:
      enteringPage in interface PCCPage
      Overrides:
      enteringPage in class PMaintenancePage
    • refresh

      public void refresh()
      This method will be called when "refresh" button is pressed.
      Specified by:
      refresh in interface PAccountViewPage
      Overrides:
      refresh in class PMaintenancePage
    • addNotify

      public void addNotify()
      Overridden to create a renderer for mofService combobox
      Overrides:
      addNotify in class JComponent
    • removeNotify

      public void removeNotify()
      Overrides:
      removeNotify in class JComponent
    • setModelHandle

      public void setModelHandle(PModelHandle data) throws RemoteException
      Description copied from class: PIACustomizablePanel
      Establishes the PModelHandle for this component and all its descendants.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      data - the new PModelHandle from which to extract information
      Throws:
      RemoteException - thrown for errors
    • refreshmhServicesList

      public void refreshmhServicesList()
      This method refreshes the mhServicesList handle from the selected services.
    • setSelectedModel

      public void setSelectedModel(PModelHandle mh)
      Sets the selected service in the ComboBox by specifying the PModelHandle in the list. If mh is in the list, the list displays with mh selected.
      Parameters:
      mh - the list PModelHandle to select
    • getLabel

      public String getLabel()
      Returns the label that should appear in the breadcrumb trail
      Specified by:
      getLabel in interface PCCPage
      Overrides:
      getLabel in class PMaintenancePage
      Returns:
      The tag that will be displayed in the breadcrumb trail to reference this component.
    • save

      public void save() throws PSaveException
      There are 3 type of different control flows of changing status 1. Change service status call setModelfieldDescription to format the input flist see setModelfieldDescription for detail format call collectdata to construct the input flist call controller PortalOp.CUST_UPDATE_SERVICES 2. Change sponsor account to close a model dialog box will be provided for users option call setModelfieldDescription to format the input flist call collectdata to construct the input flist call setOptionFlags(modl, dlg); to set extra option fields call controller PortalOp.CUST_SET_STATUS 3. Change regular account to inactive or close various warning dialog boxes will be pop up to inform the user about the consequence call setModelfieldDescription to format the input flist call collectdata to construct the input flist call controller PortalOp.CUST_SET_STATUS
      Specified by:
      save in interface PAccountViewPage
      Overrides:
      save in class PMaintenancePage
      Throws:
      PSaveException
    • actionPerformed

      public void actionPerformed(ActionEvent e)
      Specified by:
      actionPerformed in interface ActionListener
    • setServiceLifeCycleData

      protected void setServiceLifeCycleData(PModelHandle serv)
      This method sets the data on this page for the service is SLM enabled. if service of the same type then get_cust_life_cycle_states opcode wont be called for each service. instead a same life cycle obj will be re-used for all same service types.
      Parameters:
      serv -
    • statusChange

      public void statusChange(StatusChangeEvent e)
      Called when some other page changes the status of an account/service
      Specified by:
      statusChange in interface StatusChangeListener
      Parameters:
      e - a StatusChangeEvent encapsulating the event information
    • deferralChange

      public void deferralChange(DeferralChangeEvent e)
      Called when some other page performs some kind of deferral
      Specified by:
      deferralChange in interface DeferralChangeListener
      Parameters:
      e - a DeferralChangeEvent encapsulating the event information
    • holdingsChange

      public void holdingsChange(HoldingsChangeEvent e)
      Event listener for table HoldingsChangeEvent. Called when an event is sent out that indicates a purchase of a deal/service has been made.
      Specified by:
      holdingsChange in interface HoldingsChangeListener
      Parameters:
      e - a HoldingsChangeEvent encapsulating the event information
    • unregister

      public void unregister() throws RemoteException
      Description copied from class: PIACustomizablePanel
      Used to disconnect the controller from the component for all child widgets contained within this panel.
      Specified by:
      unregister in interface PClientComponent
      Overrides:
      unregister in class PIACustomizablePanel
      Throws:
      RemoteException
    • getControllerClassName

      public String getControllerClassName() throws RemoteException
      Description copied from class: PIACustomizablePanel
      Retrieves the class name of this component's controller, in this case, null.
      Specified by:
      getControllerClassName in interface PComponent
      Overrides:
      getControllerClassName in class PIACustomizablePanel
      Returns:
      A null String.
      Throws:
      RemoteException - thrown for errors
    • resetToDefault

      public void resetToDefault()
      Removes any changes made to the account and reverts back to the last read/saved values.
      Specified by:
      resetToDefault in interface PComponentAttribute
      Overrides:
      resetToDefault in class PIACustomizablePanel
    • setModelFieldDescription

      protected void setModelFieldDescription(String changeType)
    • confirmWarningMsg

      protected int confirmWarningMsg(String msg, String title)
      Display a confirmation dialog containing the specified message, title and 2 choices for the user (YES or NO).
      Parameters:
      msg - The confirmation message to display
      title - The title of the confirmation dialog
      messageType - an integer designating the kind of message this is, primarily used to determine the icon from the pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGE
      int - The default button. Use JOptionPane.YES_OPTION or JOptionPane.NO_OPTION
      Returns:
      One of JOptionPane.YES_OPTION, JOptionPane.NO_OPTION, or JOptionPane.CLOSED_OPTION if the user cancel's the dialog
    • confirmationMsg

      protected int confirmationMsg(String msg, String title, int messageType, int def)
    • formatWarningMessage

      protected Object formatWarningMessage(String msg)
    • setCustomData

      protected void setCustomData(PIACustomizablePanel p)
      Allows a subclass to embed additional fields in the upper right region of this page.
      It is highly advised that you understand how account and service status changes work in Portal before you add additional criteria to this page. Because of the sensitive nature of these chanes you may cause major problems if you change the behavior of this panel.
      Parameters:
      p - The custom panel to display
    • preCommit

      protected void preCommit(PModelHandle pm) throws PSaveException
      Affords subclasses the opportunity to inspect the data that is about to be committed to Portal.

      Because this particular pages deals with both services and accounts there is some slight data modification that occurs further upstream. If the FldPoid is the account then this data is fine. If it is a service object however it must be changed to FldServiceObj in the input FList and the account POID must be added in as the FldPoid argument. This processing occurs in the controller. If you wish to halt the save process for any reason throw a PSaveException. It is the subclass' responsibility to display an error dialog in this case.

      Throws:
      PSaveException
    • getSelectedService

      protected PModelHandle getSelectedService()
      Returns the actual Portal storable class instance currently selected in the UI.
      Returns:
      A PModelHandle representation of the currently selected service or account.
    • mbReset_actionPerformed

      protected void mbReset_actionPerformed(ActionEvent e)
      Called when the reset button is selected
    • mbApply_actionPerformed

      protected void mbApply_actionPerformed(ActionEvent e)
      Called when the apply button is selected - this method will invoke the save() method.
    • getCurrentlySetStatusFromPanel

      protected int getCurrentlySetStatusFromPanel()
      Retrieves the current state of the status dropdown as an Enumerated value.
      Returns:
      The Portal status as currently selected by the user
    • meChangeStatusTo_actionPerformed

      protected void meChangeStatusTo_actionPerformed(ActionEvent e)
      Invoked when the widget that manipulates the status is changed by the user
    • isDeferredDateValid

      protected boolean isDeferredDateValid()
      Checks if the Deferred date is in the future; status change is not allowed if the date is in the past. Subclasses can override this method if they want to allow the status change to be backdated
      Returns:
      true if the deferred date is in the future; false otherwise
    • isBackdDateValid

      protected boolean isBackdDateValid()
      Checks if the back date is in the valid format and not null This method does not check if the back date is in past/future/current. Subclasses can override this method if they want to have additional validations
      Returns:
      true if back date is in valid format, false otherwise
    • itemStateChanged

      public void itemStateChanged(ItemEvent e)
      enable/disable date fields depending on radiobutton selection
      Specified by:
      itemStateChanged in interface ItemListener
    • serviceChange

      public void serviceChange(ServiceChangeEvent e)
      Service change listener.
      Specified by:
      serviceChange in interface ServiceChangeListener
      Parameters:
      e - a ServiceChangeEvent encapsulating the event information