LPS-31642 refactor

Hi Zsiga,

please see the reasons of this pr here: https://github.com/juliocamarero/liferay-portal/pull/964