Hi Johann,

Both the new handler and the old handler will be called at the end[1] of
deleteServiceProvider() execution.
By the time that postDeleteHandler gets executed, the relevant Service
Provider object will been already removed. Hence, we can't read the Service
Provider object based on the name inside the postDeltedHandler.
We have also deprecated[2] the old postDeleteHandler.

[1]
https://github.com/wso2/carbon-identity-framework/blob/07c9b785611114dbd4fd652ae323d3f3ef264cf5/components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java#L746
[2]
https://github.com/wso2/carbon-identity-framework/blob/07c9b785611114dbd4fd652ae323d3f3ef264cf5/components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/listener/ApplicationMgtListener.java#L121

Regards,
Gayashan.

On Fri, Nov 1, 2019 at 3:37 PM Johann Nallathamby <[email protected]> wrote:

> Hi Gayashan,
>
> Though you introduce the method in the API, who calls the method? Now that
> there are two methods is the ApplicationMgtService going to call both the
> methods? Can't we read the Service Provider object based on the name rather
> than introducing a new method for it?
>
> Regards,
> Johann.
>
> On Fri, Oct 25, 2019 at 4:45 PM Gayashan Bombuwala <[email protected]>
> wrote:
>
>> Hi all,
>>
>> Currently implementation of the postDeleteHandler[1] of
>> ApplicationMgtListener only accepts the name of the service provider as a
>> parameter. However the postCreateHandler[2] and postUpdateHandler[3] of the
>> ApplicationMgtListener accepts the relevant Service Provider object as a
>> parameter rather than just the service provider name.We will be introducing
>> a new overloaded postDeleteHandler to the ApplicationMgtListener interface
>> where the relevant Service Provider object get passed to the handler
>> similar to the postCreateHandler[2] and postUpdateHandler[3] as the
>> relevant Service Provider information is required for logging purposes.
>>
>> [1]
>> https://github.com/wso2/carbon-identity-framework/blob/b95514a65960e75015855d343ebd9452c4ce6a2b/components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/listener/ApplicationMgtListener.java#L117
>>
>> [2]
>> https://github.com/wso2/carbon-identity-framework/blob/b95514a65960e75015855d343ebd9452c4ce6a2b/components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/listener/ApplicationMgtListener.java#L69
>>
>> [3]
>> https://github.com/wso2/carbon-identity-framework/blob/b95514a65960e75015855d343ebd9452c4ce6a2b/components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/listener/ApplicationMgtListener.java#L93
>>
>> Thanks,
>> --
>> *Gayashan Bombuwala*
>> Software Engineer | WSO2
>>
>> Email: [email protected]
>> Phone: +94770548334
>>
>> [image: https://wso2.com/signature] <https://wso2.com/signature>
>>
>
>
> --
> *Johann Dilantha Nallathamby* | Associate Director/Solutions Architect |
> WSO2 Inc.
> (m) +94 (77) 7776950 | (w) +94 (11) 2145345 | (e) [email protected]
> [image: Signature.jpg]
>


-- 
*Gayashan Bombuwala*
Software Engineer | WSO2

Email: [email protected]
Phone: +94770548334

[image: https://wso2.com/signature] <https://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to