Class PIAProfileBeanImpl

All Implemented Interfaces:
PExtendableObjectBean, PProfileBean, PIACollectionBean, PControllerBean, Serializable, Remote, Unreferenced

public class PIAProfileBeanImpl extends PIAComponentCollectionBean implements PProfileBean
A controller that knows how to extract profile data associated with an account, and how to commit that data when it changes.
See Also:
  • Constructor Details

  • Method Details

    • update

      public void update(int reason, Object data) throws RemoteException
      Called to retrieve the profile objects associated with the given account or service.
      Overrides:
      update in class PIAComponentCollectionBean
      Parameters:
      reason -
      data - the data associated with update
      incoming -
      Throws:
      RemoteException - thrown for errors
    • hasExtendedObjects

      public boolean hasExtendedObjects() throws RemoteException
      Determines if the account object contains profile objects or not.
      Specified by:
      hasExtendedObjects in interface PExtendableObjectBean
      Returns:
      true if this account has a profile object; false otherwise
      Throws:
      RemoteException
    • setIndex

      public void setIndex(int index) throws RemoteException
      Deprecated.
      Taken care of automatically now
      Establishes the array index for the storable class being modified. This is present to accomodate multiple objects (object panels).
      This method should be called before calling graft();
      Specified by:
      setIndex in interface PExtendableObjectBean
      Parameters:
      index - The index into the Object array
      Throws:
      RemoteException
    • setObjectType

      public void setObjectType(String type) throws RemoteException
      Primarily useful for subclasses of Portal storable classes (like profile objects). For example, if you create a panel for a profile object /profile/marketing you would pass "marketing" through this API. This is needed to build up the proper POID.
      Specified by:
      setObjectType in interface PExtendableObjectBean
      Parameters:
      type - The name of the extended storable class
      Throws:
      RemoteException
    • graft

      public void graft(PModelHandle[] model) throws RemoteException
      Because one panel is used during account creation/maintenance, we need to play some tricks with the input FList. Account creation requires a slightly different input FList. This method takes the index specified in the extended services panel and uses it to build up the input FList for account creation.
      Specified by:
      graft in interface PExtendableObjectBean
      Parameters:
      model - An array of 2 PModelHandles. One that is passed into collectData() from the account creation wizard, and one that is obtained by calling collectData() locally on the panel. The latter is grafted onto the former in the proper format.
      pm - An array of 2 PModelHandles. One that is passed into collectData() from the account creation wizard, and one that is obtained by calling collectData() locally on the panel. The latter is grafted onto the former in the proper format.
      Throws:
      RemoteException
    • graftForAccountCreation

      public void graftForAccountCreation(PModelHandle model) throws RemoteException
      If only one profile object exists, in WebKit you can use the account creation model to create the profile object instead of using a seperate profile model You can add the profile field in WebKit just as you add any Portal field at account creation by including the FldProfiles array with the custom fields in it. The object type should be specified using setObjectType(). This method modifies the input flist required for OP_CUST_COMMIT_CUSTOMER by adding the FldProfilesObj field for each FldProfiles item in the array as follows. input:FldNameInfo ... FldProfiles[0] FldInheritedInfo[0] CustomFld output:FldNameInfo... FldProfiles[0] FldInheritedInfo[0] CustomFld FldProfileObj
      Specified by:
      graftForAccountCreation in interface PProfileBean
      Parameters:
      model - PModelHandle to the account flist which already includes the FldProfiles array with the custom fields.
      pm - PModelHandle to the account flist which already includes the FldProfiles array with the custom fields.
      Throws:
      RemoteException
      See Also:
    • graftForUpdateCustomer

      public void graftForUpdateCustomer(PModelHandle[] model) throws RemoteException
      Because the same panel can be used standalone(OP_MODIFY_PROFILE) or embedded within an account panel(OP_UPDATE_CUSTOMER), we need to play some tricks with the input FList. This method builds up the the input flist required by OP_CREATE_PROFILE
      Specified by:
      graftForUpdateCustomer in interface PProfileBean
      Parameters:
      model - An array of 2 PModelHandles. One that is passed into collectData() from the parent account panel, and one that is obtained by calling collectData() locally on the panel. The latter is grafted onto the former in the proper format.
      Throws:
      RemoteException
    • graftForCreateProfile

      public void graftForCreateProfile(PModelHandle model) throws RemoteException
      Because the same panel can be used to create a new profile object for an existing account(OP_CREATE_PROFILE) or modify an existing profile object, we need to play some tricks with the input FList. This method builds up the the input flist required by OP_CREATE_PROFILE
      Specified by:
      graftForCreateProfile in interface PProfileBean
      Parameters:
      model - The PModelHandle obtained by calling collectData() locally on the panel.
      Throws:
      RemoteException
    • save

      public com.portal.app.util.CustomerValErrorData[] save(PModelHandle pm) throws RemoteException
      Used to save changes to already existing profile objects (this is not used for account creation, just for existing accounts).
      Specified by:
      save in interface PExtendableObjectBean
      Parameters:
      pm - The input FList (as a PModelHandle) containing the data to save.
      Returns:
      an array of errors, if the save fails
      Throws:
      RemoteException
    • createProfile

      public com.portal.app.util.CustomerValErrorData[] createProfile(PModelHandle pm) throws RemoteException
      Used to create a profile object for an existing account (this is not used for account creation, just for existing accounts).
      Specified by:
      createProfile in interface PProfileBean
      Parameters:
      pm - The input FList (as a PModelHandle) containing the data to save.
      Returns:
      an array of errors, if the create fails
      Throws:
      RemoteException
    • getProfiles

      public PModelHandle[] getProfiles(PModelHandle model) throws RemoteException
      An account/service could potentially have more than one profile instances of the same type associated with it. This method returns all associated profile instances of the specified profile type.
      Specified by:
      getProfiles in interface PProfileBean
      Parameters:
      model - account or service model handle.
      Returns:
      an array of profile model handles.
      Throws:
      RemoteException