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

Examples of org.apache.directory.api.ldap.model.entry.Entry


        String id = getEntryId( oldDn );

        super.move( moveContext );

        // Get the modified entry
        Entry modifiedEntry = fetch( id, moveContext.getNewDn() );

        try
        {
            entryMoved( oldDn, modifiedEntry, id );
        }
View Full Code Here


        String id = getEntryId( oldDn );

        super.moveAndRename( moveAndRenameContext );

        // Get the modified entry and store it in the context for post usage
        Entry modifiedEntry = fetch( id, moveAndRenameContext.getNewDn() );
        moveAndRenameContext.setModifiedEntry( modifiedEntry );

        try
        {
            entryMoved( oldDn, modifiedEntry, id );
View Full Code Here

        // Create the new entry
        super.rename( renameContext );

        // Get the modified entry and store it in the context for post usage
        Dn newDn = oldDn.getParent().add( renameContext.getNewRdn() );
        Entry modifiedEntry = fetch( id, newDn );
        renameContext.setModifiedEntry( modifiedEntry );

        // Now move the potential children for the old entry
        // and remove the old entry
        try
View Full Code Here

                {
                    // this ldif will have only one entry
                    LdifEntry ldifEntry = ldifEntries.get( 0 );
                    LOG.debug( "Adding entry {}", ldifEntry );

                    Entry serverEntry = new DefaultEntry( schemaManager, ldifEntry.getEntry() );

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_CSN_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_CSN_AT, defaultCSNFactory.newInstance().toString() );
                    }

                    if ( !serverEntry.containsAttribute( SchemaConstants.ENTRY_UUID_AT ) )
                    {
                        serverEntry.put( SchemaConstants.ENTRY_UUID_AT, UUID.randomUUID().toString() );
                    }

                    // call add on the wrapped partition not on the self
                    AddOperationContext addContext = new AddOperationContext( null, serverEntry );
                    super.add( addContext );
View Full Code Here

    public void testSearchWithReferralThrow() throws Exception
    {
        EntryCursor cursor = connection.search( "ou=Countries,ou=system", "(objectClass=*)",
            SearchScope.SUBTREE, "*", "+" );
        int count = 0;
        Entry entry = null;
        List<String> refs = new ArrayList<String>();
   
        while ( cursor.next() )
        {
            try
View Full Code Here

       
        searchRequest.ignoreReferrals();
       
        SearchCursor cursor = connection.search( searchRequest );
        int count = 0;
        Entry entry = null;
        List<String> refs = new ArrayList<String>();
   
        while ( cursor.next() )
        {
            entry = cursor.getEntry();
View Full Code Here

        EntryCursor cursor = connection.search( "ou=system", "(objectclass=*)", SearchScope.ONELEVEL );
        int count = 0;
   
        while ( cursor.next() )
        {
            Entry entry = cursor.get();
            assertNotNull( entry );
            count++;
        }
   
        SearchResultDone done = cursor.getSearchResultDone();
View Full Code Here

            Response response = cursor.get();
            assertNotNull( response );
   
            if ( response instanceof SearchResultEntry )
            {
                Entry entry = ( ( SearchResultEntry ) response ).getEntry();
                assertNotNull( entry );
            }
   
            count++;
        }
View Full Code Here

            SearchScope.ONELEVEL, "*", "+" );
        int count = 0;
   
        while ( cursor.next() )
        {
            Entry entry = cursor.get();
            assertNotNull( entry );
            count++;
        }
   
        assertEquals( 4, count );
View Full Code Here

        EntryCursor cursor = connection.search( "ou=users,ou=system", "(sn=Emmanuel L\u00E9charny)", SearchScope.ONELEVEL,
            "*", "+" );
   
        assertTrue( cursor.next() );
   
        Entry entry = cursor.get();
        assertNotNull( entry );
        assertTrue( entry.contains( "cn", "elecharny" ) );
        assertTrue( entry.contains( "sn", "Emmanuel L\u00E9charny" ) );
   
        cursor.close();
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.api.ldap.model.entry.Entry

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.