Examples of EntryAttribute


Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

     */
    public boolean remove( AttributeType attributeType, String... values ) throws NamingException
    {
        try
        {
            EntryAttribute attribute = attributes.get( attributeType );
           
            if ( attribute == null )
            {
                // Can't remove values from a not existing attribute !
                return false;
            }
           
            int nbOldValues = attribute.size();
           
            // Remove the values
            attribute.remove( values );
           
            if ( attribute.size() == 0 )
            {
                // No mare values, remove the attribute
                attributes.remove( attributeType );
               
                return true;
            }
           
            if ( nbOldValues != attribute.size() )
            {
                // At least one value have been removed, return true.
                return true;
            }
            else
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

     */
    public boolean remove( AttributeType attributeType, Value<?>... values ) throws NamingException
    {
        try
        {
            EntryAttribute attribute = attributes.get( attributeType );
           
            if ( attribute == null )
            {
                // Can't remove values from a not existing attribute !
                return false;
            }
           
            int nbOldValues = attribute.size();
           
            // Remove the values
            attribute.remove( values );
           
            if ( attribute.size() == 0 )
            {
                // No mare values, remove the attribute
                attributes.remove( attributeType );
               
                return true;
            }
           
            if ( nbOldValues != attribute.size() )
            {
                // At least one value have been removed, return true.
                return true;
            }
            else
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

       
        List<EntryAttribute> removed = new ArrayList<EntryAttribute>( attributes.length );
       
        for ( AttributeType attributeType:attributes )
        {
            EntryAttribute attr = this.attributes.remove( attributeType );
           
            if ( attr != null )
            {
                removed.add( attr );
            }
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

                String message = "The attribute '" + attribute + "' does not exist in the entry";
                LOG.warn( message );
                continue;
            }
   
            EntryAttribute attr = this.attributes.remove( attributeType );
           
            if ( attr != null )
            {
                removed.add( attr );
            }
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

                String message = I18n.err( I18n.ERR_108 );
                LOG.error( message );
                continue;
            }
           
            EntryAttribute attribute = attributes.put( attributeType, new DefaultServerAttribute( attributeType ) );

            if ( attribute != null )
            {
                removed.add( attribute );
            }
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

            {
                LOG.warn( "Trying to add a bad attribute type '{}', error : ", upId, iae.getLocalizedMessage() );
                continue;
            }
           
            EntryAttribute attribute = attributes.put( attributeType,
                new DefaultServerAttribute( upId, attributeType ));
           
            if ( attribute != null )
            {
                removed.add( attribute );
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

        Entry clientEntry = new DefaultClientEntry( dn );
       
        // Convert each attribute
        for ( EntryAttribute serverAttribute:this )
        {
            EntryAttribute clientAttribute = ((ServerAttribute)serverAttribute).toClientAttribute();
            clientEntry.add( clientAttribute );
        }
       
        return clientEntry;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

            return false;
        }
       
        for ( EntryAttribute attribute:other )
        {
            EntryAttribute attr = attributes.get( ((ServerAttribute)attribute).getAttributeType() );
           
            if ( attr == null )
            {
                return false;
            }
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

        sb.append( '\n' );
       
        // First dump the ObjectClass attribute
        if ( containsAttribute( OBJECT_CLASS_AT ) )
        {
            EntryAttribute objectClass = get( OBJECT_CLASS_AT );
           
            sb.append( objectClass );
        }
       
        if ( attributes.size() != 0 )
View Full Code Here

Examples of org.apache.directory.shared.ldap.entry.EntryAttribute

       
        synchronized ( partitionLookupTree )
        {
            partitions.put( key, system );
            partitionLookupTree.add( system.getSuffixDn(), system );
            EntryAttribute namingContexts = rootDSE.get( SchemaConstants.NAMING_CONTEXTS_AT );
           
            if ( namingContexts == null )
            {
                namingContexts = new DefaultServerAttribute(
                    schemaManager.lookupAttributeTypeRegistry( SchemaConstants.NAMING_CONTEXTS_AT ),
                    system.getSuffixDn().getName() );
                rootDSE.put( namingContexts );
            }
            else
            {
                namingContexts.add( system.getSuffixDn().getName() );
            }
        }

        return system;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.