0

The fields PORTLET_ID and MESSAGE_LISTENER_CLASS_NAME are deprecated in the new versions of this library.
What are the two fields functionally equivalent in the new versions?

IDE: LiferayProjectSDKwithDevStudioCommunityEdition-201910152009-windows-installer.exe
Liferay version: liferay-ce-portal-7.3.0-ga1
Windows 10 64-bit build 1909 on VMWare Workstation Pro 15.5.1 on Linux Mint Cinnamon 64-bit 19.3 Tricia.

<dependency>
    <groupId>com.liferay.portal</groupId>
    <artifactId>com.liferay.portal.kernel</artifactId>
    <version>5.3.0</version>
    <scope>provided</scope>
</dependency>

enter image description here

https://docs.liferay.com/ce/portal/7.1-latest/javadocs/portal-kernel/
https://docs.liferay.com/portal/7.0/javadocs/portal-kernel/deprecated-list.html

I have a multitude of errors in the program. How do I know all the deprecated words with what should be replaced?

Naman
  • 27,789
  • 26
  • 218
  • 353
Mario Palumbo
  • 693
  • 8
  • 32

1 Answers1

0

Those constants where deprecated in Liferay Portal 7.0 as a part of https://issues.liferay.com/browse/LPS-59681 improvements, see also code changes here: https://github.com/brianchandotcom/liferay-portal/pull/31480/files#diff-752cb5829d58912170a4665b288ce6c6

You have more information this change in Liferay breaking changes page, see:

In that page you can read following information:

Removed All Methods from SchedulerEngineHelper that Explicitly Schedule Jobs Using SchedulerEntry or Specify MessageListener Class Names

Date: 2015-Oct-29
JIRA Ticket: LPS-59681

What changed?

The following methods were removed from SchedulerEngine:

SchedulerEngineHelper.addJob(Trigger, StorageType, String, String, Message, String, String, int)
SchedulerEngineHelper.addJob(Trigger, StorageType, String, String, Object, String, String, int)
SchedulerEngineHelper.schedule(SchedulerEntry, StorageType, String, int)

Who is affected?

This affects developers that use the above methods to schedule jobs into the SchedulerEngine. How should I update my code?

You should update your code to call one of these methods:

SchedulerEngineHelper.schedule(Trigger, StorageType, String, String, Message, int)
SchedulerEngineHelper.schedule(Trigger, StorageType, String, String, Object, int)

Instead of simply providing the class name of your scheduled job listener, you should follow these steps:

Instantiate your MessageListener.

Call SchedulerEngineHelper.register(MessageListener, SchedulerEntry) to register your SchedulerEventMessageListener.

Why was this change made?

The deleted methods provided facilities that aren’t compatible with using declarative services in an OSGi container. The new approach allows for proper injection of dependencies into scheduled event message listeners.

jorgediaz-lr
  • 942
  • 6
  • 13