📄 ldapauthfactory.java
字号:
/*
* 创建日期 2005-10-18
*
* TODO 要更改此生成的文件的模板,请转至
* 窗口 - 首选项 - Java - 代码样式 - 代码模板
*/
package com.primeton.eos.fbframe.fbrole.crypt.impl;
import com.primeton.eos.fbframe.fbrole.crypt.api.LDAPAuth;
import com.primeton.eos.fbframe.config.*;
/**
* @author PengYuanlin
*
*/
public class LDAPAuthFactory {
private static LDAPAuth ldap ;
/**
* 不能在外部实例化 LDAPAuthFactory 类 。
*/
private LDAPAuthFactory() {
}
public static LDAPAuth getLDAPAuth()throws Exception{
if( ldap == null ){
String imp = FbFrameConfig.getInstance().getLDAPAuthImpl();
//如果没有设置,则使用EOS缺省提供的实现类 。
if( imp == null || imp.length() == 0)
throw new Exception("还没有注册LDAP Server ,需要到eosconfig.xml中去配置!具体的配置方式参考EOS的参考手册");
ldap = (LDAPAuth)Class.forName(imp).newInstance();
}
return ldap;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -