Expand my Community achievements bar.

SOLVED

Do we have any substitute for com.day.cq.contentsync.handler.util.RequestResponseFactory , this is deprecated ?

Avatar

Level 1
Level 1
 
1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @kjj ,

Yes, the com.day.cq.contentsync.handler.util.RequestResponseFactory class is deprecated in AEM. The recommended substitute for this class is to use the org.apache.sling.api.request.RequestResponseFactory interface instead. To obtain an instance of the RequestResponseFactory interface, you can use the org.apache.sling.api.SlingHttpServletRequest object.

View solution in original post

3 Replies

Avatar

Correct answer by
Community Advisor

Hi @kjj ,

Yes, the com.day.cq.contentsync.handler.util.RequestResponseFactory class is deprecated in AEM. The recommended substitute for this class is to use the org.apache.sling.api.request.RequestResponseFactory interface instead. To obtain an instance of the RequestResponseFactory interface, you can use the org.apache.sling.api.SlingHttpServletRequest object.

Avatar

Employee

Hey @MayurSatav can you just recheck or tell me how you found the api, i cannot find it, giving a snap from IDE, share me also the java-doc link for the same (org.apache.sling.api.request.RequestResponseFactor)

Rajarshi306278674zn4_0-1687408301987.png

 

 

Avatar

Level 6

Hi @kjj 

What is the reason you are using "RequestResponseFactory" API, I suggest if it is just to create request , you can get it directly from SlingHttpServletRequest.
Let me know if you have any other specific reason?