How can we override the liferay module in liferay7?

I am very new to liferay 7, actually we are porting liferay 6.2 to liferay-7, in 6.2 we use ext to override the action class, but in liferay-7 I get some cofusion, can you please help? me.

Main theme of my appearance: when a new role is created in an organization from the dashboard, we need to store the role information and organization information in our custom table as we have to override EditRoleAction.java in LR6.2 , the same as what we are trying reach in LR7.

Action class in Liferay 6.2:

Portal path: D: \ Liferay6.2workspace \ portal \ portalhost \ SRC \ COM \ Liferay \ portlet \ rolesadmin \ action \ EditRoleAction.java

External path: CutomRoles-ext / DOCROOT / WEB-INF / ext-os / SRC / COM / Liferay / portlet / rolesadmin / action / EditRoleAction.java

Action class in Liferay 7.0GA4:

D: \ Liferay7GA4 \ portal \ modules \ applications \ fundamental \ roles \ roles-web-admin \ src \ home \ Java \ COM \ Liferay \ roles \ Admin \ Web \ internal \ portlet * RolesAdminPortlet.java *

+3


source to share


1 answer


It looks like overriding Action is not the right place. Have a look at ServiceWrappers - they will work at the business level and you can add additional code (from memory) RoleLocalService.addRole(...)

and other related methods.

Ext . , ext , . Liferay 7 DXP ext . , , ( ). , , .



Now that the description in the comments for this answer goes much further than the description in the question: you might need some portlet-level customization. To do this: Determine where the portlet is currently implemented (for example, identify the module) and override its actions (there is a good chance this article can help) and potentially also the user interface.

And one more alternative: you can achieve the same using the commands on the organization's site: they behave almost like roles, but are only available for one site (although the organization does not exist, but you declare that your organizations have sites anyway)

0


source







All Articles