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.AccessibleJPanelNested classes/interfaces inherited from class javax.swing.JComponent
JComponent.AccessibleJComponentNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault class name to display device panel.static final StringDefault class name to display extended service attributes panel.protected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected ResourceBundleprotected HashMapprotected HashMapprotected ArrayListprotected booleanprotected Stringprotected PIAExtendedServicesBaseprotected booleanprotected Propertiesprotected Stringprotected Stringprotected PServiceTableBeanprotected booleanprotected booleanprotected booleanprotected com.portal.app.cc.tcf.SupplementaryServicesPanelprotected static final Integerprotected static final Integerprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringstatic final StringBase storable class name for Telco services.static final StringPrefix of the storable class name for Telco services.protected static final StringFields inherited from class com.portal.app.cc.comp.PIAExtendedServicesBase
INDEX, mServiceTypeFields inherited from class com.portal.bas.comp.PIACustomizablePanel
isTracking, mIAList, mImpl, unregListFields inherited from class com.portal.pfc.ui.ImagePanel
IMAGE_CENTERED, IMAGE_SCALE_TO_HEIGHT, IMAGE_SCALE_TO_WIDTH, IMAGE_SCALED, IMAGE_TILED, mImageIcon, mScaledImageFields inherited from class javax.swing.JComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWFields inherited from class java.awt.Component
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields 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 MapMethod to retrieve the class names for device panels.protected ListMethod to retrieve the order of devices this service panel will display.Method to retrieve the service id from this panel.protected StringMethod to retrieve the class name to display the extended service attributes.protected StringMethod to return the name of this telco service.protected StringMethod to return the property suffix for this telco service.protected voidinit()Protected method to lay out the UI according to the service type.protected voidbooleanisClean()Method to determine if there are no changes or errors on this panel.booleanisDirty()Method to determine whether the service data and the device data has changed.booleanisError()Method to determine if there is error in the data presented by this panel.protected booleanMethod to specify whether the extended service attributes panel is visible or not.protected booleanMethod to specify whether the supplementary service panel is expanded or not.protected booleanMethod to specify whether the supplementary service panel is visible or not.protected voidjbInit()Protected method to lay out the screen.protected voidLoad display attributes from property files.voidCollects service information changes, as well as updates to the device/service associations.voidReset the panel to display the default data.com.portal.app.util.CustomerValErrorData[]save()Attempts to save any changes made to this page.voidsetClean()Method to set data on the panel to a "clean" state.voidEstablishes the current data on this panel as the default data for the panel.voidsetError(boolean isError) Method to set data on the panel to an "error" state.voidsetModelHandle(PModelHandle serviceModel) Method to set the modlehandle for this panel.voidSet the type of service for this panel.booleanPanels 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, setServiceIDMethods 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, viewDataChangeMethods inherited from class com.portal.pfc.ui.ImagePanel
getBackgroundImageIcon, getBackgroundImageMode, imageUpdate, paintComponent, setBackgroundImageIconMethods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIMethods 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, updateMethods 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, validateTreeMethods 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 byPExtendedServicePanelto set the service type for the panel. *- Overrides:
setTypein 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:
localCollectDatain classPIAExtendedServicesBase- Parameters:
event- The collect data event
-
save
public com.portal.app.util.CustomerValErrorData[] save()Description copied from class:PIAExtendedServicesBaseAttempts to save any changes made to this page.- Specified by:
savein interfacePSaveable- Overrides:
savein 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:
isDirtyin interfacePComponentAttribute- Overrides:
isDirtyin classPIACustomizablePanel- Returns:
trueif the data on this panel has changed.falseif 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:
isErrorin interfacePComponentAttribute- Overrides:
isErrorin classPIACustomizablePanel- Returns:
trueif the data on this panel contains error.falseif 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:
isCleanin classPIACustomizablePanel- Returns:
trueif the data on this panel does not contain error and has not been changed.falseif 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:
setCleanin interfacePComponentAttribute- Overrides:
setCleanin classPIACustomizablePanel
-
setError
public void setError(boolean isError) Method to set data on the panel to an "error" state.- Specified by:
setErrorin interfacePComponentAttribute- Overrides:
setErrorin 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:
setDefaultin interfacePComponentAttribute- Overrides:
setDefaultin classPIACustomizablePanel
-
resetToDefault
public void resetToDefault()Reset the panel to display the default data.- Specified by:
resetToDefaultin interfacePComponentAttribute- Overrides:
resetToDefaultin classPIACustomizablePanel
-
supportsLoginAndPassword
public boolean supportsLoginAndPassword()Description copied from class:PIAExtendedServicesBasePanels 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:
supportsLoginAndPasswordin classPIAExtendedServicesBase- Returns:
truesince 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:
getIDValuein 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:
setModelHandlein interfacePComponent- Overrides:
setModelHandlein 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:
trueif you want to show the supplementary service panel.falseif 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:
trueif you want to expand the supplementary service panel as the default view.falseif 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:
trueif you want to show the extended service attributes panel.falseif 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
-