Package org.apache.directory.shared.ldap.schemamanager.impl

Examples of org.apache.directory.shared.ldap.schemamanager.impl.DefaultSchemaManager.loadWithDeps()


    public void testLoadCoreInetOrgPersonAndNis() throws Exception
    {
        LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
        SchemaManager schemaManager = new DefaultSchemaManager( loader );

        schemaManager.loadWithDeps( "core", "nis", "InetOrgPerson" );

        assertTrue( schemaManager.getErrors().isEmpty() );
        assertEquals( 142, schemaManager.getAttributeTypeRegistry().size() );
        assertEquals( 35, schemaManager.getComparatorRegistry().size() );
        assertEquals( 35, schemaManager.getMatchingRuleRegistry().size() );
View Full Code Here


    public void testJarLdifSchemaLoader() throws Exception
    {
        JarLdifSchemaLoader loader = new JarLdifSchemaLoader();
        SchemaManager sm = new DefaultSchemaManager( loader );

        sm.loadWithDeps( "system" );

        assertTrue( sm.getRegistries().getAttributeTypeRegistry().contains( "cn" ) );
        assertFalse( sm.getRegistries().getAttributeTypeRegistry().contains( "m-aux" ) );

        sm.loadWithDeps( "apachemeta" );
View Full Code Here

        sm.loadWithDeps( "system" );

        assertTrue( sm.getRegistries().getAttributeTypeRegistry().contains( "cn" ) );
        assertFalse( sm.getRegistries().getAttributeTypeRegistry().contains( "m-aux" ) );

        sm.loadWithDeps( "apachemeta" );

        assertTrue( sm.getRegistries().getAttributeTypeRegistry().contains( "m-aux" ) );
    }
}
View Full Code Here

        SchemaManager schemaManager = new DefaultSchemaManager( loader );

        assertTrue( schemaManager.load( "system" ) );
        try
        {
            schemaManager.loadWithDeps( "bad" );
            fail();
        }
        catch ( LdapUnwillingToPerformException lonse )
        {
            // expected
View Full Code Here

        SchemaManager schemaManager = new DefaultSchemaManager( loader );

        assertTrue( schemaManager.load( "system" ) );
        try
        {
            schemaManager.loadWithDeps( "bad" );
            fail();
        }
        catch ( LdapUnwillingToPerformException lonse )
        {
            // expected
View Full Code Here

    private SchemaManager loadSchema( String schemaName ) throws Exception
    {
        LdifSchemaLoader loader = new LdifSchemaLoader( schemaRepository );
        SchemaManager schemaManager = new DefaultSchemaManager( loader );

        schemaManager.loadWithDeps( schemaName );

        return schemaManager;
    }

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.