Examples of Syntax


Examples of org.apache.directory.shared.ldap.schema.Syntax

        {
            ServerEntry result = list.get();
            LdapDN resultDN = result.getDn();
            resultDN.normalize( atRegistry.getNormalizerMapping() );
            ServerEntry attrs = lookupPartition( resultDN );
            Syntax syntax = factory.getSyntax( attrs, targetRegistries, schema.getSchemaName() );
            targetRegistries.getSyntaxRegistry().register( syntax );
        }
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

        Iterator<Syntax> list = registries.getSyntaxRegistry().iterator();

        while ( list.hasNext() )
        {
            Syntax syntax = list.next();
            attr.add( SchemaUtils.render( syntax ).toString() );
        }

        return attr;
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

    @Test
    public void testModifySyntaxWithModificationItems() throws Exception
    {
        testAddSyntax();
       
        Syntax syntax = getSyntaxRegistry().lookup( OID );
        assertEquals( syntax.getDescription(), DESCRIPTION0 );

        LdapDN dn = getSyntaxContainer( "apachemeta" );
        dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
       
        ModificationItem[] mods = new ModificationItem[1];
        Attribute attr = new BasicAttribute( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
        mods[0] = new ModificationItem( DirContext.REPLACE_ATTRIBUTE, attr );
        getSchemaContext( service ).modifyAttributes( dn, mods );

        assertTrue( "syntax OID should still be present",
            getSyntaxRegistry().hasSyntax( OID ) );
       
        assertEquals( "syntax schema should be set to apachemeta",
            getSyntaxRegistry().getSchemaName( OID ), "apachemeta" );
       
        syntax = getSyntaxRegistry().lookup( OID );
        assertEquals( syntax.getDescription(), DESCRIPTION1 );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

    @Test
    public void testModifySyntaxWithAttributes() throws Exception
    {
        testAddSyntax();
       
        Syntax syntax = getSyntaxRegistry().lookup( OID );
        assertEquals( syntax.getDescription(), DESCRIPTION0 );

        LdapDN dn = getSyntaxContainer( "apachemeta" );
        dn.add( MetaSchemaConstants.M_OID_AT + "=" + OID );
       
        Attributes mods = new BasicAttributes( true );
        mods.put( MetaSchemaConstants.M_DESCRIPTION_AT, DESCRIPTION1 );
        getSchemaContext( service ).modifyAttributes( dn, DirContext.REPLACE_ATTRIBUTE, mods );

        assertTrue( "syntax OID should still be present",
            getSyntaxRegistry().hasSyntax( OID ) );
       
        assertEquals( "syntax schema should be set to apachemeta",
            getSyntaxRegistry().getSchemaName( OID ), "apachemeta" );

        syntax = getSyntaxRegistry().lookup( OID );
        assertEquals( syntax.getDescription(), DESCRIPTION1 );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

    protected boolean modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry,
        boolean cascade ) throws Exception
    {
        String oid = getOid( entry );
        Schema schema = getSchema( name );
        Syntax syntax = factory.getSyntax( targetEntry, targetRegistries, schema.getSchemaName() );
       
        if ( ! schema.isDisabled() )
        {
            syntaxRegistry.unregister( oid );
            syntaxRegistry.register( syntax );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

        parentDn.remove( parentDn.size() - 1 );
        checkNewParent( parentDn );
        checkOidIsUnique( entry );
       
        String schemaName = getSchemaName( name );
        Syntax syntax = factory.getSyntax( entry, targetRegistries, schemaName );
        add( syntax );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }
       
       
        String schemaName = getSchemaName( name );
        Syntax syntax = factory.getSyntax( entry, targetRegistries, schemaName );
        delete( syntax, cascade );
    }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
        String newOid = ( String ) newRdn.getValue();
        checkOidIsUnique( newOid );
       
        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
        Syntax syntax = factory.getSyntax( targetEntry, targetRegistries, schema.getSchemaName() );
       
        if ( ! schema.isDisabled() )
        {
            syntaxRegistry.unregister( oldOid );
            syntaxRegistry.register( syntax );
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
        String newOid = ( String ) newRn.getValue();
        checkOidIsUnique( newOid );
       
        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
        Syntax syntax = factory.getSyntax( targetEntry, targetRegistries, newSchema.getSchemaName() );

        if ( ! oldSchema.isDisabled() )
        {
            syntaxRegistry.unregister( oldOid );
        }
View Full Code Here

Examples of org.apache.directory.shared.ldap.schema.Syntax

        }

        Schema oldSchema = getSchema( oriChildName );
        Schema newSchema = getSchema( newParentName );
       
        Syntax syntax = factory.getSyntax( entry, targetRegistries, newSchema.getSchemaName() );
       
        if ( ! oldSchema.isDisabled() )
        {
            syntaxRegistry.unregister( oid );
        }
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.