フォーラム

ホーム » Liferay Portal » English » 3. Development

構造的に表示 平面上に表示 ツリー上に表示
スレッド [ 前へ | 次へ ]
toggle
Frantisek Simon
How to override Liferay core PortalLDAPImporterImpl class
2013/02/14 8:08
答え

Frantisek Simon

ランク: New Member

投稿: 5

参加年月日: 2013/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.
Hitoshi Ozawa
RE: How to override Liferay core PortalLDAPImporterImpl class
2013/02/14 13:20
答え

Hitoshi Ozawa

ランク: Liferay Legend

投稿: 7954

参加年月日: 2010/03/23

最近の投稿

PortalLDAPImporterImpl.java is in \portal-impl\src\com\liferay\portal\security\ldap
Just override this class in your ext plugin.
Frantisek Simon
RE: How to override Liferay core PortalLDAPImporterImpl class
2013/02/14 23:30
答え

Frantisek Simon

ランク: New Member

投稿: 5

参加年月日: 2013/02/07

最近の投稿

Hello,

I know where is original class. I put my class on plugins path:
1plugins\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
RE: How to override Liferay core PortalLDAPImporterImpl class
2013/02/21 0:03
答え

Frantisek Simon

ランク: New Member

投稿: 5

参加年月日: 2013/02/07

最近の投稿

Nobody knows how to override core Liferay class or where should be a problem?
Jitendra Rajput
RE: How to override Liferay core PortalLDAPImporterImpl class
2013/02/21 3:17
答え

Jitendra Rajput

ランク: Liferay Master

投稿: 742

参加年月日: 2011/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

1<bean id="com.liferay.portal.security.ldap.PortalLDAPImporterUtil" class="com.liferay.portal.security.ldap.PortalLDAPImporterUtil">
2        <property name="portalLDAPImporter">
3            <bean class="com.my.portal.security.ldap.CustomPortalLDAPImporterImpl">
4                <property name="LDAPToPortalConverter" ref="ldapToPortalConverter" />
5            </bean>
6        </property>
7</bean>



Create your CustomPortalLDAPImporterImpl and override original class.