本文整理了Java中org.apache.directory.ldap.client.api.LdapConnection.delete()
方法的一些代码示例,展示了LdapConnection.delete()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LdapConnection.delete()
方法的具体详情如下:
包路径:org.apache.directory.ldap.client.api.LdapConnection
类名称:LdapConnection
方法名:delete
[英]deletes the entry with the given DN
[中]删除具有给定DN的条目
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
{
return connection.delete( deleteRequest );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public void delete( Dn dn ) throws LdapException
{
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void delete( Dn dn ) throws LdapException
{
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
{
return connection.delete( deleteRequest );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public void delete( String dn ) throws LdapException
{
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public DeleteResponse delete( DeleteRequest deleteRequest ) throws LdapException
{
return connection.delete( deleteRequest );
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public void delete( String dn ) throws LdapException
{
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public void delete( Dn dn ) throws LdapException
{
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public void delete( String dn ) throws LdapException
{
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.fortress/fortress-core
/**
* Delete exiting ldap entry from the directory. Do not add audit context.
*
* @param connection handle to ldap connection.
* @param dn contains distinguished node of entry targeted for removal..
* @throws LdapException in the event system error occurs.
*/
protected void delete( LdapConnection connection, String dn ) throws LdapException
{
COUNTERS.incrementDelete();
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.client.ldap/ldap-client-api
/**
* deletes the entry with the given DN
*
* @param dn the target entry's DN
* @throws LdapException If the DN is not valid or if the deletion failed
*/
public DeleteResponse delete( DN dn ) throws LdapException
{
DeleteRequest deleteRequest = new DeleteRequest( dn );
return delete( deleteRequest );
}
代码示例来源:origin: org.apache.kerby/ldap-backend
/**
* {@inheritDoc}
*/
@Override
protected void doDeleteIdentity(String principalName) throws KrbException {
try {
Dn dn = toDn(principalName);
connection.delete(dn);
} catch (LdapException e) {
LOG.error("Error occurred while deleting identity: " + principalName);
throw new KrbException("Failed to remove identity", e);
}
}
代码示例来源:origin: apache/directory-kerby
/**
* {@inheritDoc}
*/
@Override
protected void doDeleteIdentity(String principalName) throws KrbException {
try {
Dn dn = toDn(principalName);
connection.delete(dn);
} catch (LdapException e) {
LOG.error("Error occurred while deleting identity: " + principalName);
throw new KrbException("Failed to remove identity", e);
}
}
代码示例来源:origin: org.apache.directory.fortress/fortress-core
/**
* Delete exiting ldap entry from the directory. Add audit context. This method will call modify prior to
* delete which will
* force corresponding audit record to be written to slapd access log.
*
* @param connection handle to ldap connection.
* @param dn contains distinguished node of entry targeted for removal..
* @param entity contains audit context.
* @throws LdapException in the event system error occurs.
*/
protected void delete( LdapConnection connection, String dn, FortEntity entity ) throws LdapException
{
COUNTERS.incrementDelete();
List<Modification> mods = new ArrayList<Modification>();
audit( mods, entity );
if ( mods.size() > 0 )
{
modify( connection, dn, mods );
}
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.fortress/fortress-core
/**
* Delete exiting ldap entry from the directory. Add audit context. This method will call modify prior to
* delete which will
* force corresponding audit record to be written to slapd access log.
*
* @param connection handle to ldap connection.
* @param dn contains distinguished node of entry targeted for removal..
* @param entity contains audit context.
* @throws LdapException in the event system error occurs.
*/
protected void delete( LdapConnection connection, Dn dn, FortEntity entity ) throws LdapException
{
COUNTERS.incrementDelete();
List<Modification> mods = new ArrayList<Modification>();
audit( mods, entity );
if ( mods.size() > 0 )
{
modify( connection, dn, mods );
}
connection.delete( dn );
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-api
/**
* {@inheritDoc}
*/
@Override
public DeleteResponse delete( DeleteRequest deleteRequest )
{
LdapConnection connection = null;
try
{
connection = connectionPool.getConnection();
return connection.delete( deleteRequest );
}
catch ( LdapException e )
{
throw new LdapRuntimeException( e );
}
finally
{
returnLdapConnection( connection );
}
}
代码示例来源:origin: org.apache.directory.api/api-all
/**
* {@inheritDoc}
*/
@Override
public DeleteResponse delete( DeleteRequest deleteRequest )
{
LdapConnection connection = null;
try
{
connection = connectionPool.getConnection();
return connection.delete( deleteRequest );
}
catch ( LdapException e )
{
throw new LdapRuntimeException( e );
}
finally
{
returnLdapConnection( connection );
}
}
代码示例来源:origin: org.apache.directory.api/api-ldap-client-all
/**
* {@inheritDoc}
*/
@Override
public DeleteResponse delete( DeleteRequest deleteRequest )
{
LdapConnection connection = null;
try
{
connection = connectionPool.getConnection();
return connection.delete( deleteRequest );
}
catch ( LdapException e )
{
throw new LdapRuntimeException( e );
}
finally
{
returnLdapConnection( connection );
}
}
代码示例来源:origin: org.apache.directory.client.ldap/ldap-client-api
/**
* deletes the entry with the given DN
*
* @param dn the target entry's DN as a String
* @throws LdapException If the DN is not valid or if the deletion failed
*/
public DeleteResponse delete( String dn ) throws LdapException
{
try
{
DeleteRequest deleteRequest = new DeleteRequest( new DN( dn ) );
return delete( deleteRequest );
}
catch ( InvalidNameException e )
{
LOG.error( e.getMessage(), e );
throw new LdapException( e.getMessage(), e );
}
}
代码示例来源:origin: org.openengsb.infrastructure/org.openengsb.infrastructure.ldap
private void deleteLeaf(Dn dn) {
DeleteRequest deleteRequest = new DeleteRequestImpl();
deleteRequest.setName(dn);
LdapResult result;
try {
result = connection.delete(deleteRequest).getLdapResult();
} catch (LdapException e) {
throw new LdapDaoException(e);
}
if (result.getResultCode() != ResultCodeEnum.SUCCESS) {
throw new LdapDaoException(result.getDiagnosticMessage());
}
}
内容来源于网络,如有侵权,请联系作者删除!