Examples of removeAttributes()


Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        assertNotNull( id );

        Entry fetched = partition.fetch( id );
       
        //remove the entryDn cause it is not present in the above hand made contextEntry
        fetched.removeAttributes( SchemaConstants.ENTRY_DN_AT );
       
        assertEquals( contextEntry, fetched );

        RandomAccessFile file = new RandomAccessFile( new File( partition.getPartitionPath() ), "r" );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        // Now remove the ObjectClass attribute if it has not been requested
        if ( ( lookupContext.getReturningAttributes() != null ) && ( lookupContext.getReturningAttributes().size() != 0 ) &&
            ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null )
            && ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) ) )
        {
            serverEntry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT );
        }

        return serverEntry;
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

    private long getEntryLdifLen( Entry entry ) throws LdapException
    {
        // Remove the entryDn attribute
        Entry copy = entry.clone();
        copy.removeAttributes( "entryDn" );

        // while writing to the file 1 extra newline char will be added

        String ldif = LdifUtils.convertToLdif( copy ) + "\n";
        byte[] data = Strings.getBytesUtf8( ldif );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

                {
                    updateRdnIdx( parentId, ADD_CHILD, 0 );
                }

                // Remove the EntryDN attribute
                entry.removeAttributes( ENTRY_DN_AT );

                // And finally add the entry into the master table
                master.put( id, entry );
            }
            finally
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

            if ( entry != null )
            {
                // Replace the entry's DN with the provided one
                if ( entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.removeAttributes( ENTRY_DN_AT );
                }

                entry.add( ENTRY_DN_AT, dn.getName() );
                entry.setDn( dn );
View Full Code Here

Examples of org.apache.directory.api.ldap.model.entry.Entry.removeAttributes()

        }

        updateCsnIndex( entry, id );

        // Remove the EntryDN
        entry.removeAttributes( ENTRY_DN_AT );

        master.put( id, entry );

        if ( isSyncOnWrite.get() )
        {
View Full Code Here

Examples of org.apache.directory.server.core.entry.ClonedServerEntry.removeAttributes()

        if ( ( opCtx.getAttrsId() != null ) && ( opCtx.getAttrsId().size() != 0 ) )
        {
            if ( ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ) != null )
                && ( serverEntry.get( SchemaConstants.OBJECT_CLASS_AT ).size() == 0 ) )
            {
                serverEntry.removeAttributes( SchemaConstants.OBJECT_CLASS_AT );
            }
        }

        return serverEntry;
    }
View Full Code Here

Examples of org.apache.directory.server.core.entry.ClonedServerEntry.removeAttributes()

                {
                    String oid = attributeType.getOid();
                   
                    if ( ! opContext.getAttrsId().contains( oid ) )
                    {
                        retval.removeAttributes( attributeType );
                    }
                }
                return retval;
            }
            else
View Full Code Here

Examples of org.apache.directory.server.core.entry.ClonedServerEntry.removeAttributes()

        for ( AttributeType attributeType : ( ( ServerEntry ) entry.getOriginalEntry() ).getAttributeTypes() )
        {
            if ( !opContext.getAttrsId().contains( attributeType.getOid() ) )
            {
                entry.removeAttributes( attributeType );
            }
        }

        return entry;
    }
View Full Code Here

Examples of org.apache.directory.server.core.entry.DefaultServerEntry.removeAttributes()

        // this should pass
        SchemaChecker.preventStructuralClassRemovalOnModifyReplace( schemaManager.getObjectClassRegistry(), name, mod, modifyAttributes );

        // this should succeed since person is still in replaced set and is structural
        modifyAttributes.removeAttributes( atCN );
        AttributeType atOC = schemaManager.lookupAttributeTypeRegistry( "objectClass" );
        EntryAttribute objectClassesReplaced = new DefaultServerAttribute( atOC );
        objectClassesReplaced.add( "top" );
        objectClassesReplaced.add( "person" );
        modifyAttributes.put( objectClassesReplaced );
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.