Forums de discussion

Customize original Liferay 7.0 module

David Knol, modifié il y a 7 années.

Customize original Liferay 7.0 module

Junior Member Publications: 29 Date d'inscription: 19/06/15 Publications récentes
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, modifié il y a 7 années.

RE: Customize original Liferay 7.0 module

Liferay Legend Publications: 14919 Date d'inscription: 02/09/06 Publications récentes
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.