Package com.portal.app.cc.tcf
Class PTelcoServicePanel
- All Implemented Interfaces:
PSaveable
,PAppComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewDataChangeListener
,ContainerListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
GSMServicePanel
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:
-
Nested Class Summary
Nested classes/interfaces inherited from class javax.swing.JPanel
JPanel.AccessibleJPanel
Nested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponent
Nested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainer
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Default class name to display device panel.static final String
Default class name to display extended service attributes panel.protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected ResourceBundle
protected HashMap
protected HashMap
protected ArrayList
protected boolean
protected String
protected PIAExtendedServicesBase
protected boolean
protected Properties
protected String
protected String
protected PServiceTableBean
protected boolean
protected boolean
protected boolean
protected com.portal.app.cc.tcf.SupplementaryServicesPanel
protected static final Integer
protected static final Integer
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
protected static final String
static final String
Base storable class name for Telco services.static final String
Prefix of the storable class name for Telco services.protected static final String
Fields inherited from class com.portal.app.cc.comp.PIAExtendedServicesBase
INDEX, mServiceType
Fields inherited from class com.portal.bas.comp.PIACustomizablePanel
isTracking, mIAList, mImpl, unregList
Fields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImage
Fields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Fields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
-
Constructor Summary
ConstructorsConstructorDescriptionCreates a new extended service panel for Telco services. -
Method Summary
Modifier and TypeMethodDescriptionprotected Map
Method to retrieve the class names for device panels.protected List
Method to retrieve the order of devices this service panel will display.Method to retrieve the service id from this panel.protected String
Method to retrieve the class name to display the extended service attributes.protected String
Method to return the name of this telco service.protected String
Method to return the property suffix for this telco service.protected void
init()
Protected method to lay out the UI according to the service type.protected void
boolean
isClean()
Method to determine if there are no changes or errors on this panel.boolean
isDirty()
Method to determine whether the service data and the device data has changed.boolean
isError()
Method to determine if there is error in the data presented by this panel.protected boolean
Method to specify whether the extended service attributes panel is visible or not.protected boolean
Method to specify whether the supplementary service panel is expanded or not.protected boolean
Method to specify whether the supplementary service panel is visible or not.protected void
jbInit()
Protected method to lay out the screen.protected void
Load display attributes from property files.void
Collects service information changes, as well as updates to the device/service associations.void
Reset the panel to display the default data.com.portal.app.util.CustomerValErrorData[]
save()
Attempts to save any changes made to this page.void
setClean()
Method to set data on the panel to a "clean" state.void
Establishes the current data on this panel as the default data for the panel.void
setError
(boolean isError) Method to set data on the panel to an "error" state.void
setModelHandle
(PModelHandle serviceModel) Method to set the modlehandle for this panel.void
Set the type of service for this panel.boolean
Panels from 6.1 did not include entry fields for login/password.Methods inherited from class com.portal.app.cc.comp.PIAExtendedServicesBase
collectData, doGraft, getControllerClassName, getIndex, getServiceID, hasValidData, isAccountCreation, setIndex, setServiceID
Methods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getModelHandle, getRemoteComponent, getResourceName, getTools, isCurrencyDisplay, isInputTracking, isLight, isRequired, processError, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setCurrencyDisplay, setInputTracking, setRequired, setResourceName, togglePrimaryToSecondary, unregister, viewDataChange
Methods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIcon
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setMixingCutoutShape, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
-
Field Details
-
TELCO_SERVICES_STORABLE_CLASS_NAME_BASE
Base storable class name for Telco services.- See Also:
-
TELCO_SERVICES_STORABLE_CLASS_NAME_PREFIX
Prefix of the storable class name for Telco services.- See Also:
-
DEFAULT_DEVICE_PANEL_CLASS_NAME
Default class name to display device panel.- See Also:
-
DEFAULT_EXTENDED_SERVICE_ATTRIBUTES_CLASS_NAME
Default class name to display extended service attributes panel.- See Also:
-
TRUE
- See Also:
-
PROPERTY_PREFIX
- See Also:
-
PROPERTY_DEVICE_PREFIX
- See Also:
-
PROPERTY_DEVICE_SUFFIX
- See Also:
-
PROPERTY_SUPPLEMENTARY_SUFFIX
- See Also:
-
PROPERTY_SUPPLEMENTARY_EXPAND_SUFFIX
- See Also:
-
PROPERTY_DEVICES_SUFFIX
- See Also:
-
PROPERTY_EXTENDED_SUFFIX
- See Also:
-
DUMMY_IDPW
- See Also:
-
PIN_DEVICE_FLAG_ASSOCIATE
-
PIN_DEVICE_FLAG_DISASSOCIATE
-
DEVICE_ARRAY_MODEL_DESC_PREFIX
- See Also:
-
DEVICE_ARRAY_MODEL_DESC_SUFFIX
- See Also:
-
DEVICE_OBJECT_MODEL_DESC
- See Also:
-
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
-
mServicePropertyKey
-
mProperties
-
mBundle
-
mExtServiceAttrClassName
-
mExtServiceAttrPanel
-
mDeviceClasses
-
mDeviceNodes
-
mDeviceSequence
-
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
Set the type of service for this panel. This method also changes the layout of the panel based on the service type. Called byPExtendedServicePanel
to set the service type for the panel. *- Overrides:
setType
in classPIAExtendedServicesBase
- Parameters:
serviceType
- The type of this service. For example, "/service/telco/gsm/telephony". The service type needs to start with "/service/telco".
-
localCollectData
Collects service information changes, as well as updates to the device/service associations.- Overrides:
localCollectData
in classPIAExtendedServicesBase
- 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 interfacePSaveable
- Overrides:
save
in classPIAExtendedServicesBase
- 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 interfacePComponentAttribute
- Overrides:
isDirty
in classPIACustomizablePanel
- 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 interfacePComponentAttribute
- Overrides:
isError
in classPIACustomizablePanel
- 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 classPIACustomizablePanel
- 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 interfacePComponentAttribute
- Overrides:
setClean
in classPIACustomizablePanel
-
setError
public void setError(boolean isError) Method to set data on the panel to an "error" state.- Specified by:
setError
in interfacePComponentAttribute
- Overrides:
setError
in classPIACustomizablePanel
- 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 interfacePComponentAttribute
- Overrides:
setDefault
in classPIACustomizablePanel
-
resetToDefault
public void resetToDefault()Reset the panel to display the default data.- Specified by:
resetToDefault
in interfacePComponentAttribute
- Overrides:
resetToDefault
in classPIACustomizablePanel
-
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 classPIAExtendedServicesBase
- Returns:
true
since this panel supports login and password
-
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 classPIAExtendedServicesBase
- Returns:
- The service ID.
-
setModelHandle
Method to set the modlehandle for this panel. Will refresh the screen with the data in the modelhandle.- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIACustomizablePanel
- 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 methodsetType(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 methodinit()
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
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
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
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
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
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
-