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

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


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


       
        boolean isHR = in.readBoolean();
       
        if ( isHR )
        {
            upValue = new StringValue( Unicode.readUTF(in) );
            normValue = new StringValue( Unicode.readUTF(in) );
        }
        else
        {
            int upValueLength = in.readInt();
            byte[] upValueBytes = new byte[upValueLength];
View Full Code Here

        try
        {
            if ( isHR )
            {
                Value<String> upValue = new StringValue( Unicode.readUTF(in) );
                Value<String> normValue = new StringValue( Unicode.readUTF(in) );
               
                Ava atav =
                    new Ava( upType, normType, upValue, normValue, upName );
               
                return atav;
View Full Code Here

            return null;
        }

        String strValue = value.getString();
       
        return new StringValue( strValue.trim().toUpperCase() );
    }
View Full Code Here

        {
            EntryAttribute attr;

            if ( value == null )
            {
                value = new StringValue( ( String ) null );
                attr = new DefaultEntryAttribute( id, ( Value<?> ) value );
            }
            else
            {
                attr = ( EntryAttribute ) value;
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

    {
        String str = value.getString();
       
        if ( Strings.isEmpty(str) )
        {
            return new StringValue( str );
        }
       
        return new StringValue( str );
    }
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

            {

                str = matchers[i].replaceAll( str );
            }

            return new StringValue( str );
        }

        return value;
    }
View Full Code Here

        String strValue = value.getString();

        if ( strValue.length() == 0 )
        {
            return new StringValue( "" );
        }

        // if value is a numeric id then return it as is
        if ( checker.isValidSyntax( strValue ) )
        {
            return value;
        }

        // if it is a name we need to do a lookup
        String oid = schemaManager.getRegistries().getOid( strValue );

        if ( oid != null )
        {
            return new StringValue( oid );
        }

        // if all else fails
        throw new LdapOtherException( I18n.err( I18n.ERR_04225, 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.