Highlighted

AEM 6.1 to 6.4 Migration Deprecated API

Rajesh_Kamalath

22-03-2019

Hi Team,

Currently I am  working on the migration of AEM 6.1 to 6.4. The below deprecated api code need to replace in my java class.

Existing Code:

if (EventUtil.isLocal(event)) {

                JobUtil.processJob(event, this);

            } 

I already replaced the EventUtil.isLocal method on the below approach.

New Code :In Progress

String localEvent=(String)event.getProperty(DEAConstants.PROPERTY_APPLICATION);

if(StringUtil.isBlank(localEvent)){

        JobUtil.processJob(event, this);-- Still this line need to replace      

        }

But Still not able to find the solution for the Jobutil method.

org.apache.sling.event.jobs.JobUtil.processJob(Event, JobProcessor)

- Use the new JobConsumer interface instead.

I Identified JobConsumer Interface need to use, but I didn't  find any method/reference in the jobConsumer. My need here is to replace the below line, Please let me know how to replace the below code. Thanks

   JobUtil.processJob(event, this);

Replies