Foren

Customize original Liferay 7.0 module

David Knol, geändert vor 7 Jahren.

Customize original Liferay 7.0 module

Junior Member Beiträge: 29 Beitrittsdatum: 19.06.15 Neueste Beiträge
Good day to everyone, I was wondering what process should be the most suitable one for changing default java code from one of the original bundled Liferay modules in 7.0.

I'll try to explain it better. I need to change one Java class from AssetPublisherUtil, bundled inside the asset-publisher-web module. I need to change it because I want to send a more complex email to the Asset Publisher subscribers.

Of course I know I will be able to change it by compile the whole module plus my changes, but It doesn't feel the new "osgi" way, but, as far as I can found, I didn't see any other solution.

What do you think? emoticon
thumbnail
David H Nebinger, geändert vor 7 Jahren.

RE: Customize original Liferay 7.0 module

Liferay Legend Beiträge: 14916 Beitrittsdatum: 02.09.06 Neueste Beiträge
So typically you need to rethink how you change code in this way. In 6.x, you could do an EXT plugin to actually change the class itself.

In LR7, you want to think of how to affect changes like this using the available options. For example, if the email is being sent every time you do something in the interface, you might consider using an action command override so you can intercept the action and invoke different code to construct and send the email.

But overriding a single class like this is not going to be possible under the new OSGi ways.