Package org.apache.directory.server.core.api.entry

Examples of org.apache.directory.server.core.api.entry.ClonedServerEntry


            {
                tempResult = tempEntry;
            }
            else
            {
                tempResult = new ClonedServerEntry( tempEntry );
            }

            /*
             * O P T I M I Z A T I O N
             * -----------------------
 
View Full Code Here


            if ( entry == null )
            {
                continue;
            }

            tempResult = new ClonedServerEntry/*Search*/( entry );

            /*
             * O P T I M I Z A T I O N
             * -----------------------
             *
 
View Full Code Here

        // the user provided values and all the operational attributes added during
        // Partition.add() will be applied in the cloned entry present inside it
        // if we don't clone then the attributes will not be filtered
        // e.x the operational attributes will also be sent even when a user requests
        // user attributes only
        Entry entry = new ClonedServerEntry( addContext.getEntry() );
        filterEntry( entry );
        respEntry.setEntry( entry );
       
        setECResponseControl( respEntry, addContext, ChangeType.ADD );
        session.getIoSession().write( respEntry );
View Full Code Here

        }

        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
        respEntry.setObjectName( modifyContext.getDn() );
       
        Entry entry = new ClonedServerEntry( modifyContext.getAlteredEntry() );
        filterEntry( entry );
        respEntry.setEntry( entry );

        setECResponseControl( respEntry, modifyContext, ChangeType.MODIFY );
        session.getIoSession().write( respEntry );
View Full Code Here

        }

        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
        respEntry.setObjectName( moveContext.getNewDn() );
       
        Entry entry = new ClonedServerEntry( moveContext.getModifiedEntry() );
        filterEntry( entry );
        respEntry.setEntry( entry );
       
        setECResponseControl( respEntry, moveContext, ChangeType.MODDN );
        session.getIoSession().write( respEntry );
View Full Code Here

        }

        SearchResultEntry respEntry = new SearchResultEntryImpl( req.getMessageId() );
        respEntry.setObjectName( renameContext.getModifiedEntry().getDn() );
       
        Entry entry = new ClonedServerEntry( renameContext.getModifiedEntry() );
        filterEntry( entry );
        respEntry.setEntry( entry );
       
        setECResponseControl( respEntry, renameContext, ChangeType.MODDN );
        session.getIoSession().write( respEntry );
View Full Code Here

     * @param entry the entry being added
     */
    public AddOperationContext( CoreSession session, Entry entry )
    {
        super( session, entry.getDn() );
        this.entry = new ClonedServerEntry( entry );
        if ( session != null )
        {
            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.ADD ) );
        }
    }
View Full Code Here

        if ( session != null )
        {
            setInterceptors( session.getDirectoryService().getInterceptors( OperationEnum.ADD ) );
        }

        this.entry = new ClonedServerEntry( entry );
    }
View Full Code Here

        Entry addEntry = addRequest.getEntry();

        if ( addEntry.isSchemaAware() )
        {
            entry = new ClonedServerEntry( addEntry );
        }
        else
        {
            entry = new ClonedServerEntry(
                new DefaultEntry( session.getDirectoryService().getSchemaManager(), addRequest.getEntry() ) );
        }

        dn = addRequest.getEntry().getDn();
        requestControls = addRequest.getControls();
View Full Code Here

            if ( entry != null )
            {
                entry.setDn( dn );

                entry = new ClonedServerEntry( entry );

                // Replace the entry's DN with the provided one
                Attribute entryDnAt = entry.get( ENTRY_DN_AT );

                if ( entryDnAt == null )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }
                else
                {
                    entryDnAt.clear();
                    entryDnAt.add( dn.getName() );
                }

                return entry;
            }

            try
            {
                rwLock.readLock().lock();
                entry = master.get( id );
            }
            finally
            {
                rwLock.readLock().unlock();
            }

            if ( entry != null )
            {
                // We have to store the DN in this entry
                entry.setDn( dn );

                // always store original entry in the cache
                addToCache( id, entry );

                entry = new ClonedServerEntry( entry );

                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.core.api.entry.ClonedServerEntry

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.