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

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


                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }

                return new ClonedServerEntry( entry );
            }

            lockRead();

            try
            {
                entry = master.get( id );
            }
            finally
            {
                unlockRead();
            }

            if ( entry != null )
            {
                // We have to store the DN in this entry, if it has no DN yet
                if ( !dn.equals( entry.getDn() ) )
                {
                    entry.setDn( dn );
                }

                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }

                addToCache( id, entry );

                return new ClonedServerEntry( entry );
            }

            return null;
        }
        catch ( Exception e )
View Full Code Here


    {
        Dn dn = lookupContext.getDn();

        if ( dn.equals( subschemSubentryDn ) )
        {
            return new ClonedServerEntry( rootDse.clone() );
        }

        // This is for the case we do a lookup on the rootDSE
        if ( dn.isRootDse() )
        {
            Entry retval = new ClonedServerEntry( rootDse );

            return retval;
        }

        Partition partition = getPartition( dn );
View Full Code Here

        Dn parentDn = new Dn( schemaManager, "ou=Sales,o=Good Times Co." );

        Rdn rdn = new Rdn( "cn=Ryan" );

        partition.moveAndRename( childDn, parentDn, rdn, new ClonedServerEntry( childEntry ), true );

        // to drop the alias indices
        childDn = new Dn( schemaManager, "commonName=Jim Bean,ou=Apache,ou=Board of Directors,o=Good Times Co." );

        parentDn = new Dn( schemaManager, "ou=Engineering,o=Good Times Co." );
View Full Code Here

                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }

                return new ClonedServerEntry( entry );
            }

            lockRead();

            try
            {
                entry = master.get( id );
            }
            finally
            {
                unlockRead();
            }

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

                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }

                addToCache( id, entry );

                return new ClonedServerEntry( entry );
            }

            return null;
        }
        catch ( Exception e )
View Full Code Here

    {
        Entry entry = new DefaultEntry( schemaManager, dn,
            SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString(),
            SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );

        Entry clonedEntry = new ClonedServerEntry( entry );

        return clonedEntry;
    }
View Full Code Here

            addAttribute( attrs, SchemaConstants.MODIFIERS_NAME_AT );
            addAttribute( attrs, SchemaConstants.ENTRY_UUID_AT );
            addAttribute( attrs, SchemaConstants.ENTRY_DN_AT );
        }

        Entry result = new ClonedServerEntry( attrs );

        return result;
    }
View Full Code Here

                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }

                return new ClonedServerEntry( 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 );

                if ( !entry.containsAttribute( ENTRY_DN_AT ) )
                {
                    entry.add( ENTRY_DN_AT, dn.getName() );
                }

                addToCache( id, entry );

                return new ClonedServerEntry( entry );
            }

            return null;
        }
        catch ( Exception e )
View Full Code Here

        }

        Attribute userPasswordAttr = userEntry.get( userPasswordAttribute );

        bindContext.setEntry( new ClonedServerEntry( userEntry ) );

        // ---- assert that credentials match
        if ( userPasswordAttr == null )
        {
            return new byte[][]
View Full Code Here

    {
        Dn dn = lookupContext.getDn();

        if ( dn.equals( subschemSubentryDn ) )
        {
            return new ClonedServerEntry( rootDse.clone() );
        }

        // This is for the case we do a lookup on the rootDSE
        if ( dn.isRootDse() )
        {
            Entry retval = new ClonedServerEntry( rootDse );

            return retval;
        }

        Partition partition = getPartition( dn );
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

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.