Skip to content
Snippets Groups Projects
Commit 553ac46c authored by strentini's avatar strentini
Browse files

FXOLAT-426 : remove LDAPAdminExtension class, add genericActionExtension (for...

FXOLAT-426 : remove LDAPAdminExtension class, add genericActionExtension (for SysAdminController) in ldapContext.xml. (according to the other modules)
parent 119ebc44
No related branches found
No related tags found
No related merge requests found
...@@ -159,6 +159,29 @@ ...@@ -159,6 +159,29 @@
</property> </property>
</bean> </bean>
<!-- LDAP admin. panel -->
<bean class="org.olat.core.extensions.action.GenericActionExtension" id="sysadmin.menupoint.syscfg.ldapcfg" init-method="initExtensionPoints">
<property name="order" value="7214" />
<property name="enabled" value="${ldap.enable}" />
<property name="actionController">
<bean class="org.olat.core.gui.control.creator.AutoCreator" scope="prototype">
<property name="className" value="org.olat.ldap.ui.LDAPAdminController"/>
</bean>
</property>
<property name="navigationKey" value="ldapadmin" />
<property name="i18nActionKey" value="admin.menu.ldap"/>
<property name="i18nDescriptionKey" value="admin.menu.ldap.desc"/>
<property name="translationPackage" value="org.olat.ldap.ui"/>
<property name="extensionPoints">
<list>
<value>org.olat.admin.SystemAdminMainController</value>
</list>
</property>
<property name="parentTreeNodeIdentifier" value="sysconfigParent" />
</bean>
<!-- The LDAP manager. If you provide your own, you must implement the org.olat.ldap.LDAPLoginManager interface --> <!-- The LDAP manager. If you provide your own, you must implement the org.olat.ldap.LDAPLoginManager interface -->
<bean id="org.olat.ldap.LDAPLoginManager" class="org.olat.ldap.LDAPLoginManagerImpl"> <bean id="org.olat.ldap.LDAPLoginManager" class="org.olat.ldap.LDAPLoginManagerImpl">
<constructor-arg index="0" ref="coordinatorManager"/> <constructor-arg index="0" ref="coordinatorManager"/>
......
...@@ -80,7 +80,7 @@ public class LDAPAdminController extends BasicController implements GenericEvent ...@@ -80,7 +80,7 @@ public class LDAPAdminController extends BasicController implements GenericEvent
private Link syncOneUserLink; private Link syncOneUserLink;
private Link removeFallBackAuthsLink; private Link removeFallBackAuthsLink;
protected LDAPAdminController(UserRequest ureq, WindowControl control) { public LDAPAdminController(UserRequest ureq, WindowControl control) {
super(ureq, control); super(ureq, control);
ldapLoginManager = (LDAPLoginManager) CoreSpringFactory.getBean(LDAPLoginManager.class); ldapLoginManager = (LDAPLoginManager) CoreSpringFactory.getBean(LDAPLoginManager.class);
......
/**
* <a href="http://www.openolat.org">
* OpenOLAT - Online Learning and Training</a><br>
* <p>
* Licensed under the Apache License, Version 2.0 (the "License"); <br>
* you may not use this file except in compliance with the License.<br>
* You may obtain a copy of the License at the
* <a href="http://www.apache.org/licenses/LICENSE-2.0">Apache homepage</a>
* <p>
* Unless required by applicable law or agreed to in writing,<br>
* software distributed under the License is distributed on an "AS IS" BASIS, <br>
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. <br>
* See the License for the specific language governing permissions and <br>
* limitations under the License.
* <p>
* Initial code contributed and copyrighted by<br>
* frentix GmbH, http://www.frentix.com
* <p>
*/
package org.olat.ldap.ui;
import java.util.Locale;
import org.olat.admin.SystemAdminMainController;
import org.olat.core.extensions.AbstractExtension;
import org.olat.core.extensions.Extension;
import org.olat.core.extensions.ExtensionElement;
import org.olat.core.extensions.action.GenericActionExtension;
import org.olat.core.extensions.helpers.ExtensionElements;
import org.olat.core.gui.UserRequest;
import org.olat.core.gui.control.Controller;
import org.olat.core.gui.control.WindowControl;
import org.olat.core.gui.translator.Translator;
import org.olat.core.util.Util;
import org.olat.ldap.LDAPLoginModule;
/**
* Description:<br>
* The LDAP admin extension launches the LDAPAdminController to manage the LDAP
* connection
*
* <P>
* Initial Date: 21.08.2008 <br>
*
* @author gnaegi
*/
public class LDAPAdminExtension extends AbstractExtension implements Extension {
/**
* @see org.olat.core.configuration.AbstractConfigOnOff#isEnabled()
*/
@Override
public boolean isEnabled() {
return LDAPLoginModule.isLDAPEnabled();
}
private ExtensionElements elements = new ExtensionElements();
/**
* Constructor to create an extension that registers in the admin site
*/
public LDAPAdminExtension() {
elements.putExtensionElement(SystemAdminMainController.class.getName(), new GenericActionExtension() {
/**
* @see org.olat.core.extensions.action.ActionExtension#getActionText(java.util.Locale)
*/
public String getActionText(Locale loc) {
Translator transl = Util.createPackageTranslator(LDAPAdminExtension.class, loc);
return transl.translate("admin.menu.ldap");
}
/**
* @see org.olat.core.extensions.action.ActionExtension#getDescription(java.util.Locale)
*/
public String getDescription(Locale loc) {
Translator transl = Util.createPackageTranslator(LDAPAdminExtension.class, loc);
return transl.translate("admin.menu.ldap.desc");
}
/**
* @see org.olat.core.extensions.action.ActionExtension#createController(org.olat.core.gui.UserRequest,
* org.olat.core.gui.control.WindowControl, java.lang.Object)
*/
public Controller createController(UserRequest ureq, WindowControl control, @SuppressWarnings("unused")
Object arg) {
return new LDAPAdminController(ureq, control);
}
});
}
/**
* @see org.olat.core.extensions.Extension#getExtensionFor(java.lang.String)
*/
public ExtensionElement getExtensionFor(String extensionPoint) {
if (isEnabled()) return elements.getExtensionElement(extensionPoint);
else return null;
}
}
...@@ -909,11 +909,7 @@ ...@@ -909,11 +909,7 @@
</property> </property>
<property name="order" value="35" /> <property name="order" value="35" />
</bean> </bean>
<bean class="org.olat.ldap.ui.LDAPAdminExtension">
<property name="order" value="36" />
</bean>
<!-- portfolioContext.xml : property name="order" value="37" --> <!-- portfolioContext.xml : property name="order" value="37" -->
<!-- template for extension of type GenericActionExtension <!-- template for extension of type GenericActionExtension
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment