掲示板

How to override Liferay core PortalLDAPImporterImpl class

11年前 に Frantisek Simon によって更新されました。

How to override Liferay core PortalLDAPImporterImpl class

New Member 投稿: 5 参加年月日: 13/02/07 最新の投稿
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
11年前 に Hitoshi Ozawa によって更新されました。

RE: How to override Liferay core PortalLDAPImporterImpl class

Liferay Legend 投稿: 7942 参加年月日: 10/03/24 最新の投稿
PortalLDAPImporterImpl.java is in \portal-impl\src\com\liferay\portal\security\ldap
Just override this class in your ext plugin.
11年前 に Frantisek Simon によって更新されました。

RE: How to override Liferay core PortalLDAPImporterImpl class

New Member 投稿: 5 参加年月日: 13/02/07 最新の投稿
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.
11年前 に Frantisek Simon によって更新されました。

RE: How to override Liferay core PortalLDAPImporterImpl class

New Member 投稿: 5 参加年月日: 13/02/07 最新の投稿
Nobody knows how to override core Liferay class or where should be a problem?
thumbnail
11年前 に Jitendra Rajput によって更新されました。

RE: How to override Liferay core PortalLDAPImporterImpl class

Liferay Master 投稿: 875 参加年月日: 11/01/07 最新の投稿
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.