X

The Mobile & Digital Assistant Blog covers the latest in mobile and conversational AI development and engagement

MAF 2.3 Deprecates RestServiceAdapter ... and replaces it with RestServiceAdapter

Frank Nimphius
Master Principal Product Manager

 After migrating existing Oracle MAF applications to  MAF 2.3, your source code shows the following deprecation warning

RestServiceAdapter deprecation

This deprecation is not mentioned in the Release Notes for MAF 2.3 but in the Oracle MAF Developer Guide, which you may not re-read for each new release: thus this blog article.

 The deprecation warning above however does not mean that the RestServiceAdapter class is going away. Instead it is replaced with the RestServiceAdapter class. Confused? Well, as you probably guessed from the previous sentence, the change is in the package location of the class, which changes from oracle.adfmf.dc.ws.rest to oracle.maf.api.dc.ws.rest.

But refactoring the "adfmf" string to the "maf" product identifier is not the only change that comes with this. The call you do to obtain an instance of RestServiceAdapter does change too.

RestServiceAdapterFactory import statement

Instead of calling Model.createRestServiceAdapter(), which you did prior to MAF 2.3, you now use the RestServiceAdapterFactory

RestServiceAdapter restServiceAdapter = RestServiceAdapterFactory.newFactory().createRestServiceAdapter();

Working with the RestServiceAdapter itself doesn't change much except for a few method having new names like setRequestMethod and getRequestMethod that replace setRequestType and getRequestType (which I think is a sensible change). 

So what now? Actually there is no need to do anything in the short term. However in the mid term we suggest to change the use of RestServiceAdapter to the new class so you are on the latest version of the supported API. 

 

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.

Recent Content