Package com.portal.app.cc
Class PChangeStatusPage
- All Implemented Interfaces:
PAccountViewPage
,PCCPage
,DeferralChangeListener
,HoldingsChangeListener
,ServiceChangeListener
,StatusChangeListener
,PAppComponent
,PClientComponent
,PCollectDataListener
,PComponent
,PComponentAttribute
,PViewDataChangeListener
,ActionListener
,ContainerListener
,ItemListener
,ImageObserver
,MenuContainer
,Serializable
,EventListener
,Accessible
public class PChangeStatusPage
extends PMaintenancePage
implements ActionListener, ItemListener, DeferralChangeListener, StatusChangeListener, HoldingsChangeListener, ServiceChangeListener
Allows modification of the customer's account/services status.
Modification is done through the PChangeStatusPage.
This page supports the addition of a custom panel on the right. Something along the lines of:
This page supports the addition of a custom panel on the right. Something along the lines of:
public class ModStatus extends PChangeStatusPage { public ModStatus() { PIACustomizablePanel p = new PIACustomizablePanel(); GridBagConstraints gbc = new GridBagConstraints( 0, 0, 1, 1, 0.0, 0.0 ,GridBagConstraints.WEST, GridBagConstraints.NONE, new Insets(0, 0, 0, 0), 0, 0); p.setLayout(new GridBagLayout()); p.add(new JButton("AAA"), gbc); gbc.gridy++; p.add(new JButton("BBB"), gbc); gbc.gridy++; p.add(new JButton("CCC"), gbc); gbc.gridy++; p.add(new JButton("DDD"), gbc); p.add(new JLabel(), new GridBagConstraints( 1, 0, 2, 4, 1.0, 1.0 ,GridBagConstraints.WEST, GridBagConstraints.BOTH, new Insets(0, 0, 0, 0), 0, 0)); setCustomData(p); }
- See Also:
-
Nested Class Summary
Nested ClassesNested 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 JButton
protected static final String
protected static final String
static final int
protected ServiceSearchDialog
protected JLabel
protected static boolean
protected PIADateField
protected PModelHandle
protected JRadioButton
protected static final int
protected PModelHandle
Fields inherited from class com.portal.app.cc.comp.PMaintenancePage
mNeedsRefresh, mPagesCurrentCurrency
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
Overridden to create a renderer for mofService comboboxprotected int
confirmationMsg
(String msg, String title, int messageType, int def) protected int
confirmWarningMsg
(String msg, String title) Display a confirmation dialog containing the specified message, title and 2 choices for the user (YES or NO).void
Called when some other page performs some kind of deferralvoid
This method will be called when the control enters the change status page.protected Object
Retrieves the class name of this component's controller, in this case, null.protected int
Retrieves the current state of the status dropdown as an Enumerated value.getLabel()
Returns the label that should appear in the breadcrumb trailprotected PModelHandle
Returns the actual Portal storable class instance currently selected in the UI.void
Event listener for table HoldingsChangeEvent.protected boolean
Checks if the back date is in the valid format and not null This method does not check if the back date is in past/future/current.protected boolean
Checks if the Deferred date is in the future; status change is not allowed if the date is in the past.void
enable/disable date fields depending on radiobutton selectionprotected void
Called when the apply button is selected - this method will invoke the save() method.protected void
Called when the reset button is selectedprotected void
Invoked when the widget that manipulates the status is changed by the userprotected void
Affords subclasses the opportunity to inspect the data that is about to be committed to Portal.void
refresh()
This method will be called when "refresh" button is pressed.void
This method refreshes the mhServicesList handle from the selected services.void
void
Removes any changes made to the account and reverts back to the last read/saved values.void
save()
There are 3 type of different control flows of changing status 1.void
Service change listener.protected void
Allows a subclass to embed additional fields in the upper right region of this page.protected void
setModelFieldDescription
(String changeType) void
setModelHandle
(PModelHandle data) Establishes thePModelHandle
for this component and all its descendants.void
Sets the selected service in theComboBox
by specifying the PModelHandle in the list.protected void
This method sets the data on this page for the service is SLM enabled.void
Called when some other page changes the status of an account/servicevoid
Used to disconnect the controller from the component for all child widgets contained within this panel.Methods inherited from class com.portal.app.cc.comp.PMaintenancePage
dataNeedsRefresh, getDisplayedCurrency, hasUnsavedChanges, isValidContext, primaryToSecondary, recycle, resetUnsavedChanges, revertToPrimary
Methods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, collectData, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setRequired, setResourceName, togglePrimaryToSecondary, 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, 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, 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
-
STATUS_NO_CHANGE
protected static final int STATUS_NO_CHANGE- See Also:
-
CHANGE_ACCOUNT
- See Also:
-
CHANGE_SERVICE
- See Also:
-
load_chng_statuspg_in_prgrs
protected static boolean load_chng_statuspg_in_prgrs -
DEFAULT_MOFSERVICE_INDEX
public static final int DEFAULT_MOFSERVICE_INDEX- See Also:
-
mhServicesList
-
tempServicesMH
-
mdBackdate
-
mrbBackdate
-
btnServiceSearch
-
lblExceedsMsg
-
dlgServiceSearch
-
-
Constructor Details
-
PChangeStatusPage
public PChangeStatusPage()Creates a panel that displays account status
-
-
Method Details
-
enteringPage
public void enteringPage()This method will be called when the control enters the change status page.- Specified by:
enteringPage
in interfacePCCPage
- Overrides:
enteringPage
in classPMaintenancePage
-
refresh
public void refresh()This method will be called when "refresh" button is pressed.- Specified by:
refresh
in interfacePAccountViewPage
- Overrides:
refresh
in classPMaintenancePage
-
addNotify
public void addNotify()Overridden to create a renderer for mofService combobox- Overrides:
addNotify
in classJComponent
-
removeNotify
public void removeNotify()- Overrides:
removeNotify
in classJComponent
-
setModelHandle
Description copied from class:PIACustomizablePanel
Establishes thePModelHandle
for this component and all its descendants.- Specified by:
setModelHandle
in interfacePComponent
- Overrides:
setModelHandle
in classPIACustomizablePanel
- Parameters:
data
- the newPModelHandle
from which to extract information- Throws:
RemoteException
- thrown for errors
-
refreshmhServicesList
public void refreshmhServicesList()This method refreshes the mhServicesList handle from the selected services. -
setSelectedModel
Sets the selected service in theComboBox
by specifying the PModelHandle in the list. Ifmh
is in the list, the list displays withmh
selected.- Parameters:
mh
- the list PModelHandle to select
-
getLabel
Returns the label that should appear in the breadcrumb trail- Specified by:
getLabel
in interfacePCCPage
- Overrides:
getLabel
in classPMaintenancePage
- Returns:
- The tag that will be displayed in the breadcrumb trail to reference this component.
-
save
There are 3 type of different control flows of changing status 1. Change service status call setModelfieldDescription to format the input flist see setModelfieldDescription for detail format call collectdata to construct the input flist call controller PortalOp.CUST_UPDATE_SERVICES 2. Change sponsor account to close a model dialog box will be provided for users option call setModelfieldDescription to format the input flist call collectdata to construct the input flist call setOptionFlags(modl, dlg); to set extra option fields call controller PortalOp.CUST_SET_STATUS 3. Change regular account to inactive or close various warning dialog boxes will be pop up to inform the user about the consequence call setModelfieldDescription to format the input flist call collectdata to construct the input flist call controller PortalOp.CUST_SET_STATUS- Specified by:
save
in interfacePAccountViewPage
- Overrides:
save
in classPMaintenancePage
- Throws:
PSaveException
-
actionPerformed
- Specified by:
actionPerformed
in interfaceActionListener
-
setServiceLifeCycleData
This method sets the data on this page for the service is SLM enabled. if service of the same type then get_cust_life_cycle_states opcode wont be called for each service. instead a same life cycle obj will be re-used for all same service types.- Parameters:
serv
-
-
statusChange
Called when some other page changes the status of an account/service- Specified by:
statusChange
in interfaceStatusChangeListener
- Parameters:
e
- a StatusChangeEvent encapsulating the event information
-
deferralChange
Called when some other page performs some kind of deferral- Specified by:
deferralChange
in interfaceDeferralChangeListener
- Parameters:
e
- a DeferralChangeEvent encapsulating the event information
-
holdingsChange
Event listener for table HoldingsChangeEvent. Called when an event is sent out that indicates a purchase of a deal/service has been made.- Specified by:
holdingsChange
in interfaceHoldingsChangeListener
- Parameters:
e
- a HoldingsChangeEvent encapsulating the event information
-
unregister
Description copied from class:PIACustomizablePanel
Used to disconnect the controller from the component for all child widgets contained within this panel.- Specified by:
unregister
in interfacePClientComponent
- Overrides:
unregister
in classPIACustomizablePanel
- Throws:
RemoteException
-
getControllerClassName
Description copied from class:PIACustomizablePanel
Retrieves the class name of this component's controller, in this case, null.- Specified by:
getControllerClassName
in interfacePComponent
- Overrides:
getControllerClassName
in classPIACustomizablePanel
- Returns:
- A null
String
. - Throws:
RemoteException
- thrown for errors
-
resetToDefault
public void resetToDefault()Removes any changes made to the account and reverts back to the last read/saved values.- Specified by:
resetToDefault
in interfacePComponentAttribute
- Overrides:
resetToDefault
in classPIACustomizablePanel
-
setModelFieldDescription
-
confirmWarningMsg
Display a confirmation dialog containing the specified message, title and 2 choices for the user (YES or NO).- Parameters:
msg
- The confirmation message to displaytitle
- The title of the confirmation dialogmessageType
- an integer designating the kind of message this is, primarily used to determine the icon from the pluggable Look and Feel: ERROR_MESSAGE, INFORMATION_MESSAGE, WARNING_MESSAGE, QUESTION_MESSAGE, or PLAIN_MESSAGEint
- The default button. Use JOptionPane.YES_OPTION or JOptionPane.NO_OPTION- Returns:
- One of JOptionPane.YES_OPTION, JOptionPane.NO_OPTION, or JOptionPane.CLOSED_OPTION if the user cancel's the dialog
-
confirmationMsg
-
formatWarningMessage
-
setCustomData
Allows a subclass to embed additional fields in the upper right region of this page.
It is highly advised that you understand how account and service status changes work in Portal before you add additional criteria to this page. Because of the sensitive nature of these chanes you may cause major problems if you change the behavior of this panel.- Parameters:
p
- The custom panel to display
-
preCommit
Affords subclasses the opportunity to inspect the data that is about to be committed to Portal.Because this particular pages deals with both services and accounts there is some slight data modification that occurs further upstream. If the FldPoid is the account then this data is fine. If it is a service object however it must be changed to FldServiceObj in the input FList and the account POID must be added in as the FldPoid argument. This processing occurs in the controller. If you wish to halt the save process for any reason throw a PSaveException. It is the subclass' responsibility to display an error dialog in this case.
- Throws:
PSaveException
-
getSelectedService
Returns the actual Portal storable class instance currently selected in the UI.- Returns:
- A PModelHandle representation of the currently selected service or account.
-
mbReset_actionPerformed
Called when the reset button is selected -
mbApply_actionPerformed
Called when the apply button is selected - this method will invoke the save() method. -
getCurrentlySetStatusFromPanel
protected int getCurrentlySetStatusFromPanel()Retrieves the current state of the status dropdown as an Enumerated value.- Returns:
- The Portal status as currently selected by the user
-
meChangeStatusTo_actionPerformed
Invoked when the widget that manipulates the status is changed by the user -
isDeferredDateValid
protected boolean isDeferredDateValid()Checks if the Deferred date is in the future; status change is not allowed if the date is in the past. Subclasses can override this method if they want to allow the status change to be backdated- Returns:
- true if the deferred date is in the future; false otherwise
-
isBackdDateValid
protected boolean isBackdDateValid()Checks if the back date is in the valid format and not null This method does not check if the back date is in past/future/current. Subclasses can override this method if they want to have additional validations- Returns:
- true if back date is in valid format, false otherwise
-
itemStateChanged
enable/disable date fields depending on radiobutton selection- Specified by:
itemStateChanged
in interfaceItemListener
-
serviceChange
Service change listener.- Specified by:
serviceChange
in interfaceServiceChangeListener
- Parameters:
e
- a ServiceChangeEvent encapsulating the event information
-