Class PPurchaseOfferingWizard

All Implemented Interfaces:
PPurchaseOfferingWizardContext, PValidatingWizardContext, WizardValidationManager, SharedDataManager, PAppContext, ImageObserver, MenuContainer, PropertyChangeListener, VetoableChangeListener, Serializable, EventListener, Accessible

public class PPurchaseOfferingWizard extends PValidatingWizard implements PPurchaseOfferingWizardContext
A validating wizard for use in purchasing a new offering (a deal based upon an instance of an existing service or a plan based upon an instance of a new service) for an account. (See the CustomerCenter.properties file for a list of the "purchase new offering" wizard defaults that can be set.)
See Also:
  • Field Details

  • Constructor Details

    • PPurchaseOfferingWizard

      public PPurchaseOfferingWizard()
      Builds a wizard used to purchase new offerings (plans or deals). The tag "purchaseoffering" will be passed to the constructor in the superclass. It is associated with purchase offering wizard pages in the CustomerCenter.properties file.
  • Method Details

    • addNotify

      public void addNotify()
      Overrides:
      addNotify in class PValidatingWizard
    • getPurchaseOfferingModelHandle

      public PModelHandle getPurchaseOfferingModelHandle()
      Returns the model handle for the purchase offering wizard.
      Returns:
      The model handle for the purchase offering wizard. (Before the wizard is displayed or if the wizard was cancelled the model handle will be null. If the wizard completes successfully, the model handle will be for the newly purchased offering.)
    • getPurchaseOfferingType

      public int getPurchaseOfferingType()
      Returns the offering type for the purchase offering wizard.
      Returns:
      The offering type for the purchase offering wizard which contains one of the following values:
      NO_OFFERING -- offering type not selected
      DEAL_OFFERING -- selected offering is a deal
      PLAN_OFFERING -- selected offering is a plan
    • setChangeOptionFlag

      public void setChangeOptionFlag(boolean flag)
    • getChangeOptionFlag

      public boolean getChangeOptionFlag()
    • setTransitionType

      public void setTransitionType(int transitionType)
      This method is used to set the transition type (plan / deal) Pass 0 to indicate plan transition. Pass 1 to indicate deal transition.
      Parameters:
      transitionType - Pass 0 or 1
    • getTransitionType

      public int getTransitionType()
      Returns 0 if plan transition is selected. Returns 1 if deal transition is selected.
      Returns:
    • validateData

      protected Object validateData(PModelHandle model) throws RemoteException
      No-op. Always returns null. The purchase offering wizard doesn't currently provide any default validation.
      Specified by:
      validateData in class PValidatingWizard
      Parameters:
      model - The model handle for the data to be validated
      Returns:
      null if the validation succeeds, otherwise a CustomerError.
      Throws:
      RemoteException
    • commitData

      protected Object commitData(PModelHandle model) throws RemoteException
      Purchases an offering based upon the passed-in model handle
      Specified by:
      commitData in class PValidatingWizard
      Parameters:
      model - The model handle for the offering to be purchased
      Returns:
      The passed-in PModelHandle if the purchase succeeds, otherwise a CustomerError
      Throws:
      RemoteException
    • finished

      protected void finished(PModelHandle model)
      After doing default finished processing, saves the model handle returned by a successful purchase attempt.
      Overrides:
      finished in class PValidatingWizard
      Parameters:
      model - The model handle returned from a successful purchase attempt.