Class PTelcoPromotionPage

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

public class PTelcoPromotionPage extends PMaintenancePage implements HoldingsChangeListener
Top-level container (tab) for account promotions. There are two kinds of promotions:
  • account level promotions
  • service level promotions

If an account does not contain any Telco services, this tab will be hidden.

See Also:
  • Constructor Details

    • PTelcoPromotionPage

      public PTelcoPromotionPage()
      Creates a top-level page (tab) containg both account and service level promotions.
  • Method Details

    • isValidContext

      public boolean isValidContext(PAccountViewContext ctx)
      If an account does not contain any Telco services, this tab will be hidden by returning false.
      Specified by:
      isValidContext in interface PAccountViewPage
      Overrides:
      isValidContext in class PMaintenancePage
      Parameters:
      ctx - The current account view's context
      The - current account view's context
      Returns:
      true if the page is valid and should be visible; false otherwise
    • save

      public void save() throws PSaveException
      Saves account and service level promotions for current account (if any). This method will attempt to save account and service level promotions sequentially. If one failed, the program will log the error and continue to save the other.

      Account and service level promotions saving does not need to be in one single transaction because they are not related to each other. Both are grouped in the same tab to allow esaier access to CSRs.

      Specified by:
      save in interface PAccountViewPage
      Overrides:
      save in class PMaintenancePage
      Throws:
      PSaveException
    • unregister

      public void unregister() throws RemoteException
      The Holdings listener needs to be removed. This is the best place to do it.
      Specified by:
      unregister in interface PClientComponent
      Overrides:
      unregister in class PIACustomizablePanel
      Throws:
      RemoteException
    • setModelHandle

      public void setModelHandle(PModelHandle accountModel) throws RemoteException
      Overridden to set the object model handle in PTelcoPromotionPanels.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      accountModel - the new model handle representing an account.
      Throws:
      RemoteException - thrown for errors
    • holdingsChange

      public void holdingsChange(HoldingsChangeEvent e)
      Called when a new service is added using the purchase wizard
      Specified by:
      holdingsChange in interface HoldingsChangeListener
      Parameters:
      e - a HoldingsChangeEvent encapsulating the event information
    • refresh

      public void refresh()
      Description copied from class: PMaintenancePage
      Called when the page should be immediately refreshed - typically as a result of the Reset action being invoked by the user.
      Specified by:
      refresh in interface PAccountViewPage
      Overrides:
      refresh in class PMaintenancePage
    • addNotify

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

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

      protected PTelcoPromotionPanel createPromotionPanel(boolean isAccountlevelERA)
      Getting the customized panel class. This method will retun the extended PTelcoPromotionPanel. The extended class should have a boolean constructor.
      Parameters:
      Boolean - value to represent whether the panel is Account level promotion Panel or Service level Promotion panel.
    • isDirty

      public boolean isDirty()
      Description copied from class: PIACustomizablePanel
      Determines if any descendant is marked DIRTY in its current context.
      Specified by:
      isDirty in interface PComponentAttribute
      Overrides:
      isDirty in class PIACustomizablePanel
      Returns:
      True if any descendant is marked DIRTY; false otherwise.
    • resetToDefault

      public void resetToDefault()
      Description copied from class: PIACustomizablePanel
      A convenience method that resets every field on this panel.
      Specified by:
      resetToDefault in interface PComponentAttribute
      Overrides:
      resetToDefault in class PIACustomizablePanel