Interface CustomerCenterContext

All Superinterfaces:
PAppContext
All Known Implementing Classes:
PCustomerCenterInternals

public interface CustomerCenterContext extends PAppContext
Customer Center specific implementation of the generic app context. This provides the "global" access to the framework for the various pages that comprise Customer Center. Pages access this via a call to PClientContext.getContext() and casting the result to this interface.

This interface gives you access to monitor accounts being opened/closed, the various manager classes (save, print, brand, currency), and a hook to the currently active account view (PAccountViewContext).
Version:
%version: 14 % %date_modified: Wed Oct 17 14:45:48 2001 %
Author:
kapono
  • Field Details

    • CURRENT_ACCOUNT

      static final String CURRENT_ACCOUNT
      The property issued when the current account changes
      See Also:
    • CLOSE_ACCOUNT

      static final String CLOSE_ACCOUNT
      The property issued when an account is closed
      See Also:
    • CURRENT_BRAND

      static final String CURRENT_BRAND
      The property issued when the brand is changed
      See Also:
    • BILL_INFO_SELECTION

      static final String BILL_INFO_SELECTION
      The property issued when the BillInfo Selection Change Occurs
      See Also:
    • SERVICE_SELECTION

      static final String SERVICE_SELECTION
      The property issued when the Service Selection Change
      See Also:
  • Method Details

    • setCurrentAccount

      void setCurrentAccount(PModelHandle pm) throws PropertyVetoException
      Establishes the current account for the client.
      A vetoable property change event will be issued giving listeners the opportunity to disallow the change in current account. If there are no objections, the current account is changed and an update is sent via a property change event.
      Parameters:
      pm - The model handle for the new account
      Throws:
      PropertyVetoException
    • getCurrentAccountInfo

      PAccountInfo getCurrentAccountInfo()
      Retrieves the information class for the current account
      Returns:
      The current account's data wrapper
    • getLastActiveOpenAccount

      PAccountInfo getLastActiveOpenAccount()
      Used to track the last active open account. If you go to the home page (or something like it that may be added to the client) the current account will be set to null. However, it is often useful to know which account you were previously looking at.
      Note this will be set to null if all accounts are closed, and it will usually be the same as the current account (i.e. when you select an account this value does not track the previous one - its only really useful when current account is null).
      Returns:
      The last active open account, if any open accounts exist.
    • addCurrentAccountListener

      void addCurrentAccountListener(PropertyChangeListener p)
      Registers the given listener so that it receives a PropertyChangeEvent event when the current account changes.
      Parameters:
      p - The listener
    • removeCurrentAccountListener

      void removeCurrentAccountListener(PropertyChangeListener p)
      Removes the PropertyChangeListener for the CURRENT_ACCOUNT property
      Parameters:
      p - The listener
    • addCurrentAccountVetoableListener

      void addCurrentAccountVetoableListener(VetoableChangeListener v)
      Registers the given listener so that it receives a VetoableChangeEvent before the current account changes.
      Parameters:
      v - The VetoableChangeListener
    • removeCurrentAccountVetoableListener

      void removeCurrentAccountVetoableListener(VetoableChangeListener v)
      Removes the VetoableChangeListener for the CURRENT_ACCOUNT property
      Parameters:
      v - The VetoableChangeListener
    • closeAccount

      void closeAccount(PModelHandle pm) throws PropertyVetoException
      Used to close the account represented by the given PModelHandle. Closing an account essentially means removing it from display in the client. A vetoable property change event will be issued giving listeners the opportunity to disallow the close. If there are no objections, the current account is closed and an update is sent via a property change event.
      Parameters:
      pm - The account to close
      Throws:
      PropertyVetoException
    • addAccountClosedListener

      void addAccountClosedListener(PropertyChangeListener p)
      Registers the given listener so that it receives a PropertyChangeEvent event when an account closes.
      Parameters:
      p - The listener
    • removeAccountClosedListener

      void removeAccountClosedListener(PropertyChangeListener p)
      Removes the PropertyChangeListener for the CLOSE_ACCOUNT property
      Parameters:
      p - The listener
    • addAccountClosedVetoableListener

      void addAccountClosedVetoableListener(VetoableChangeListener v)
      Registers the given listener so that it receives a VetoableChangeEvent before an account closes.
      Parameters:
      v - The VetoableChangeListener
    • removeAccountClosedVetoableListener

      void removeAccountClosedVetoableListener(VetoableChangeListener v)
      Removes the VetoableChangeListener for the CLOSE_ACCOUNT property
      Parameters:
      v - The VetoableChangeListener
    • billInfoSelectionChanged

      void billInfoSelectionChanged(BillInfoChangeEvent bie)
      Used to notify Context regarding the BillInfo Selection Change occured in the BillGroup ComboBox with the PModelHandle of the newly selected BillInfo and previously Selected BillGroup. This will allow PropertyListeners for that change to act accordingly. client.
      Parameters:
      previousBillInfo - The BillInfo that was previously selected
      currentBillInfo - The BillInfo that is the new Selection
    • addBillInfoSelectionListener

      void addBillInfoSelectionListener(PropertyChangeListener p)
      Registers the given listener so that it receives a PropertyChangeEvent event when BillInfo Selection change Occured in BillGroup ComboBox.
      Parameters:
      p - The listener
    • removeBillInfoSelectionListener

      void removeBillInfoSelectionListener(PropertyChangeListener p)
      Removes the given listener for BILL_INFO_SELECTION property
      Parameters:
      p - The listener
    • serviceSelectionChanged

      void serviceSelectionChanged(PModelHandle pm) throws PropertyVetoException
      Used to notify Context regarding the Service Selection Change occured in the PServicePage with the PModelHandle of the newly selected Service. This will allow PropertyListeners for that change to act accordingly. client.
      Parameters:
      pm - The Service that currently selected
      Throws:
      PropertyVetoException
    • addServiceSelectionListener

      void addServiceSelectionListener(PropertyChangeListener p)
      Registers the given listener so that it receives a PropertyChangeEvent event when Service Selection change Occured in PServicePage.
      Parameters:
      p - The listener
    • removeServiceSelectionListener

      void removeServiceSelectionListener(PropertyChangeListener p)
      Removes the given listener for SERVICE_SELECTION property
      Parameters:
      p - The listener
    • getAccountViewContext

      PAccountViewContext getAccountViewContext()
      Retrieves the context associated with the current account. This context provides a mechanism for navigating in the account view component.
      Returns:
      the account context for the current account
    • getCurrencyManager

      PCurrencyManager getCurrencyManager()
      Returns:
      Retrieves the client's currency manager instance
    • getSaveManager

      PSaveManager getSaveManager()
      Returns:
      Retrieves the client's save manager instance
    • getBrandManager

      PBrandManager getBrandManager()
      Returns:
      Retrieves the client's brand manager instance
    • showDefault

      void showDefault()
      Mechanism to force the display of the main application interface. setOverlay() allows the main application interface to be taken over, so there needs to be a hook to get back to the original default.
    • setWizardContext

      void setWizardContext(PAppContext ctx)
      Used to establish the context for the current wizard.
      Parameters:
      ctx - The wizard context
    • getWizardContext

      PAppContext getWizardContext()
      We currently provide the ability to display one Customer Center wizard at a time. This method allows you to access that wizard.
      Returns:
      The wizard context if the wizard is active; null otherwise
    • getCSRNameModelHandle

      PModelHandle getCSRNameModelHandle()
      Return the CSR Account object model handle. This is mostly used in the Notes object to retrieve th CSR name while inserting text into notes. CSR name/model handle is to be retrieved from here since the CSR name/model handle cannot be accessed from sub-brands.
      Returns:
      ModelHandle containing the CSR name
    • getPrintManager

      PrintManager getPrintManager()
      Returns:
      Retrieves the client's print manager instance