Package org.apache.directory.shared.ldap.model.entry

Examples of org.apache.directory.shared.ldap.model.entry.BinaryValue


    /**
     * {@inheritDoc}
     */
    public Object normalizeByOid( String oid, byte[] value ) throws LdapException
    {
        return lookup( oid ).normalize( new BinaryValue( value ) );
    }
View Full Code Here


                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
            }
           
            try
            {
                createAva( schemaManager, upType, new BinaryValue( attributeType, upValue ) );
            }
            catch ( LdapInvalidAttributeValueException liave )
            {
                String message =  I18n.err( I18n.ERR_04188 );
                LOG.error( message );
                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
            }
        }
        else
        {
            createAva( upType, new BinaryValue( upValue ) );
        }
    }
View Full Code Here

     */
    public void setAssertionValue( byte[] value )
    {
        if ( value != null )
        {
            this.attrVal = new BinaryValue( value );
        }
        else
        {
            this.attrVal = null;
        }
View Full Code Here

        if ( current != 0 )
        {
            byte[] result = new byte[ current ];
            System.arraycopy( value, 0, result, 0, current );
           
            return new BinaryValue( result );
        }
        else
        {
            return new BinaryValue();
        }
    }
View Full Code Here

            {
                AttributeType attributeType = schemaManager.getAttributeType( attribute );
               
                if ( attributeType != null )
                {
                    return new EqualityNode( attributeType, new BinaryValue() );
                }
               
                else
                {
                    return null;
                }
            }
            else
            {
                return new EqualityNode( attribute, new BinaryValue() );
            }
        }
        else
        {
            // A substring or an equality node
View Full Code Here

            try
            {
                String unescaped = unescape( value );
                byte[] valBytes = unescaped.getBytes( "UTF-8" );
               
                return lookup( name ).normalize( new BinaryValue( valBytes ) );
            }
            catch ( UnsupportedEncodingException uee )
            {
                String message = I18n.err( I18n.ERR_04222 );
                LOG.error( message );
View Full Code Here

    {
        AttributeType attributeType = schemaManager.lookupAttributeTypeRegistry( name );
       
        if ( !attributeType.getSyntax().isHumanReadable() )
        {
            return lookup( name ).normalize( new BinaryValue( value ) );
        }
        else
        {
            try
            {
View Full Code Here

    /**
     * {@inheritDoc}
     */
    public Object normalizeByOid( String oid, byte[] value ) throws LdapException
    {
        return lookup( oid ).normalize( new BinaryValue( value ) );
    }
View Full Code Here

     * @param upValue The User Provided value
     * @param normValue The normalized value
     */
    public Ava(String upType, String normType, byte[] upValue, byte[] normValue) throws LdapInvalidDnException
    {
        this( upType, normType, new BinaryValue( upValue ), new BinaryValue( normValue ) );
    }
View Full Code Here

        else
        {
            int upValueLength = in.readInt();
            byte[] upValueBytes = new byte[upValueLength];
            in.readFully( upValueBytes );
            upValue = new BinaryValue( upValueBytes );

            int valueLength = in.readInt();
            byte[] normValueBytes = new byte[valueLength];
            in.readFully( normValueBytes );
            normValue = new BinaryValue( normValueBytes );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.entry.BinaryValue

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.