Package com.portal.app.ccare.comp
Class PIAProfileBeanImpl
java.lang.Object
com.portal.bas.PControllerImpl
com.portal.bas.comp.PIAComponentCollectionBean
com.portal.app.ccare.comp.PIAProfileBeanImpl
- All Implemented Interfaces:
PExtendableObjectBean,PProfileBean,PIACollectionBean,PControllerBean,Serializable,Remote,Unreferenced
A controller that knows how to extract profile data associated with
an account, and how to commit that data when it changes.
- See Also:
-
Field Summary
Fields inherited from class com.portal.bas.PControllerImpl
mFList, mRemoteListeners, UPDATE_CLIENT, UPDATE_MODEL_CHANGE, UPDATE_NEW_MODEL, UPDATE_PROPERTY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncom.portal.app.util.CustomerValErrorData[]Used to create a profile object for an existing account (this is not used for account creation, just for existing accounts).getProfiles(PModelHandle model) An account/service could potentially have more than one profile instances of the same type associated with it.voidgraft(PModelHandle[] model) Because one panel is used during account creation/maintenance, we need to play some tricks with the input FList.voidIf 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.voidBecause 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.voidgraftForUpdateCustomer(PModelHandle[] model) 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.booleanDetermines if the account object contains profile objects or not.com.portal.app.util.CustomerValErrorData[]save(PModelHandle pm) Used to save changes to already existing profile objects (this is not used for account creation, just for existing accounts).voidsetIndex(int index) Deprecated.Taken care of automatically nowvoidsetObjectType(String type) Primarily useful for subclasses of Portal storable classes (like profile objects).voidCalled to retrieve the profile objects associated with the given account or service.Methods inherited from class com.portal.bas.comp.PIAComponentCollectionBean
addChild, getCollectedData, getSelectionDataFor, removeChildMethods inherited from class com.portal.bas.PControllerImpl
addRemoteListener, closeSecContext, createClientException, distributeEventToListeners, fireModelChangeEvent, getAppController, getArrayRange, getContext, getField, getField, getField, getFieldWithRestriction, getFieldWithRestriction, getFieldWithRestriction, getModel, getRemoteListenerHandle, getSecContext, handleDistributeToListener, isLight, register, releaseContext, releaseRemoteListener, removeRemoteListener, setField, setField, setModel, unreferencedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.portal.bas.PControllerBean
addRemoteListener, getArrayRange, getModel, getRemoteListenerHandle, isLight, register, releaseRemoteListener, removeRemoteListener, setModel
-
Constructor Details
-
PIAProfileBeanImpl
Create a profile panel controller.- Throws:
RemoteException
-
-
Method Details
-
update
Called to retrieve the profile objects associated with the given account or service.- Overrides:
updatein classPIAComponentCollectionBean- Parameters:
reason-data- the data associated withupdateincoming-- Throws:
RemoteException- thrown for errors
-
hasExtendedObjects
Determines if the account object contains profile objects or not.- Specified by:
hasExtendedObjectsin interfacePExtendableObjectBean- Returns:
- true if this account has a profile object; false otherwise
- Throws:
RemoteException
-
setIndex
Deprecated.Taken care of automatically nowEstablishes 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:
setIndexin interfacePExtendableObjectBean- Parameters:
index- The index into the Object array- Throws:
RemoteException
-
setObjectType
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:
setObjectTypein interfacePExtendableObjectBean- Parameters:
type- The name of the extended storable class- Throws:
RemoteException
-
graft
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:
graftin interfacePExtendableObjectBean- 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
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 usingsetObjectType(). 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:
graftForAccountCreationin interfacePProfileBean- 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
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:
graftForUpdateCustomerin interfacePProfileBean- 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
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:
graftForCreateProfilein interfacePProfileBean- Parameters:
model- The PModelHandle obtained by calling collectData() locally on the panel.- Throws:
RemoteException
-
save
Used to save changes to already existing profile objects (this is not used for account creation, just for existing accounts).- Specified by:
savein interfacePExtendableObjectBean- 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:
createProfilein interfacePProfileBean- 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
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:
getProfilesin interfacePProfileBean- Parameters:
model- account or service model handle.- Returns:
- an array of profile model handles.
- Throws:
RemoteException
-