本文整理了Java中com.unboundid.ldap.sdk.LDAPConnection.getSchema()
方法的一些代码示例,展示了LDAPConnection.getSchema()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。LDAPConnection.getSchema()
方法的具体详情如下:
包路径:com.unboundid.ldap.sdk.LDAPConnection
类名称:LDAPConnection
方法名:getSchema
[英]Retrieves the directory server schema definitions, using the subschema subentry DN contained in the server's root DSE. For directory servers containing a single schema, this should be sufficient for all purposes. For servers with multiple schemas, it may be necessary to specify the DN of the target entry for which to obtain the associated schema.
[中]使用服务器根DSE中包含的子模式子项DN检索目录服务器架构定义。对于包含单个架构的目录服务器,这对于所有目的都应该足够了。对于具有多个架构的服务器,可能需要指定要获取关联架构的目标条目的DN。
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
/**
* Retrieves the schema from the provided connection. If the retrieved schema
* matches schema that's already in use by other connections, the common
* schema will be used instead of the newly-retrieved version.
*
* @param c The connection for which to retrieve the schema.
*
* @return The schema retrieved from the given connection, or a cached
* schema if it matched a schema that was already in use.
*
* @throws LDAPException If a problem is encountered while retrieving or
* parsing the schema.
*/
private static Schema getCachedSchema(final LDAPConnection c)
throws LDAPException
{
final Schema s = c.getSchema();
synchronized (SCHEMA_SET)
{
return SCHEMA_SET.addAndGet(s);
}
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
/**
* Retrieves the schema from the provided connection. If the retrieved schema
* matches schema that's already in use by other connections, the common
* schema will be used instead of the newly-retrieved version.
*
* @param c The connection for which to retrieve the schema.
*
* @return The schema retrieved from the given connection, or a cached
* schema if it matched a schema that was already in use.
*
* @throws LDAPException If a problem is encountered while retrieving or
* parsing the schema.
*/
private static Schema getCachedSchema(final LDAPConnection c)
throws LDAPException
{
final Schema s = c.getSchema();
synchronized (SCHEMA_SET)
{
return SCHEMA_SET.addAndGet(s);
}
}
代码示例来源:origin: com.nimbusds/common
/**
* Returns the schema definition for the specified object class, in the
* format described in RFC 4512 section 4.1.1.
*
* @param ldapCon The LDAP connection. Must not be {@code null}.
* @param objectClass The object class. Must not be {@code null}.
*
* @return The object class definition, or an error message if an
* exception is encountered.
*/
public static String dumpObjectClassDefinition(final LDAPConnection ldapCon,
final String objectClass) {
Schema schema;
try {
schema = ldapCon.getSchema();
} catch (LDAPException e) {
return e.getMessage();
}
if (schema == null) {
return "LDAP schema not available (check permissions)";
}
ObjectClassDefinition objClassDef = schema.getObjectClass(objectClass);
if (objClassDef == null) {
return "No such objectClass: " + objectClass;
}
return objClassDef.toString();
}
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
final Schema schema = conn.getSchema(entryDN);
releaseConnection(conn);
return schema;
final Schema schema = newConn.getSchema(entryDN);
releaseConnection(newConn);
return schema;
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
final Schema schema = conn.getSchema(entryDN);
releaseConnection(conn);
return schema;
final Schema schema = newConn.getSchema(entryDN);
releaseConnection(newConn);
return schema;
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
final Schema schema = connection.getSchema();
if (schema != null)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
final Schema schema = connection.getSchema();
if (schema != null)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
final Schema schema = connection.getSchema();
if (schema != null)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
schema = connection.getSchema();
connection.close();
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
try
schema = conn.getSchema();
if (schema == null)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
final Schema schema = c.getSchema();
if (schema != null)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-minimal-edition
final Schema schema = c.getSchema();
if (schema != null)
代码示例来源:origin: com.unboundid/unboundid-ldapsdk-commercial-edition
final Schema schema = c.getSchema();
if (schema != null)
内容来源于网络,如有侵权,请联系作者删除!