Package org.apache.directory.shared.ldap.model.schema.registries

Examples of org.apache.directory.shared.ldap.model.schema.registries.ObjectClassRegistry


            {
                atRegistry.addMappingFor( atType );
            }

            List<ObjectClass> ocList = olsp.getObjectClassTypes();
            ObjectClassRegistry ocRegistry = schemaManager.getRegistries().getObjectClassRegistry();

            for ( ObjectClass oc : ocList )
            {
                ocRegistry.register( oc );
            }

            LOG.info( "successfully loaded the schema from file {}", schemaFile.getAbsolutePath() );
        }
        catch ( Exception e )
View Full Code Here


     */
    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
    {
        if ( registries != null )
        {
            ObjectClassRegistry objectClassRegistry = registries.getObjectClassRegistry();

            // Unregister this ObjectClass into the Descendant map
            objectClassRegistry.unregisterDescendants( this, superiors );

            /**
             * Remove the OC references (using and usedBy) :
             * OC -> AT (for MAY and MUST)
             * OC -> OC
View Full Code Here

     * Build the references to this ObjectClass SUPERIORS, checking that the type
     * hierarchy is correct.
     */
    private static void buildSuperiors( ObjectClass objectClass, List<Throwable> errors, Registries registries )
    {
        ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
        List<String> superiorOids = objectClass.getSuperiorOids();

        if ( superiorOids != null )
        {
            objectClass.getSuperiors().clear();

            for ( String superiorName : superiorOids )
            {
                try
                {
                    ObjectClass superior = ocRegistry.lookup( ocRegistry.getOidByName( superiorName ) );

                    // Before adding the superior, check that the ObjectClass type is consistent
                    switch ( objectClass.getType() )
                    {
                        case ABSTRACT:
View Full Code Here

        {
            try
            {
                ditContentRule.unlock();
                AttributeTypeRegistry atRegistry = registries.getAttributeTypeRegistry();
                ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();
   
                if ( ditContentRule.getMayAttributeTypeOids() != null )
                {
                    ditContentRule.getMayAttributeTypes().clear();
   
                    for ( String oid : ditContentRule.getMayAttributeTypeOids() )
                    {
                        ditContentRule.getMayAttributeTypes().add( atRegistry.lookup( oid ) );
                    }
                }
   
                if ( ditContentRule.getMustAttributeTypeOids() != null )
                {
                    ditContentRule.getMustAttributeTypes().clear();
   
                    for ( String oid : ditContentRule.getMustAttributeTypeOids() )
                    {
                        ditContentRule.getMustAttributeTypes().add( atRegistry.lookup( oid ) );
                    }
                }
   
                if ( ditContentRule.getNotAttributeTypeOids() != null )
                {
                    ditContentRule.getNotAttributeTypes().clear();
   
                    for ( String oid : ditContentRule.getNotAttributeTypeOids() )
                    {
                        ditContentRule.getNotAttributeTypes().add( atRegistry.lookup( oid ) );
                    }
                }
   
                if ( ditContentRule.getAuxObjectClassOids() != null )
                {
                    ditContentRule.getAuxObjectClasses().clear();
   
                    for ( String oid : ditContentRule.getAuxObjectClassOids() )
                    {
                        ditContentRule.getAuxObjectClasses().add( ocRegistry.lookup( oid ) );
                    }
                }
            }
            finally
            {
View Full Code Here

    }


    private void buildSuperiors( List<Throwable> errors, Registries registries )
    {
        ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();

        if ( superiorOids != null )
        {
            superiors = new ArrayList<ObjectClass>( superiorOids.size() );

            for ( String superiorName : superiorOids )
            {
                try
                {
                    ObjectClass superior = ocRegistry.lookup( ocRegistry.getOidByName( superiorName ) );

                    // Before adding the superior, check that the ObjectClass type is consistent
                    switch ( objectClassType )
                    {
                        case ABSTRACT:
View Full Code Here

     */
    public void removeFromRegistries( List<Throwable> errors, Registries registries ) throws LdapException
    {
        if ( registries != null )
        {
            ObjectClassRegistry objectClassRegistry = registries.getObjectClassRegistry();

            // Unregister this ObjectClass into the Descendant map
            objectClassRegistry.unregisterDescendants( this, superiors );

            /**
             * Remove the OC references (using and usedBy) :
             * OC -> AT (for MAY and MUST)
             * OC -> OC
View Full Code Here

            {
                atRegistry.addMappingFor( atType );
            }

            List<ObjectClass> ocList = olsp.getObjectClassTypes();
            ObjectClassRegistry ocRegistry = schemaManager.getRegistries().getObjectClassRegistry();
            for ( ObjectClass oc : ocList )
            {
                ocRegistry.register( oc );
            }

            LOG.info( "successfully loaded the schema from file {}", schemaFile.getAbsolutePath() );
        }
        catch ( Exception e )
View Full Code Here

    public void addToRegistries( Registries registries ) throws LdapException
    {
        if ( registries != null )
        {
            AttributeTypeRegistry atRegistry = registries.getAttributeTypeRegistry();
            ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();

            if ( mayAttributeTypeOids != null )
            {
                mayAttributeTypes = new ArrayList<AttributeType>( mayAttributeTypeOids.size() );

                for ( String oid : mayAttributeTypeOids )
                {
                    mayAttributeTypes.add( atRegistry.lookup( oid ) );
                }
            }

            if ( mustAttributeTypeOids != null )
            {
                mustAttributeTypes = new ArrayList<AttributeType>( mustAttributeTypeOids.size() );

                for ( String oid : mustAttributeTypeOids )
                {
                    mustAttributeTypes.add( atRegistry.lookup( oid ) );
                }
            }

            if ( notAttributeTypeOids != null )
            {
                notAttributeTypes = new ArrayList<AttributeType>( notAttributeTypeOids.size() );

                for ( String oid : notAttributeTypeOids )
                {
                    notAttributeTypes.add( atRegistry.lookup( oid ) );
                }
            }

            if ( auxObjectClassOids != null )
            {
                auxObjectClasses = new ArrayList<ObjectClass>( auxObjectClassOids.size() );

                for ( String oid : auxObjectClassOids )
                {
                    auxObjectClasses.add( ocRegistry.lookup( oid ) );
                }
            }
        }
    }
View Full Code Here

            {
                atRegistry.addMappingFor( atType );
            }

            List<ObjectClass> ocList = olsp.getObjectClassTypes();
            ObjectClassRegistry ocRegistry = schemaManager.getRegistries().getObjectClassRegistry();
            for ( ObjectClass oc : ocList )
            {
                ocRegistry.register( oc );
            }

            LOG.info( "successfully loaded the schema from file {}", schemaFile.getAbsolutePath() );
        }
        catch ( Exception e )
View Full Code Here

    }


    private void buildSuperiors( List<Throwable> errors, Registries registries )
    {
        ObjectClassRegistry ocRegistry = registries.getObjectClassRegistry();

        if ( superiorOids != null )
        {
            superiors = new ArrayList<ObjectClass>( superiorOids.size() );

            for ( String superiorName : superiorOids )
            {
                try
                {
                    ObjectClass superior = ocRegistry.lookup( ocRegistry.getOidByName( superiorName ) );

                    // Before adding the superior, check that the ObjectClass type is consistent
                    switch ( objectClassType )
                    {
                        case ABSTRACT:
View Full Code Here

TOP

Related Classes of org.apache.directory.shared.ldap.model.schema.registries.ObjectClassRegistry

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.