Package com.portal.app.cc.comp
Class PIAPaymentTypePanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.portal.pfc.ui.ImagePanel
com.portal.bas.comp.PIACustomizablePanel
com.portal.app.cc.comp.PI18NPanel
com.portal.app.cc.comp.PIAPaymentTypePanel
- All Implemented Interfaces:
PIAPaymentTypePanelBean,PAppComponent,PClientComponent,PCollectDataListener,PComponent,PComponentAttribute,PViewDataChangeListener,ContainerListener,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,Remote,EventListener,Accessible
- Direct Known Subclasses:
PCreditCardPanel,PFUSADirDebitPanel,PIADefaultPaymentTypePanel,PInvoicePOPanel,PSepaPanel,PSepaRegisterPanel
Base class for the panels displaying payment types (credit card, dir debit,
etc.) for creating or updating an account. This class provides a common
collectData method that adds any required default or additional data.- 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
Fields 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 TypeMethodDescriptionvoidcollectData(PCollectDataEvent event) Collects data from this panel for three different cases:
1) During page validation when changing tabs during account creation (event.getReason()isPCollectDataEvent.FOR_VALIDATION),
2) When saving a new account (event.getReason()isPCollectDataEvent.FOR_STORING),
3) When updating an existing account (event.getReason()isPCollectDataEvent.FOR_DIRTY).
Each of these three cases involves different data collection:
1) For page validation, the additional data that needs to be collected are a FldPayinfo type-only POID (appropriate to the billing type) and the FldBillType.
2) For saving a new account, data is required for all fields (whether the user has entered data or not), a FldPayinfo type-only POID (appropriate to the billing type) and the FldBillType.
3) For updating an account, the additional data that needs to be collected are the FldPayinfoObj's POID and the FldBillType.voiddefaultsForStoring(PModelHandle model) Implement the PIAPaymentTypePanelBean interfacebooleandefaultsForUpdate(PModelHandle model) Implement the PIAPaymentPanelBean interface(s) These are dummy set of interfaces in place to allow the control to transfer to the right payment bean(invoice,credit etc.,) at run timevoidImplement the PIAPaymentTypePanelBean interface.protected StringgetFullName(String firstName, String middleName, String lastName) Formats the passed-in first, middle, and last names into a full name.getNameAddressData(PModelHandle model) Implement the PIAPaymentTypePanelBean interfacebooleanhandleWizardCommitError(com.portal.app.util.CustomerError error) Handles account creation commit-time errors.inthandleWizardValidationError(com.portal.app.util.CustomerError error) Handles account creation validate-time errors.booleanDetermines if the panel has been given any shared databooleanDetermines if the panel should exhibit account creation behaviorvoidsetAccountCreationPanel(boolean b) Determines whether the panel should exhibit account creation- or maintenance-time behaviorvoidsetReceivedSharedData(boolean b) Determines whether the panel should exhibit account creation- or maintenance-time behaviorvoidCalled during account creation to allow subclasses of this class to share in data.voidCalled at maintenance time when changing payment types to allow subclasses of this class to share in data from the passed-in account.booleanValidates the fields in the payment panel.Methods inherited from class com.portal.app.cc.comp.PI18NPanel
addNotify, changeLayout, getLayoutLocale, propertyChange, setLayoutLocaleMethods inherited from class com.portal.bas.comp.PIACustomizablePanel
clear, componentAdded, componentRemoved, containsError, getBackgroundImageSource, getBundle, getControllerClassName, getModelHandle, getRemoteComponent, getResourceName, getTools, isClean, isCurrencyDisplay, isDirty, isError, isInputTracking, isLight, isRequired, processError, resetToDefault, revertToPrimary, setBackgroundImageMode, setBackgroundImageSource, setClean, setCurrencyDisplay, setDefault, setError, setInputTracking, setModelHandle, 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, 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
-
Constructor Details
-
PIAPaymentTypePanel
public PIAPaymentTypePanel()Default constructor the the payment type panel
-
-
Method Details
-
collectData
Collects data from this panel for three different cases:
1) During page validation when changing tabs during account creation (event.getReason()isPCollectDataEvent.FOR_VALIDATION),
2) When saving a new account (event.getReason()isPCollectDataEvent.FOR_STORING),
3) When updating an existing account (event.getReason()isPCollectDataEvent.FOR_DIRTY).
Each of these three cases involves different data collection:
1) For page validation, the additional data that needs to be collected are a FldPayinfo type-only POID (appropriate to the billing type) and the FldBillType.
2) For saving a new account, data is required for all fields (whether the user has entered data or not), a FldPayinfo type-only POID (appropriate to the billing type) and the FldBillType.
3) For updating an account, the additional data that needs to be collected are the FldPayinfoObj's POID and the FldBillType.- Specified by:
collectDatain interfacePCollectDataListener- Overrides:
collectDatain classPIACustomizablePanel- Parameters:
event- The collect data event containing the reason code and model handle.
-
setAccountCreationPanel
public void setAccountCreationPanel(boolean b) Determines whether the panel should exhibit account creation- or maintenance-time behavior- Parameters:
b- should be false when the panel is used during account maintenance. True by default.
-
isAccountCreationPanel
public boolean isAccountCreationPanel()Determines if the panel should exhibit account creation behavior- Returns:
- true if this panel is being used during account creation
-
handleWizardValidationError
public int handleWizardValidationError(com.portal.app.util.CustomerError error) Handles account creation validate-time errors. This base class implementation makes use of default validate-time error handling provided by the wizard framework.- Parameters:
error- The error.- Returns:
WizardValidationManager.VALIDATION_NOMATCHif no matching error field is found orWizardValidationManager.VALIDATION_IGNOREERRORif the user chooses to ignore a validation error orWizardValidationManager.VALIDATION_FIXERRORif the user chooses to fix the error or
-
handleWizardCommitError
public boolean handleWizardCommitError(com.portal.app.util.CustomerError error) Handles account creation commit-time errors. This base class implementation makes use of default commit-time error handling provided by the wizard framework.- Parameters:
error- The error.- Returns:
trueif the payment panel will handle the error; otherwisefalse.
-
validatePaymentPanel
public boolean validatePaymentPanel()Validates the fields in the payment panel. This is a mechanism for the individual payment panels to do payment-specific validation. This validation supplements any Portal-level validation.- Returns:
- boolean - true if all fields in individual payment panel are valid, false otherwise. The default implementation in this (base) payment panel just returns true since there is no validation done here.
-
defaultsForUpdate
Implement the PIAPaymentPanelBean interface(s) These are dummy set of interfaces in place to allow the control to transfer to the right payment bean(invoice,credit etc.,) at run time- Specified by:
defaultsForUpdatein interfacePIAPaymentTypePanelBean- Parameters:
model-- Returns:
- false if the model handle for the view for this component is null; true otherwise
- Throws:
RemoteException
-
defaultsForStoring
Implement the PIAPaymentTypePanelBean interface- Specified by:
defaultsForStoringin interfacePIAPaymentTypePanelBean- Parameters:
model-- Throws:
RemoteException
-
defaultsForValidation
Implement the PIAPaymentTypePanelBean interface.- Specified by:
defaultsForValidationin interfacePIAPaymentTypePanelBean- Parameters:
model-- Throws:
RemoteException
-
getNameAddressData
Implement the PIAPaymentTypePanelBean interface- Specified by:
getNameAddressDatain interfacePIAPaymentTypePanelBean- Parameters:
model- Model from which name/address etc., are to be extracted- Returns:
- nameAddress Name and Address Data
- Throws:
RemoteException
-
getFullName
Formats the passed-in first, middle, and last names into a full name.- Parameters:
firstName- first namemiddleName- middle namelastName- last name- Returns:
- a full name based upon either the
contactname.twonamesformatorcontactname.threenamesformatmessage format string depending on how many non-empty (or non-null) name strings are passed in.
-