Package javax.naming.ldap

Examples of javax.naming.ldap.LdapContext.lookup()


         */
        sysRoot.destroySubcontext( "ou=testing02" );

        try
        {
            sysRoot.lookup( "ou=testing02" );
            fail( "ou=testing02, ou=system should not exist" );
        }
        catch ( NamingException e )
        {
            assertTrue( e instanceof LdapNameNotFoundException );
View Full Code Here


        LdapContext schemaRoot = getSchemaContext( service );
       
        createEnabledValidSchema( "dummy" );
       
        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
       
        assertTrue( isOnDisk( dn ) );
    }
   
   
View Full Code Here

            MetaSchemaConstants.M_DISABLED_AT, "FALSE" );
       
        schemaRoot.createSubcontext( "cn=dummy", dummySchema );
       
        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
       
        assertTrue( isOnDisk( dn ) );
    }
   
   
View Full Code Here

            MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
       
        schemaRoot.createSubcontext( "cn=dummy", dummySchema );
       
        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
    }
   
   
    /**
     * Tests the addition of a new metaSchema object that is disabled
View Full Code Here

            "m-dependencies: core" );
       
        schemaRoot.createSubcontext( "cn=dummy", dummySchema );
       
        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
    }
   
   
    /**
     * Tests the rejection of a new metaSchema object that is disabled
View Full Code Here

        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );

        //noinspection EmptyCatchBlock
        try
        {
            schemaRoot.lookup( "cn=dummy" );
            fail( "schema should not be added to schema partition" );
        }
        catch( NamingException e )
        {
        }
View Full Code Here

            );

        schemaRoot.createSubcontext( "cn=dummy", dummySchema );
       
        assertTrue( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
    }
   
   
    /**
     * Tests the rejection of a metaSchema object add that is enabled
View Full Code Here

        attributes.put( attribute );
        attributes.put( "ou", "testing00" );
        DirContext ctx = sysRoot.createSubcontext( "ou=testing00", attributes );
        assertNotNull( ctx );

        ctx = ( DirContext ) sysRoot.lookup( "ou=testing00" );
        assertNotNull( ctx );

        attributes = ctx.getAttributes( "" );
        assertNotNull( attributes );
        assertEquals( "testing00", attributes.get( "ou" ).get() );
View Full Code Here

        attributes.put( "employeeType", "testing" );

        DirContext ctx = sysRoot.createSubcontext( "ou=testing00", attributes );
        assertNotNull( ctx );

        ctx = ( DirContext ) sysRoot.lookup( "ou=testing00" );
        assertNotNull( ctx );

        attributes = ctx.getAttributes( "" );
        assertNotNull( attributes );
        assertEquals( "testing00", attributes.get( "ou" ).get() );
View Full Code Here

        LOG.info( "Entry content was: " + deletedEntry );
        LdapContext backupCtx = ( LdapContext ) ctx.lookup( "ou=backupContext,ou=system" );
        String deletedEntryRdn = deletedEntryName.get( deletedEntryName.size() - 1 );
        backupCtx.createSubcontext( deletedEntryRdn, deletedEntry );
        LOG.info( "Backed up deleted entry to \"" +
                ( ( LdapContext ) backupCtx.lookup( deletedEntryRdn ) ).getNameInNamespace() + "\"" );
    }
   
    public static void duplicateDeletedEntry( LdapContext ctx, Name deletedEntryName, Name operationPrincipal,
                                              Attributes deletedEntry ) throws NamingException
    {
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.