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

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


        String str = value.getString().trim();

        if ( str.length() == 0 )
        {
            return new StringValue( "" );
        }
        else if ( Character.isDigit( str.charAt( 0 ) ) )
        {
            // We do this test to avoid a lowerCasing which cost time
            return new StringValue( str );
        }
        else
        {
            return new StringValue( Strings.toLowerCase( str ) );
        }
    }
View Full Code Here


        {
            public Value<?> normalize( Value<?> value ) throws LdapException
            {
                if ( value.isHumanReadable() )
                {
                    return new StringValue( Strings.toLowerCase( value.getString() ) );
                }

                throw new IllegalStateException();
            }
           
View Full Code Here

       try
       {
           String normalized = PrepareString.normalize( value.getString(),
               PrepareString.StringType.DIRECTORY_STRING );
          
           return new StringValue( normalized );
       }
       catch ( IOException ioe )
       {
           throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
       }
View Full Code Here

        try
        {
            String normalized = PrepareString.normalize( value.getString(),
                PrepareString.StringType.CASE_IGNORE );
           
            return new StringValue( normalized );
        }
        catch ( IOException ioe )
        {
            throw new LdapInvalidAttributeValueException( ResultCodeEnum.INVALID_ATTRIBUTE_SYNTAX, I18n.err( I18n.ERR_04224, value ) );
        }
View Full Code Here

       try
       {
           String normalized = PrepareString.normalize( value.getString(),
               PrepareString.StringType.NUMERIC_STRING );
          
           return new StringValue( normalized );
       }
       catch ( IOException ioe )
       {
           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
       }
View Full Code Here

       try
       {
           String normalized = PrepareString.normalize( value.getString(),
               PrepareString.StringType.TELEPHONE_NUMBER );
          
           return new StringValue( normalized );
       }
       catch ( IOException ioe )
       {
           throw new LdapInvalidDnException( I18n.err( I18n.ERR_04224, value ) );
       }
View Full Code Here

     * @param upValue the user provided value of the Rdn
     * @throws LdapInvalidDnException if the Rdn is invalid
     */
    public Rdn( SchemaManager schemaManager, String upType, String upValue ) throws LdapInvalidDnException
    {
        addAVA( schemaManager, upType, upType, new StringValue( upValue ), new StringValue( upValue ) );

        upName = upType + '=' + upValue;

        if( schemaManager != null )
        {
View Full Code Here

                throw new LdapInvalidDnException( ResultCodeEnum.INVALID_DN_SYNTAX, message );
            }
           
            try
            {
                createAva( schemaManager, upType, new StringValue( 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 StringValue( upValue ) );
        }
    }
View Full Code Here

        {
            Attribute attr;

            if ( value == null )
            {
                value = new StringValue( ( String ) null );
                attr = new DefaultAttribute( id, ( Value<?> ) value );
            }
            else
            {
                attr = ( Attribute ) value;
View Full Code Here

     *
     * @param value the attribute value used in comparison.
     */
    public void setAssertionValue( String value )
    {
        this.attrVal = new StringValue( value );
    }
View Full Code Here

TOP

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

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.