当前位置: 首页>>代码示例>>Java>>正文


Java AttributeType.getNames方法代码示例

本文整理汇总了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 );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:27,代码来源:DefaultAttribute.java

示例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 ) );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:20,代码来源:DefaultAttributeTypeRegistry.java

示例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 );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:30,代码来源:DefaultAttributeTypeRegistry.java


注:本文中的org.apache.directory.api.ldap.model.schema.AttributeType.getNames方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。