资源简介
java连接LDAP实例和jar包,里面包含ssl连接和更改LDAP属性的例子,公参考

代码片段和文件信息
/*******************************************************************************
* $Novell: AddEntry.javav 1.15 2003/08/21 11:28:45 $
* Copyright (c) 2000-2003 Novell Inc. All Rights Reserved.
*
* THIS WORK IS SUBJECT TO U.S. AND INTERNATIONAL COPYRIGHT LAWS AND
* TREATIES. USE AND REDISTRIBUTION OF THIS WORK IS SUBJECT TO THE LICENSE
* AGREEMENT ACCOMPANYING THE SOFTWARE DEVELOPMENT KIT (SDK) THAT CONTAINS
* THIS WORK. PURSUANT TO THE SDK LICENSE AGREEMENT NOVELL HEREBY GRANTS TO
* DEVELOPER A ROYALTY-FREE NON-EXCLUSIVE LICENSE TO INCLUDE NOVELL‘S SAMPLE
* CODE IN ITS PRODUCT. NOVELL GRANTS DEVELOPER WORLDWIDE DISTRIBUTION RIGHTS
* TO MARKET DISTRIBUTE OR SELL NOVELL‘S SAMPLE CODE AS A COMPONENT OF
* DEVELOPER‘S PRODUCTS. NOVELL SHALL HAVE NO OBLIGATIONS TO DEVELOPER OR
* DEVELOPER‘S CUSTOMERS WITH RESPECT TO THIS CODE.
*
* $name: AddEntry.java
* $description: AddEntry adds an entry to the directory. First it creates
* each attribute of the entry adds it to the attribute
* set and then uses the DN and the newly created attribute
* set to create an LDAPEntry entry newEntry. Finally it calls
* the LDAPConnection add method to add the entry into the
* directory.
******************************************************************************/
import com.novell.ldap.LDAPAttribute;
import com.novell.ldap.LDAPAttributeSet;
import com.novell.ldap.LDAPEntry;
import com.novell.ldap.LDAPConnection;
import com.novell.ldap.LDAPException;
import java.io.UnsupportedEncodingException;
public class AddEntry
{
public static void main( String[] args )
{
if (args.length != 4) {
System.err.println(“Usage: java AddEntry “
+ “ “);
System.err.println(“Example: java AddEntry Acme.com“
+ “ \“cn=admino=Acme\“ secret \“ou=Saleso=Acme\““);
System.exit(1);
}
int ldapPort = LDAPConnection.DEFAULT_PORT;
int ldapVersion = LDAPConnection.LDAP_V3;
String ldapHost = args[0];
String loginDN = args[1];
String password = args[2];
String containerName = args[3];
LDAPConnection lc = new LDAPConnection();
LDAPAttribute attribute = null;
LDAPAttributeSet attributeSet = new LDAPAttributeSet();
/* To Add an entry to the directory
* - Create the attributes of the entry and add them to an attribute set
* - Specify the DN of the entry to be created
* - Create an LDAPEntry object with the DN and the attribute set
* - Call the LDAPConnection add method to add it to the directory
*/
attributeSet.add( new LDAPAttribute(
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2013-11-21 06:14 novell-jldap-devel-2013.08.30.1433-xplat\
目录 0 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\
文件 1464 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldaprootdse.bat
文件 1111 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldaprootdse
文件 1118 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldapschema
文件 1114 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldapsearch
文件 1467 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldapsearch.bat
文件 967 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\getpath.bat
文件 1122 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldappassword
文件 1471 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldapschema.bat
文件 1475 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\bin\jldappassword.bat
目录 0 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\lib\
文件 432436 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\lib\ldap.jar
文件 44107 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\lib\utilities.jar
目录 0 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\wars\
文件 579337 2009-10-16 15:53 novell-jldap-devel-2013.08.30.1433-xplat\wars\dsmlstream.war
文件 2303152 2009-10-16 15:53 novell-jldap-devel-2013.08.30.1433-xplat\wars\dsmldom.war
文件 2033 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\LICENSE
目录 0 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\
文件 4326 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\SetPassword.java
文件 5882 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\UrlSearch.java
文件 5637 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\LDAPSchemaDSMLSerialization.java
文件 20448 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\GetDSE.java
文件 3587 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\VerifyPassword.java
文件 8252 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\ModifyAttrs.java
文件 14325 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\ExtendSchema.java
文件 9348 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\ModifyTimeStamp.java
文件 5614 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\MD5Bind.java
目录 0 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\dsml_consumers\
文件 1678 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\dsml_consumers\DsmlClient.java
文件 3776 2013-08-30 09:03 novell-jldap-devel-2013.08.30.1433-xplat\samples\dsml_consumers\LDAPOperation.java
............此处省略101个文件信息
- 上一篇:使用JNA的jar包
- 下一篇:BBS系统,JSP做的
相关资源
- java串口通信全套完整代码-导入eclip
- jsonarray所必需的6个jar包.rar
- 三角网构TIN生成算法,Java语言实现
- java代码编写将excel数据导入到mysql数据
- Java写的cmm词法分析器源代码及javacc学
- JAVA JSP公司财务管理系统 源代码 论文
- JSP+MYSQL旅行社管理信息系统
- 推荐算法的JAVA实现
- 基于Java的酒店管理系统源码(毕业设
- java-图片识别 图片比较
- android毕业设计
- java23种设计模式+23个实例demo
- java Socket发送/接受报文
- JAVA828436
- java界面美化 提供多套皮肤直接使用
- 在线聊天系统(java代码)
- 基于Java的图书管理系统807185
- java中实现将页面数据导入Excel中
- java 企业销售管理系统
- java做的聊天系统(包括正规课程设计
- Java编写的qq聊天室
- 商店商品管理系统 JAVA写的 有界面
- JAVA开发聊天室程序
- 在linux系统下用java执行系统命令实例
- java期末考试试题两套(答案) 选择(
- JAVA3D编程示例(建模、交互)
- Java 文件加密传输
- java做的房产管理系统
- 基于jsp的bbs论坛 非常详细
- [免费]java实现有障碍物的贪吃蛇游戏
评论
共有 条评论