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.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 TypeFieldDescriptionprotected JButtonprotected static final Stringprotected static final Stringstatic final intprotected ServiceSearchDialogprotected JLabelprotected static booleanprotected PIADateFieldprotected PModelHandleprotected JRadioButtonprotected static final intprotected PModelHandleFields inherited from class com.portal.app.cc.comp.PMaintenancePage
mNeedsRefresh, mPagesCurrentCurrencyFields 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidOverridden to create a renderer for mofService comboboxprotected intconfirmationMsg(String msg, String title, int messageType, int def) protected intconfirmWarningMsg(String msg, String title) Display a confirmation dialog containing the specified message, title and 2 choices for the user (YES or NO).voidCalled when some other page performs some kind of deferralvoidThis method will be called when the control enters the change status page.protected ObjectRetrieves the class name of this component's controller, in this case, null.protected intRetrieves the current state of the status dropdown as an Enumerated value.getLabel()Returns the label that should appear in the breadcrumb trailprotected PModelHandleReturns the actual Portal storable class instance currently selected in the UI.voidEvent listener for table HoldingsChangeEvent.protected booleanChecks 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 booleanChecks if the Deferred date is in the future; status change is not allowed if the date is in the past.voidenable/disable date fields depending on radiobutton selectionprotected voidCalled when the apply button is selected - this method will invoke the save() method.protected voidCalled when the reset button is selectedprotected voidInvoked when the widget that manipulates the status is changed by the userprotected voidAffords subclasses the opportunity to inspect the data that is about to be committed to Portal.voidrefresh()This method will be called when "refresh" button is pressed.voidThis method refreshes the mhServicesList handle from the selected services.voidvoidRemoves any changes made to the account and reverts back to the last read/saved values.voidsave()There are 3 type of different control flows of changing status 1.voidService change listener.protected voidAllows a subclass to embed additional fields in the upper right region of this page.protected voidsetModelFieldDescription(String changeType) voidsetModelHandle(PModelHandle data) Establishes thePModelHandlefor this component and all its descendants.voidSets the selected service in theComboBoxby specifying the PModelHandle in the list.protected voidThis method sets the data on this page for the service is SLM enabled.voidCalled when some other page changes the status of an account/servicevoidUsed 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, revertToPrimaryMethods 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, 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, 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, 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
-
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:
enteringPagein interfacePCCPage- Overrides:
enteringPagein classPMaintenancePage
-
refresh
public void refresh()This method will be called when "refresh" button is pressed.- Specified by:
refreshin interfacePAccountViewPage- Overrides:
refreshin classPMaintenancePage
-
addNotify
public void addNotify()Overridden to create a renderer for mofService combobox- Overrides:
addNotifyin classJComponent
-
removeNotify
public void removeNotify()- Overrides:
removeNotifyin classJComponent
-
setModelHandle
Description copied from class:PIACustomizablePanelEstablishes thePModelHandlefor this component and all its descendants.- Specified by:
setModelHandlein interfacePComponent- Overrides:
setModelHandlein classPIACustomizablePanel- Parameters:
data- the newPModelHandlefrom 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 theComboBoxby specifying the PModelHandle in the list. Ifmhis in the list, the list displays withmhselected.- Parameters:
mh- the list PModelHandle to select
-
getLabel
Returns the label that should appear in the breadcrumb trail- Specified by:
getLabelin interfacePCCPage- Overrides:
getLabelin 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:
savein interfacePAccountViewPage- Overrides:
savein classPMaintenancePage- Throws:
PSaveException
-
actionPerformed
- Specified by:
actionPerformedin 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:
statusChangein interfaceStatusChangeListener- Parameters:
e- a StatusChangeEvent encapsulating the event information
-
deferralChange
Called when some other page performs some kind of deferral- Specified by:
deferralChangein 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:
holdingsChangein interfaceHoldingsChangeListener- Parameters:
e- a HoldingsChangeEvent encapsulating the event information
-
unregister
Description copied from class:PIACustomizablePanelUsed to disconnect the controller from the component for all child widgets contained within this panel.- Specified by:
unregisterin interfacePClientComponent- Overrides:
unregisterin classPIACustomizablePanel- Throws:
RemoteException
-
getControllerClassName
Description copied from class:PIACustomizablePanelRetrieves the class name of this component's controller, in this case, null.- Specified by:
getControllerClassNamein interfacePComponent- Overrides:
getControllerClassNamein 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:
resetToDefaultin interfacePComponentAttribute- Overrides:
resetToDefaultin 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:
itemStateChangedin interfaceItemListener
-
serviceChange
Service change listener.- Specified by:
serviceChangein interfaceServiceChangeListener- Parameters:
e- a ServiceChangeEvent encapsulating the event information
-