org.apache.directory.ldap.client.api.LdapConnection.isControlSupported()方法的使用及代码示例

x33g5p2x  于2022-01-24 转载在 其他  
字(1.9k)|赞(0)|评价(0)|浏览(75)

本文整理了Java中org.apache.directory.ldap.client.api.LdapConnection.isControlSupported()方法的一些代码示例,展示了LdapConnection.isControlSupported()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LdapConnection.isControlSupported()方法的具体详情如下:
包路径:org.apache.directory.ldap.client.api.LdapConnection
类名称:LdapConnection
方法名:isControlSupported

LdapConnection.isControlSupported介绍

[英]Checks if a control with the given OID is supported.
[中]检查是否支持具有给定OID的控件。

代码示例

代码示例来源:origin: org.apache.directory.api/api-all

/**
 * {@inheritDoc}
 */
@Override
public boolean isControlSupported( String controlOID ) throws LdapException
{
  return connection.isControlSupported( controlOID );
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-api

/**
 * {@inheritDoc}
 */
@Override
public boolean isControlSupported( String controlOID ) throws LdapException
{
  return connection.isControlSupported( controlOID );
}

代码示例来源:origin: org.apache.directory.api/api-ldap-client-all

/**
 * {@inheritDoc}
 */
@Override
public boolean isControlSupported( String controlOID ) throws LdapException
{
  return connection.isControlSupported( controlOID );
}

代码示例来源:origin: org.apache.directory.client.ldap/ldap-client-api

/**
 * deletes the entry with the given DN, and all its children
 *  
 * @param dn the target entry's DN
 * @return operation's response
 * @throws LdapException If the DN is not valid or if the deletion failed
 */
public DeleteResponse deleteTree( DN dn ) throws LdapException
{
  String treeDeleteOid = "1.2.840.113556.1.4.805";
  if ( isControlSupported( treeDeleteOid ) )
  {
    DeleteRequest delRequest = new DeleteRequest( dn );
    delRequest.add( new ControlImpl( treeDeleteOid ) );
    return delete( delRequest );
  }
  else
  {
    String msg = "The subtreeDelete control (1.2.840.113556.1.4.805) is not supported by the server\n" +
      " The deletion has been aborted";
    LOG.error( msg );
    throw new LdapException( msg );
  }
}

代码示例来源:origin: org.apache.directory.client.ldap/ldap-client-api

DN newDn = new DN( dn );
if ( isControlSupported( treeDeleteOid ) )

相关文章