Fórumok

How to add/update Ldap server programatically in Liferay

Vimek Vanamali, módosítva 8 év-val korábban

How to add/update Ldap server programatically in Liferay

New Member Bejegyzések: 16 Csatlakozás dátuma: 2014.04.06. Legújabb bejegyzések
I have a test server installed with liferay 6.2 g4 and it is configured with a LDAP server.The configuration was done through the portal-ext.properties file.As per my understanding configuration mentioned in the portal-ext.properties file are effective only during the initial setup. Any change in the Ldap configuration should done through the control panel.The control panel show the ldap servers in a list(search container).and we can select and edit the ldap server from control panel.

Now what im trying is like, i want to do this from a custom portlet.ie I want to list the ldap servers in my portlet and should be able update it. I have checked the PortalLDAPExporterUtil,PortalLDAPImporterUtil but that didnt help.

Can someone help me to find out which Liferay API should i look to achieve this.

SO Link : http://stackoverflow.com/questions/31041615/how-to-add-update-ldap-server-programatically-in-liferay
thumbnail
Jorge Díaz, módosítva 8 év-val korábban

RE: How to add/update Ldap server programatically in Liferay (Válasz)

Liferay Master Bejegyzések: 753 Csatlakozás dátuma: 2014.01.09. Legújabb bejegyzések
You can find the code where LDAP servers are stored at control panel at following files:


At first JSP, edit_ldap_server.jsp the parameters are filed by final user and sent to EditLDAPServerAction. This second java only retrieves that information and stores it to preferences (method EditLDAPServerAction.addLDAPServer)

You cannot call this methods from a portlet, but perhaps you can copy and paste internal logic.
Vimek Vanamali, módosítva 8 év-val korábban

RE: How to add/update Ldap server programatically in Liferay

New Member Bejegyzések: 16 Csatlakozás dátuma: 2014.04.06. Legújabb bejegyzések
Looks like the exactly the same thing i wanted .Thank you so much.