Foros de discusión

How to override Liferay core PortalLDAPImporterImpl class

Frantisek Simon, modificado hace 11 años.

How to override Liferay core PortalLDAPImporterImpl class

New Member Mensajes: 5 Fecha de incorporación: 7/02/13 Mensajes recientes
Hello,

I have problem to import users from LDAP to Liferay. I need to debug / change function of Liferay core class PortalLDAPImporterImpl.

Can somebody please post exact way how to override this class with use of SDK plugins / ext ? (directory structure, xml files, java class file - empty skeleton just to know where to put class).

I tried many combinations but still I am not able to override this class.

Thank you very much.
thumbnail
Hitoshi Ozawa, modificado hace 11 años.

RE: How to override Liferay core PortalLDAPImporterImpl class

Liferay Legend Mensajes: 7942 Fecha de incorporación: 24/03/10 Mensajes recientes
PortalLDAPImporterImpl.java is in \portal-impl\src\com\liferay\portal\security\ldap
Just override this class in your ext plugin.
Frantisek Simon, modificado hace 11 años.

RE: How to override Liferay core PortalLDAPImporterImpl class

New Member Mensajes: 5 Fecha de incorporación: 7/02/13 Mensajes recientes
Hello,

I know where is original class. I put my class on plugins path:
plugins\ext\%name-of-plugin%\docroot\WEB-INF\ext-impl\src\com\liferay\portal\security\ldap


I run ant deploy for this plugin and restart tomcat. Its still use original class.

Any help would be great.
Frantisek Simon, modificado hace 11 años.

RE: How to override Liferay core PortalLDAPImporterImpl class

New Member Mensajes: 5 Fecha de incorporación: 7/02/13 Mensajes recientes
Nobody knows how to override core Liferay class or where should be a problem?
thumbnail
Jitendra Rajput, modificado hace 11 años.

RE: How to override Liferay core PortalLDAPImporterImpl class

Liferay Master Mensajes: 875 Fecha de incorporación: 7/01/11 Mensajes recientes
Override using ext-plugin.

1) Create ext-spring.xml inside ext-impl\src\META-INF\
2) Add below bean entry inside ext-spring.xml

<bean id="com.liferay.portal.security.ldap.PortalLDAPImporterUtil" class="com.liferay.portal.security.ldap.PortalLDAPImporterUtil">
		<property name="portalLDAPImporter">
			<bean class="com.my.portal.security.ldap.CustomPortalLDAPImporterImpl">
				<property name="LDAPToPortalConverter" ref="ldapToPortalConverter" />
			</bean>
		</property>
</bean>



Create your CustomPortalLDAPImporterImpl and override original class.