Package javax.naming.ldap

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


            "m-dependencies: nis",
            MetaSchemaConstants.M_DISABLED_AT, "FALSE" );
       
        try
        {
            schemaRoot.createSubcontext( "cn=dummy", dummySchema );
            fail();
        }
        catch ( LdapOperationNotSupportedException lonse )
        {
            assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, lonse.getResultCode() );
View Full Code Here


            "m-dependencies: wrong",
            MetaSchemaConstants.M_DISABLED_AT, "FALSE" );
       
        try
        {
            schemaRoot.createSubcontext( "cn=dummy", dummySchema );
            fail();
        }
        catch ( LdapOperationNotSupportedException lonse )
        {
            assertEquals( ResultCodeEnum.UNWILLING_TO_PERFORM, lonse.getResultCode() );
View Full Code Here

            "objectClass: top",
            "objectClass", MetaSchemaConstants.META_SCHEMA_OC,
            "cn: dummy",
            MetaSchemaConstants.M_DISABLED_AT, "TRUE" );
       
        schemaRoot.createSubcontext( "cn=dummy", dummySchema );
       
        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
    }
   
View Full Code Here

            "cn: dummy",
            MetaSchemaConstants.M_DISABLED_AT, "TRUE",
            "m-dependencies: nis",
            "m-dependencies: core" );
       
        schemaRoot.createSubcontext( "cn=dummy", dummySchema );
       
        assertFalse( IntegrationUtils.isEnabled( service, "dummy" ) );
        assertNotNull( schemaRoot.lookup( "cn=dummy" ) );
    }
   
View Full Code Here

            "m-dependencies: missing",
            "m-dependencies: core" );
       
        try
        {
            schemaRoot.createSubcontext( "cn=dummy", dummySchema );
        }
        catch( LdapOperationNotSupportedException e )
        {
            assertTrue( e.getResultCode().equals( ResultCodeEnum.UNWILLING_TO_PERFORM ) );
        }
View Full Code Here

            "objectClass: top",
            "objectClass: metaSchema",
            "cn: dummy"
            );

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

            "cn: dummy",
            "m-dependencies: nis" );
       
        try
        {
            schemaRoot.createSubcontext( "cn=dummy", dummySchema );
            fail( "should not be able to add enabled schema with deps on disabled schemas" );
        }
        catch( LdapOperationNotSupportedException e )
        {
            assertTrue( e.getResultCode().equals( ResultCodeEnum.UNWILLING_TO_PERFORM ) );
View Full Code Here

        Attribute attribute = new BasicAttribute( "objectClass" );
        attribute.add( "top" );
        attribute.add( "organizationalUnit" );
        attributes.put( attribute );
        attributes.put( "ou", "testing00" );
        DirContext ctx = sysRoot.createSubcontext( "ou=testing00", attributes );
        assertNotNull( ctx );

        ctx = ( DirContext ) sysRoot.lookup( "ou=testing00" );
        assertNotNull( ctx );
View Full Code Here

        // here's an attribute that is not on the MAY or MUST list for
        // an organizationalUnit - it's our test for extensible objects
        attributes.put( "employeeType", "testing" );

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

        ctx = ( DirContext ) sysRoot.lookup( "ou=testing00" );
        assertNotNull( ctx );
View Full Code Here

    {
        LOG.info( "User \"" + operationPrincipal + "\" has deleted entry \"" + deletedEntryName + "\"" );
        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,
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.