本文整理汇总了Java中org.apache.directory.api.ldap.model.schema.AttributeType.getNames方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeType.getNames方法的具体用法?Java AttributeType.getNames怎么用?Java AttributeType.getNames使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.directory.api.ldap.model.schema.AttributeType
的用法示例。
在下文中一共展示了AttributeType.getNames方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: areCompatible
import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
* Check that the upId is either a name or the OID of a given AT
*/
private boolean areCompatible( String id, AttributeType attributeType )
{
// First, get rid of the options, if any
int optPos = id.indexOf( ';' );
String idNoOption = id;
if ( optPos != -1 )
{
idNoOption = id.substring( 0, optPos );
}
// Check that we find the ID in the AT names
for ( String name : attributeType.getNames() )
{
if ( name.equalsIgnoreCase( idNoOption ) )
{
return true;
}
}
// Not found in names, check the OID
return Oid.isOid( id ) && attributeType.getOid().equals( id );
}
示例2: removeMappingFor
import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
* Remove the AttributeType normalizer from the OidNormalizer map
*/
@Override
public void removeMappingFor( AttributeType attributeType ) throws LdapException
{
if ( attributeType == null )
{
return;
}
oidNormalizerMap.remove( attributeType.getOid() );
// We also have to remove all the short names for this attribute
for ( String name : attributeType.getNames() )
{
oidNormalizerMap.remove( Strings.toLowerCaseAscii( name ) );
}
}
示例3: addMappingFor
import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
* {@inheritDoc}
*/
@Override
public void addMappingFor( AttributeType attributeType ) throws LdapException
{
MatchingRule equality = attributeType.getEquality();
OidNormalizer oidNormalizer;
String oid = attributeType.getOid();
if ( equality == null )
{
LOG.debug( "Attribute {} does not have an EQUALITY MatchingRule : using NoopNormalizer", attributeType
.getName() );
oidNormalizer = new OidNormalizer( oid, new NoOpNormalizer( attributeType.getOid() ) );
}
else
{
oidNormalizer = new OidNormalizer( oid, equality.getNormalizer() );
}
oidNormalizerMap.put( oid, oidNormalizer );
// Also inject the attributeType's short names in the map
for ( String name : attributeType.getNames() )
{
oidNormalizerMap.put( Strings.toLowerCaseAscii( name ), oidNormalizer );
}
}