Package com.portal.app.cc.tcf
Class PTelcoDevicesBase
- All Implemented Interfaces:
PSaveable
,PAppComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewDataChangeListener
,ContainerListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
- Direct Known Subclasses:
NUMPanel
,PDefaultDevicePanel
,PTelcoNumberPanel
,SIMPanel
The base panel for extended Telco device information panels. Contains the
knowledge for saving the information in these panels for account creation
and maintenance.
Any extended Telco device panel you wish to add should subclass this panel.
Any extended Telco device panel you wish to add should subclass this panel.
- Version:
- %date_modified: Thr Feb 26 18:53:38 2003 %
- Author:
- tsuo
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected class
Inner Action class that provides the device history function.protected class
Inner Action class that provides the device prepopulation function.protected class
Inner Action class that provides the device search function.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 TypeFieldDescriptionprotected ResourceBundle
protected PTelcoDevicesBase.HistoryAction
Action to display the history of devices.protected PTelcoDevicesBase.PrepopulateAction
Action to prepopulate the panel with the next available device from the database.protected PTelcoDevicesBase.SearchAction
Action to search for Telco devices.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 device details panel with the default device type, "/device".PTelcoDevicesBase
(String deviceType, String resourceBundleName) Creates a new device details panel with the device type, device name, and the resource buncle name. -
Method Summary
Modifier and TypeMethodDescriptionfinal void
addAvailStateValue
(int value) Call this function to add a value that holds a device state which means the device is available for assigningFormats the telephone number.Retrieves the model handle currently being displayed by this panel.Retrieves the default model handle of this panel.protected String
Retrieves the class that handles the display of the device history.protected String
This method returns the header for the history page.protected String
This method returns the tag for the history page.protected String
This method returns the device ID column header for the history page.protected String
Get the device name.protected String
Get the name of the config object that stores the device state.protected PModelHandle[]
Searches for all existing devices of the same type this panel handles, and returns them.protected PModelHandle
Searches the next available device in the database and returns it.getType()
Retrieves the device type of the page.protected boolean
boolean
Is the device replacedboolean
Method to determine whether this device panel is displayed as a standalone panel or not.protected PModelHandle
Finds a device based on the prepopulate type (should be done by controller class), set modelhandle for this page, and return it.final void
removeAvailStateValue
(int value) Call this function to remove a value that holds a device state which makes the device available for assignment.void
Convenience method to revert the current modelhanle to the default one.com.portal.app.util.CustomerValErrorData[]
save()
Attempts to save changes to this page.protected PModelHandle
Display a search dialog and selects a device Override this method to implement your own device search logic.void
Specifies that the current modelhandle is the default one.void
setIsReplaced
(boolean isReplace) void
setModelHandle
(PModelHandle newDevice) Set the model handle of this panel to be the specified object.void
setParentService
(PModelHandle service) Set the Parent modelhandle of the device.void
setService
(PModelHandle service) Set the owner service for this panel as the specifed service.void
setStandalone
(boolean b) Specify whether this device panel is displayed as a standalone panel or as part of the service panel.void
Set the device type of the page.protected void
Display the device history page.boolean
Devices does not need Login/Password panel.Methods inherited from class com.portal.app.cc.comp.PIAExtendedServicesBase
collectData, doGraft, getControllerClassName, getIDValue, getIndex, getServiceID, hasValidData, isAccountCreation, localCollectData, setIndex, setServiceID
Methods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setError, 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_DEVICES_STORABLE_CLASS_NAME_BASE
- See Also:
-
mBundle
-
mSearchAction
Action to search for Telco devices. Subclasses should use this action to perform the search. -
mHistoryAction
Action to display the history of devices. Subclasses should use this action to display the history panel. -
mPrepopulateAction
Action to prepopulate the panel with the next available device from the database. Subclasses should use this action to perform the prepopulation of the device panel.
-
-
Constructor Details
-
PTelcoDevicesBase
public PTelcoDevicesBase()Creates a new device details panel with the default device type, "/device".- Throws:
ClassNotFoundException
- Exception thrown when the controller class can not be loaded.
-
PTelcoDevicesBase
Creates a new device details panel with the device type, device name, and the resource buncle name. Usually called by the subclass constructor to do the initialization.- Parameters:
deviceType
- The storable class type of the device this panel will display.resourceBundleName
- The name of the resource bundle. Used by the subclass to read localized resource strings.
-
-
Method Details
-
setType
Set the device type of the page.- Overrides:
setType
in classPIAExtendedServicesBase
- Parameters:
deviceType
- The storable class name of the device.- Throws:
IllegalArgumentException
- Thrown when the device type does not start with "/device".
-
getType
Retrieves the device type of the page. -
setService
Set the owner service for this panel as the specifed service. The device could be owned by several services, but when the device panel is shown as part of the the service panel, this method is called to specify which service object is the owner. Calling this method with a non-null service object also enablees the device panel to display the history of the devices for the owner object. Override this method to implement specific handling after the owner service is set. An example would be to hide/show the history link based on whether the owner service object is set or not.- Parameters:
service
- The service object which owns this device.
-
setParentService
Set the Parent modelhandle of the device.- Parameters:
PModelHandle
-
-
setStandalone
public void setStandalone(boolean b) Specify whether this device panel is displayed as a standalone panel or as part of the service panel.- Parameters:
b
-true
The device panel is a standalone panel.false
The device panel is part of a service panel.
-
isStandalone
public boolean isStandalone()Method to determine whether this device panel is displayed as a standalone panel or not.- Returns:
true
The device panel is a standalone panel.false
The device panel is part of a service panel.
-
setModelHandle
Set the model handle of this panel to be the specified object.- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIACustomizablePanel
- Parameters:
newDevice
- The model handle this panel is going to display.- Throws:
RemoteException
-
setDefault
public void setDefault()Specifies that the current modelhandle is the default one.- Specified by:
setDefault
in interfacePComponentAttribute
- Overrides:
setDefault
in classPIACustomizablePanel
-
resetToDefault
public void resetToDefault()Convenience method to revert the current modelhanle to the default one.- Specified by:
resetToDefault
in interfacePComponentAttribute
- Overrides:
resetToDefault
in classPIACustomizablePanel
-
isReplaced
public boolean isReplaced()Is the device replaced -
getCurDevice
Retrieves the model handle currently being displayed by this panel.- Returns:
- The model handle currently being displayed.
-
getDefaultDevice
Retrieves the default model handle of this panel.- Returns:
- The default model handle this panel is supposed to display.
-
formatID
Formats the telephone number. If there is an error during the formating, the original string is returned.- Parameters:
input
- the number as a string to be formated- Returns:
- the formated number as a string.
-
supportsLoginAndPassword
public boolean supportsLoginAndPassword()Devices does not need Login/Password panel.- Overrides:
supportsLoginAndPassword
in classPIAExtendedDevicesBase
- Returns:
- false by default for compatibility with 6.1
-
addAvailStateValue
public final void addAvailStateValue(int value) Call this function to add a value that holds a device state which means the device is available for assigning- Parameters:
value
- The numeric value of a device state that makes the device available for assingment.
-
removeAvailStateValue
public final void removeAvailStateValue(int value) Call this function to remove a value that holds a device state which makes the device available for assignment.- Parameters:
value
- The numeric value to be removed from the set of available device states.
-
save
public com.portal.app.util.CustomerValErrorData[] save()Attempts to save changes to this page. When this panel is part of the service page, only the device attribute changes are saved, and the device replacement is handled by the service panel in which this device panel resides. When this panel is standalone, both the device attribute changes and the device replacement will be saved in this function.- Specified by:
save
in interfacePSaveable
- Overrides:
save
in classPIAExtendedServicesBase
- Returns:
- An array of errors, or null if the save was successful
-
isPrepopulateEnabled
protected boolean isPrepopulateEnabled() -
getDeviceIDColumnHeader
This method returns the device ID column header for the history page. The default implementation reads the resource file, and returns the value specified by key "device.history.results.table.column.id". Overwrite this method to return the string you want to display as the column header for the device ID column on the history page. -
getDeviceHistoryTrailtag
This method returns the tag for the history page. The default implementation returns string "Device History". Overwrite this method to return the string you want to display as the tag for the history page. -
getDeviceHistoryHeader
This method returns the header for the history page. The default implementation returns a string consists of the service type and the service ID. Overwrite this method to return the string you want to display as the header of the history page. -
prepopulate
Finds a device based on the prepopulate type (should be done by controller class), set modelhandle for this page, and return it. Override this method to implement your own device prepopulation logic. -
searchForDevice
Display a search dialog and selects a device Override this method to implement your own device search logic. -
getFirstAvailableDevice
Searches the next available device in the database and returns it. This function is used in the prepopulate() function. Override to implement your own logic on how to get the available device from the database. -
getExistingDevices
Searches for all existing devices of the same type this panel handles, and returns them.- Returns:
- An array of devices of the same type this panel handles.
-
getDeviceHistoryClassName
Retrieves the class that handles the display of the device history. Default implementation returns PTelcoDeviceHistoryBase. This method is called byshowDeviceHistory()
to get the name of the device history page class. Override to return the class name of your own device history page.- Returns:
PTelcoDeviceHistoryBase
-
showDeviceHistory
protected void showDeviceHistory()Display the device history page. In the default implmentation, the device history page is only available when the device panel belongs to a service panel. Override to implement how you want to show your device history. -
getDeviceName
Get the device name. Default implementation returns the name of the device storable class after "/device/". Device name should be unique. Override this method to return the name that you would like to use to identify the device with. -
getDeviceStateConfig
Get the name of the config object that stores the device state. -
setIsReplaced
public void setIsReplaced(boolean isReplace)
-