Class PTelcoServicePanel

All Implemented Interfaces:
PSaveable, PAppComponent, PClientComponent, PCollectDataListener, PComponent, PComponentAttribute, PViewDataChangeListener, ContainerListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible
Direct Known Subclasses:
GSMServicePanel

public class PTelcoServicePanel extends PIAExtendedServicesBase
This is the default panel for /service/telco/xxx objects in the Customer Center. By default, a supplementary services panel, the devices panels, and an extra panel showing the service attributes will be displayed on this panel. The user can write his/her own device panels and the service attributes panel to plug in this panel. Please use the Customer Center Configurator to configure the display properties. The user can also subclass this class to create his/her own UI for the specific types of services.
Version:
%date_modified: Thr Feb 26 18:53:38 2003 %
Author:
tsuo
See Also:
  • Field Details

    • TELCO_SERVICES_STORABLE_CLASS_NAME_BASE

      public static final String TELCO_SERVICES_STORABLE_CLASS_NAME_BASE
      Base storable class name for Telco services.
      See Also:
    • TELCO_SERVICES_STORABLE_CLASS_NAME_PREFIX

      public static final String TELCO_SERVICES_STORABLE_CLASS_NAME_PREFIX
      Prefix of the storable class name for Telco services.
      See Also:
    • DEFAULT_DEVICE_PANEL_CLASS_NAME

      public static final String DEFAULT_DEVICE_PANEL_CLASS_NAME
      Default class name to display device panel.
      See Also:
    • DEFAULT_EXTENDED_SERVICE_ATTRIBUTES_CLASS_NAME

      public static final String DEFAULT_EXTENDED_SERVICE_ATTRIBUTES_CLASS_NAME
      Default class name to display extended service attributes panel.
      See Also:
    • TRUE

      protected static final String TRUE
      See Also:
    • PROPERTY_PREFIX

      protected static final String PROPERTY_PREFIX
      See Also:
    • PROPERTY_DEVICE_PREFIX

      protected static final String PROPERTY_DEVICE_PREFIX
      See Also:
    • PROPERTY_DEVICE_SUFFIX

      protected static final String PROPERTY_DEVICE_SUFFIX
      See Also:
    • PROPERTY_SUPPLEMENTARY_SUFFIX

      protected static final String PROPERTY_SUPPLEMENTARY_SUFFIX
      See Also:
    • PROPERTY_SUPPLEMENTARY_EXPAND_SUFFIX

      protected static final String PROPERTY_SUPPLEMENTARY_EXPAND_SUFFIX
      See Also:
    • PROPERTY_DEVICES_SUFFIX

      protected static final String PROPERTY_DEVICES_SUFFIX
      See Also:
    • PROPERTY_EXTENDED_SUFFIX

      protected static final String PROPERTY_EXTENDED_SUFFIX
      See Also:
    • DUMMY_IDPW

      protected static final String DUMMY_IDPW
      See Also:
    • PIN_DEVICE_FLAG_ASSOCIATE

      protected static final Integer PIN_DEVICE_FLAG_ASSOCIATE
    • PIN_DEVICE_FLAG_DISASSOCIATE

      protected static final Integer PIN_DEVICE_FLAG_DISASSOCIATE
    • DEVICE_ARRAY_MODEL_DESC_PREFIX

      protected static final String DEVICE_ARRAY_MODEL_DESC_PREFIX
      See Also:
    • DEVICE_ARRAY_MODEL_DESC_SUFFIX

      protected static final String DEVICE_ARRAY_MODEL_DESC_SUFFIX
      See Also:
    • DEVICE_OBJECT_MODEL_DESC

      protected static final String DEVICE_OBJECT_MODEL_DESC
      See Also:
    • DEVICE_FLAGS_MODEL_DESC

      protected static final String DEVICE_FLAGS_MODEL_DESC
      See Also:
    • mSupplmentaryServicesPanel

      protected com.portal.app.cc.tcf.SupplementaryServicesPanel mSupplmentaryServicesPanel
    • mShowSupplementary

      protected boolean mShowSupplementary
    • mExpandSupplementary

      protected boolean mExpandSupplementary
    • mShowDevNum

      protected boolean mShowDevNum
    • mShowExtended

      protected boolean mShowExtended
    • mServiceName

      protected String mServiceName
    • mServicePropertyKey

      protected String mServicePropertyKey
    • mProperties

      protected Properties mProperties
    • mBundle

      protected ResourceBundle mBundle
    • mExtServiceAttrClassName

      protected String mExtServiceAttrClassName
    • mExtServiceAttrPanel

      protected PIAExtendedServicesBase mExtServiceAttrPanel
    • mDeviceClasses

      protected HashMap mDeviceClasses
    • mDeviceNodes

      protected HashMap mDeviceNodes
    • mDeviceSequence

      protected ArrayList mDeviceSequence
    • mServiceTableBean

      protected PServiceTableBean mServiceTableBean
    • mIsDeviceError

      protected boolean mIsDeviceError
  • Constructor Details

    • PTelcoServicePanel

      public PTelcoServicePanel()
      Creates a new extended service panel for Telco services. Layout the panel with default components -- a supplementary services panel and a number device panel.
  • Method Details

    • setType

      public void setType(String serviceType)
      Set the type of service for this panel. This method also changes the layout of the panel based on the service type. Called by PExtendedServicePanel to set the service type for the panel. *
      Overrides:
      setType in class PIAExtendedServicesBase
      Parameters:
      serviceType - The type of this service. For example, "/service/telco/gsm/telephony". The service type needs to start with "/service/telco".
    • localCollectData

      public void localCollectData(PCollectDataEvent event)
      Collects service information changes, as well as updates to the device/service associations.
      Overrides:
      localCollectData in class PIAExtendedServicesBase
      Parameters:
      event - The collect data event
    • save

      public com.portal.app.util.CustomerValErrorData[] save()
      Description copied from class: PIAExtendedServicesBase
      Attempts to save any changes made to this page.
      Specified by:
      save in interface PSaveable
      Overrides:
      save in class PIAExtendedServicesBase
      Returns:
      An array of errors, or null if the save was successful
    • isDirty

      public boolean isDirty()
      Method to determine whether the service data and the device data has changed.
      Specified by:
      isDirty in interface PComponentAttribute
      Overrides:
      isDirty in class PIACustomizablePanel
      Returns:
      true if the data on this panel has changed. false if the data on this panel has not been changed.
    • isError

      public boolean isError()
      Method to determine if there is error in the data presented by this panel.
      Specified by:
      isError in interface PComponentAttribute
      Overrides:
      isError in class PIACustomizablePanel
      Returns:
      true if the data on this panel contains error. false if the data on this panel does not contain error.
    • isClean

      public boolean isClean()
      Method to determine if there are no changes or errors on this panel.
      Overrides:
      isClean in class PIACustomizablePanel
      Returns:
      true if the data on this panel does not contain error and has not been changed. false if the data on this panel has been changed or contains error.
    • setClean

      public void setClean()
      Method to set data on the panel to a "clean" state.
      Specified by:
      setClean in interface PComponentAttribute
      Overrides:
      setClean in class PIACustomizablePanel
    • setError

      public void setError(boolean isError)
      Method to set data on the panel to an "error" state.
      Specified by:
      setError in interface PComponentAttribute
      Overrides:
      setError in class PIACustomizablePanel
      Parameters:
      isError - if true, puts the component in ERROR state
    • setDefault

      public void setDefault()
      Establishes the current data on this panel as the default data for the panel.
      Specified by:
      setDefault in interface PComponentAttribute
      Overrides:
      setDefault in class PIACustomizablePanel
    • resetToDefault

      public void resetToDefault()
      Reset the panel to display the default data.
      Specified by:
      resetToDefault in interface PComponentAttribute
      Overrides:
      resetToDefault in class PIACustomizablePanel
    • supportsLoginAndPassword

      public boolean supportsLoginAndPassword()
      Description copied from class: PIAExtendedServicesBase
      Panels from 6.1 did not include entry fields for login/password. For those panels we will provide a wrapper that will allow the user to enter that data.
      Subclasses should override this to return true if they provide this themselves.
      Overrides:
      supportsLoginAndPassword in class PIAExtendedServicesBase
      Returns:
      true since this panel supports login and password
    • getIDValue

      public String getIDValue()
      Method to retrieve the service id from this panel. Assumes that ID is set in the extended service attributes panel. If the extended service attributes panel does not provide the service ID, then assumes that ID is not required for this telco service.
      Overrides:
      getIDValue in class PIAExtendedServicesBase
      Returns:
      The service ID.
    • setModelHandle

      public void setModelHandle(PModelHandle serviceModel) throws RemoteException
      Method to set the modlehandle for this panel. Will refresh the screen with the data in the modelhandle.
      Specified by:
      setModelHandle in interface PComponent
      Overrides:
      setModelHandle in class PIACustomizablePanel
      Parameters:
      serviceModel - The service modelhandle object this panel will display.
      Throws:
      RemoteException
    • init

      protected void init()
      Protected method to lay out the UI according to the service type. This method is called internally by method setType(java.lang.String), to retrieve display attributes and calls method jbInit() to lay out the panel. Overwrite to implement your own initialization logic.
    • jbInit

      protected void jbInit()
      Protected method to lay out the screen. Called internally by method init() to create the UI components and lay out the screen. The defaul implementation will create a supplementary services panel if the supplementary services are specified to be visible, then the device panels according to the order specified in the properties file, and finally, a panel to display extended services attributes, if specified in the property file. Overwrite to create your custom layout for the specify service.
    • isSupplementaryVisible

      protected boolean isSupplementaryVisible()
      Method to specify whether the supplementary service panel is visible or not. Used by the subclass only.
      Returns:
      true if you want to show the supplementary service panel. false if you want to hide the supplementary service panel.
    • isSupplementaryExpanded

      protected boolean isSupplementaryExpanded()
      Method to specify whether the supplementary service panel is expanded or not. Used by the subclass only.
      Returns:
      true if you want to expand the supplementary service panel as the default view. false if you want to collapse the supplementary service panel as the default view.
    • isExtendedVisible

      protected boolean isExtendedVisible()
      Method to specify whether the extended service attributes panel is visible or not. Used by the subclass only.
      Returns:
      true if you want to show the extended service attributes panel. false if you want to hide the extended service attributes panel.
    • getServiceName

      protected String getServiceName()
      Method to return the name of this telco service.
      Returns:
      The default implementation returns the part of the of the service name after "/service/telco/". For instance, for "/service/telco/gsm/telepony", return "/gsm/telephony".
    • getDeviceSequence

      protected List getDeviceSequence()
      Method to retrieve the order of devices this service panel will display. The default implementation reads the property file to get the device display order and returns it. Overwrite to return the list of devices your custom service panel will display.
      Returns:
      A ordered list of devices this service panel will display.
    • getDeviceClassMap

      protected Map getDeviceClassMap()
      Method to retrieve the class names for device panels. The default implementation reads the property file to get the class name for each corresponding device type, and returns a hashmap consisted of {devicetype, classname} pairs. This map is then used in the construction of the service panel UI. Overwrite this method to return a map that associates your own device panel class names with your device types.
      Returns:
      A map that contains the {deviceType, className} as the {key, value} pair.
    • getServiceAttrClassName

      protected String getServiceAttrClassName()
      Method to retrieve the class name to display the extended service attributes. The default implementation reads the class name from the property file and returns it. Overwrite this method to return your own class name for handling the extended service attributes display.
      Returns:
      The class name for handling the extended service attributes display.
    • getServicePropertyKey

      protected String getServicePropertyKey()
      Method to return the property suffix for this telco service. Can be overwritten by the subclass.
      Returns:
      The default implementation returns the part of the of the service name after "/service/telco/". For instance, for "/service/telco/gsm/telepony", return "gsm.telephony".
    • loadDisplayAttributes

      protected void loadDisplayAttributes()
      Load display attributes from property files. The display attributes include whether to show the supplementarty service panel or not, whether to show the extended service attributes or not, and the ordered list of devices to show.
    • initUIComponents

      protected void initUIComponents()
    • getDevices

      public PIAExtendedDevicesBase[] getDevices()