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


Java AttributeType.getName方法代码示例

本文整理汇总了Java中org.apache.directory.api.ldap.model.schema.AttributeType.getName方法的典型用法代码示例。如果您正苦于以下问题:Java AttributeType.getName方法的具体用法?Java AttributeType.getName怎么用?Java AttributeType.getName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.directory.api.ldap.model.schema.AttributeType的用法示例。


在下文中一共展示了AttributeType.getName方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getUpId

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
 * Get the UpId if it is null.
 * 
 * @param upId The ID
 */
private String getUpId( String upId, AttributeType attributeType )
{
    String normUpId = Strings.trim( upId );

    if ( attributeType == null )
    {
        if ( Strings.isEmpty( normUpId ) )
        {
            String message = I18n.err( I18n.ERR_04458 );
            LOG.error( message );
            throw new IllegalArgumentException( message );
        }

        return upId;
    }
    else if ( Strings.isEmpty( normUpId ) )
    {
        String id = attributeType.getName();

        if ( Strings.isEmpty( id ) )
        {
            id = attributeType.getOid();
        }

        return id;
    }
    else
    {
        return upId;
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:37,代码来源:DefaultEntry.java

示例2: LessEqNode

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
 * Creates a new LessEqNode object.
 * 
 * @param attributeType the attributeType
 * @param value the value to test for
 * @throws LdapSchemaException If the AttributeType does not have an ORDERING MatchingRule
 */
public LessEqNode( AttributeType attributeType, Value value ) throws LdapSchemaException
{
    super( attributeType, value, AssertionType.LESSEQ );
    
    // Check if the AttributeType has an Ordering MR
    if ( ( attributeType != null ) && ( attributeType.getOrdering() == null ) )
    {
        throw new LdapSchemaException( "There is no ORDERING matchingRule for AttributeType " + attributeType.getName() );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:18,代码来源:LessEqNode.java

示例3: GreaterEqNode

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
 * Creates a new GreaterOrEqual object.
 * 
 * @param attributeType the attributeType
 * @param value the value to test for
 * @throws LdapSchemaException If the AttributeType does not have an ORDERING MatchingRule
 */
public GreaterEqNode( AttributeType attributeType, Value value ) throws LdapSchemaException
{
    super( attributeType, value, AssertionType.GREATEREQ );

    // Check if the AttributeType has an Ordering MR
    if ( ( attributeType != null ) && ( attributeType.getOrdering() == null ) )
    {
        throw new LdapSchemaException( "There is no ORDERING matchingRule for AttributeType " + attributeType.getName() );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:18,代码来源:GreaterEqNode.java

示例4: LeafNode

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
 * Creates a leaf node.
 * 
 * @param attributeType the attribute this node is based on
 * @param assertionType the type of this leaf node
 */
protected LeafNode( AttributeType attributeType, AssertionType assertionType )
{
    super( assertionType );
    this.attributeType = attributeType;

    if ( attributeType != null )
    {
        this.attribute = attributeType.getName();
    }
    else
    {
        throw new NullPointerException( "Cannot create a Node with a null Attribute" );
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:21,代码来源:LeafNode.java

示例5: setAttributeType

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
 * Sets the attributeType this leaf node is based on.
 * 
 * @param attributeType the attributeType that is asserted by this filter node
 */
public void setAttributeType( AttributeType attributeType )
{
    this.attributeType = attributeType;

    if ( attributeType != null )
    {
        attribute = attributeType.getName();
    }
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:15,代码来源:LeafNode.java

示例6: setUpIdInternal

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
private void setUpIdInternal( String upId, String newId, AttributeType attributeType )
{
    if ( attributeType == null )
    {
        if ( this.attributeType == null )
        {
            this.upId = upId;
            this.id = newId;

            // Compute the hashCode
            rehash();

            return;
        }
        else
        {
            if ( areCompatible( newId, this.attributeType ) )
            {
                this.upId = upId;
                this.id = this.attributeType.getOid();

                // Compute the hashCode
                rehash();

                return;
            }
            else
            {
                return;
            }
        }
    }

    if ( Strings.isEmpty( newId ) )
    {
        this.attributeType = attributeType;
        this.upId = attributeType.getName();
        this.id = attributeType.getOid();

        // Compute the hashCode
        rehash();

        return;
    }

    if ( areCompatible( newId, attributeType ) )
    {
        this.upId = upId;
        this.id = attributeType.getOid();
        this.attributeType = attributeType;

        // Compute the hashCode
        rehash();

        return;
    }

    throw new IllegalArgumentException( "ID '" + id + "' and AttributeType '" + attributeType.getName()
        + "' are not compatible " );
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:61,代码来源:DefaultAttribute.java

示例7: apply

import org.apache.directory.api.ldap.model.schema.AttributeType; //导入方法依赖的package包/类
/**
 * {@inheritDoc}
 */
@Override
public void apply( AttributeType attributeType ) throws LdapInvalidAttributeValueException
{
    if ( attributeType == null )
    {
        throw new IllegalArgumentException( "The AttributeType parameter should not be null" );
    }

    this.attributeType = attributeType;
    this.id = attributeType.getOid();

    if ( Strings.isEmpty( this.upId ) )
    {
        this.upId = attributeType.getName();
    }
    else
    {
        if ( !areCompatible( this.upId, attributeType ) )
        {
            this.upId = attributeType.getName();
        }
    }

    if ( values != null )
    {
        Set<Value> newValues = new LinkedHashSet<>( values.size() );

        for ( Value value : values )
        {
            if ( value.isSchemaAware() )
            {
                newValues.add( value );
            }
            else
            {
                if ( value.isHumanReadable() )
                {
                    newValues.add( new Value( attributeType, value.getValue() ) );
                }
                else
                {
                    newValues.add( new Value( attributeType, value.getBytes() ) );
                }
            }
        }

        values = newValues;
    }

    isHR = attributeType.getSyntax().isHumanReadable();

    // Compute the hashCode
    rehash();
}
 
开发者ID:apache,项目名称:directory-ldap-api,代码行数:58,代码来源:DefaultAttribute.java


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