本文整理了Java中com.novell.ldap.LDAPConnection.modify()
方法的一些代码示例,展示了LDAPConnection.modify()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.modify()
方法的具体详情如下:
包路径:com.novell.ldap.LDAPConnection
类名称:LDAPConnection
方法名:modify
[英]Synchronously makes a single change to an existing entry in the directory.
For example, this modify method changes the value of an attribute, adds a new attribute value, or removes an existing attribute value.
The LDAPModification object specifies both the change to be made and the LDAPAttribute value to be changed.
If the request fails with LDAPException#CONNECT_ERROR, it is indeterminate whether or not the server made the modification.
[中]同步地对目录中的现有条目进行单个更改。
例如,此修改方法更改属性值、添加新属性值或删除现有属性值。
LDAPModification对象指定要进行的更改和要更改的LDAPAttribute值。
如果请求失败并出现LDAPException#CONNECT_错误,则无法确定服务器是否进行了修改。
代码示例来源:origin: com.novell.ldap/jldap
modify(dn, mods, cons);
return;
代码示例来源:origin: com.novell.ldap/jldap
/**
* Synchronously makes a single change to an existing entry in the
* directory.
*
* <p>For example, this modify method changes the value of an attribute,
* adds a new attribute value, or removes an existing attribute value. </p>
*
* <p>The LDAPModification object specifies both the change to be made and
* the LDAPAttribute value to be changed.</p>
*
* <p>If the request fails with {@link LDAPException#CONNECT_ERROR},
* it is indeterminate whether or not the server made the modification.</p>
*
* @param dn The distinguished name of the entry to modify.
*<br><br>
* @param mod A single change to be made to the entry.
*
* @exception LDAPException A general exception which includes an error
* message and an LDAP error code.
*/
public void modify( String dn,
LDAPModification mod)
throws LDAPException
{
modify(dn, mod, defSearchCons);
return;
}
代码示例来源:origin: com.novell.ldap/jldap
/**
*
* Synchronously makes a set of changes to an existing entry in the
* directory.
*
* <p>For example, this modify method changes attribute values, adds
* new attribute values, or removes existing attribute values.</p>
*
* <p>Because the server applies all changes in an LDAPModification array
* atomically, the application can expect that no changes
* have been performed if an error is returned.
* If the request fails with {@link LDAPException#CONNECT_ERROR},
* it is indeterminate whether or not the server made the modifications.</p>
*
* @param dn Distinguished name of the entry to modify.
*<br><br>
* @param mods The changes to be made to the entry.
*
* @exception LDAPException A general exception which includes an error
* message and an LDAP error code.
*/
public void modify( String dn,
LDAPModification[] mods)
throws LDAPException
{
modify(dn, mods, defSearchCons);
return;
}
代码示例来源:origin: com.novell.ldap/jldap
throws LDAPException
return modify(dn, mod, queue, defSearchCons);
代码示例来源:origin: com.novell.ldap/jldap
throws LDAPException
return modify(dn, mods, queue, defSearchCons);
代码示例来源:origin: com.novell.ldap/jldap
return modify(dn, mods, queue, cons);
代码示例来源:origin: stackoverflow.com
LDAPConnection myCon = new LDAPConnection("localhost",389);
LDAPModificationSet mods = new LDAPModificationSet();
mods.add(LDAPModification.DELETE, new LDAPAttribute("notifyTo"));
myCon.modify("uid=test1, ou=People, o=domain.com, o=isp", mods);
代码示例来源:origin: com.novell.ldap/jldap
/**
* Synchronously makes a single change to an existing entry in the
* directory.
*
* @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#modify(java.lang.String, com.novell.ldap.LDAPModification)">
com.novell.ldap.LDAPConnection.modify(String, LDAPModification)</a>
*/
public void modify(String dn, LDAPModification mod)
throws LDAPException
{
try {
conn.modify( dn, mod.getWrappedObject());
} catch( com.novell.ldap.LDAPException ex) {
if( ex instanceof com.novell.ldap.LDAPReferralException) {
throw new LDAPReferralException(
(com.novell.ldap.LDAPReferralException)ex);
} else {
throw new LDAPException( ex);
}
}
return;
}
代码示例来源:origin: com.novell.ldap/jldap
/**
*
* Synchronously makes a set of changes to an existing entry in the
* directory.
*
* @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#modify(java.lang.String, com.novell.ldap.LDAPModification[]">
com.novell.ldap.LDAPConnection.modify(String,
LDAPModification[])</a>
*/
public void modify(String dn, LDAPModification[] mods)
throws LDAPException
{
try {
com.novell.ldap.LDAPModification[] lmods =
new com.novell.ldap.LDAPModification[mods.length];
for( int i = 0; i< mods.length; i++) {
lmods[i] = mods[i].getWrappedObject();
}
conn.modify( dn, lmods);
} catch( com.novell.ldap.LDAPException ex) {
if( ex instanceof com.novell.ldap.LDAPReferralException) {
throw new LDAPReferralException(
(com.novell.ldap.LDAPReferralException)ex);
} else {
throw new LDAPException( ex);
}
}
return;
}
代码示例来源:origin: com.novell.ldap/jldap
modify(dn, mods, null, cons);
代码示例来源:origin: com.novell.ldap/jldap
/**
*
* Synchronously makes a single change to an existing entry in the
* directory, using the specified constraints.
*
* @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#modify(java.lang.String, com.novell.ldap.LDAPModification,
com.novell.ldap.LDAPConstraints)">
com.novell.ldap.LDAPConnection.modify(String, LDAPModification,
LDAPConstraints)</a>
*/
public void modify(String dn,
LDAPModification mod,
LDAPConstraints cons)
throws LDAPException
{
try {
conn.modify( dn,
mod.getWrappedObject(),
cons.getWrappedObject());
} catch( com.novell.ldap.LDAPException ex) {
if( ex instanceof com.novell.ldap.LDAPReferralException) {
throw new LDAPReferralException(
(com.novell.ldap.LDAPReferralException)ex);
} else {
throw new LDAPException( ex);
}
}
return;
}
代码示例来源:origin: com.novell.ldap/jldap
lmods[i] = mods[i].getWrappedObject();
conn.modify( dn, lmods, cons.getWrappedObject());
代码示例来源:origin: com.novell.ldap/jldap
/**
*
* Asynchronously makes a single change to an existing entry in the
* directory.
*
* @see <a href="../../../../api/com/novell/ldap/LDAPConnection.html#modify(java.lang.String, com.novell.ldap.LDAPModification,
com.novell.ldap.LDAPResponseQueue)">
com.novell.ldap.LDAPConnection.modify(String, LDAPModification,
LDAPResponseQueue)</a>
*/
public LDAPResponseQueue modify(String dn,
LDAPModification mod,
LDAPResponseQueue queue)
throws LDAPException
{
try {
return new LDAPResponseQueue(
conn.modify( dn,
mod.getWrappedObject(),
queue.getWrappedObject()));
} catch( com.novell.ldap.LDAPException ex) {
if( ex instanceof com.novell.ldap.LDAPReferralException) {
throw new LDAPReferralException(
(com.novell.ldap.LDAPReferralException)ex);
} else {
throw new LDAPException( ex);
}
}
}
代码示例来源:origin: com.novell.ldap/jldap
conn.modify( dn, lmods, queue.getWrappedObject()));
} catch( com.novell.ldap.LDAPException ex) {
if( ex instanceof com.novell.ldap.LDAPReferralException) {
代码示例来源:origin: com.novell.ldap/jldap
conn.modify( dn,
mod.getWrappedObject(),
queue.getWrappedObject(),
代码示例来源:origin: com.novell.ldap/jldap
conn.modify( dn,
lmods,
queue.getWrappedObject(),
内容来源于网络,如有侵权,请联系作者删除!