本文整理汇总了Java中org.apache.directory.api.ldap.model.name.Dn.isSchemaAware方法的典型用法代码示例。如果您正苦于以下问题:Java Dn.isSchemaAware方法的具体用法?Java Dn.isSchemaAware怎么用?Java Dn.isSchemaAware使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.directory.api.ldap.model.name.Dn
的用法示例。
在下文中一共展示了Dn.isSchemaAware方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: DefaultEntry
import org.apache.directory.api.ldap.model.name.Dn; //导入方法依赖的package包/类
/**
* Creates a new instance of DefaultEntry, with a
* Dn and a list of IDs.
*
* @param schemaManager The reference to the schemaManager
* @param dn The Dn for this serverEntry. Can be null.
* @param elements The list of attributes to create.
* @throws LdapException If the provided Dn or Elements are invalid
*/
public DefaultEntry( SchemaManager schemaManager, Dn dn, Object... elements ) throws LdapException
{
DefaultEntry entry = ( DefaultEntry ) createEntry( schemaManager, elements );
this.dn = dn;
this.attributes = entry.attributes;
this.schemaManager = schemaManager;
if ( schemaManager != null )
{
if ( !dn.isSchemaAware() )
{
this.dn = new Dn( schemaManager, dn );
}
initObjectClassAT();
}
}
示例2: normalizeDn
import org.apache.directory.api.ldap.model.name.Dn; //导入方法依赖的package包/类
/**
* normalizes the given Dn if it was not already normalized
*
* @param dn the Dn to be normalized
*/
private Dn normalizeDn( Dn dn )
{
if ( !dn.isSchemaAware() )
{
try
{
// The dn must be normalized
return new Dn( schemaManager, dn );
}
catch ( LdapException ne )
{
LOG.warn( "The Dn '{}' cannot be normalized", dn );
return dn;
}
}
else
{
return dn;
}
}