Examples of ObjectClassRegistry


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

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

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

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

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

        {
            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

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

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

    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

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

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

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

        this.registrySynchronizers[MATCHING_RULE_USE_INDEX] = new MatchingRuleUseSynchronizer( schemaManager );
        this.registrySynchronizers[DIT_STRUCTURE_RULE_INDEX] = new DitStructureRuleSynchronizer( schemaManager );
        this.registrySynchronizers[DIT_CONTENT_RULE_INDEX] = new DitContentRuleSynchronizer( schemaManager );
        this.registrySynchronizers[NAME_FORM_INDEX] = new NameFormSynchronizer( schemaManager );

        ObjectClassRegistry ocReg = registries.getObjectClassRegistry();
        for ( int ii = 0; ii < META_OBJECT_CLASSES.length; ii++ )
        {
            ObjectClass oc = ocReg.lookup( META_OBJECT_CLASSES[ii] );
            objectClass2synchronizerMap.put( oc.getOid(), registrySynchronizers[ii] );
        }
    }
View Full Code Here

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

        this.registrySynchronizers[MATCHING_RULE_USE_INDEX] = new MatchingRuleUseSynchronizer( schemaManager );
        this.registrySynchronizers[DIT_STRUCTURE_RULE_INDEX] = new DitStructureRuleSynchronizer( schemaManager );
        this.registrySynchronizers[DIT_CONTENT_RULE_INDEX] = new DitContentRuleSynchronizer( schemaManager );
        this.registrySynchronizers[NAME_FORM_INDEX] = new NameFormSynchronizer( schemaManager );

        ObjectClassRegistry ocReg = registries.getObjectClassRegistry();
        for ( int ii = 0; ii < META_OBJECT_CLASSES.length; ii++ )
        {
            ObjectClass oc = ocReg.lookup( META_OBJECT_CLASSES[ii] );
            objectClass2synchronizerMap.put( oc.getOid(), registrySynchronizers[ii] );
        }
    }
View Full Code Here

Examples of org.apache.ldap.server.schema.ObjectClassRegistry

                attributeTypeRegistry = registries.getAttributeTypeRegistry();
                attributeTypeRegistry.register( schema.getSchemaName(), attributeType );
                break;
            case( ProducerTypeEnum.OBJECT_CLASS_PRODUCER_VAL ):
                ObjectClass objectClass = ( ObjectClass ) schemaObject;
                ObjectClassRegistry objectClassRegistry;
                objectClassRegistry = registries.getObjectClassRegistry();
                objectClassRegistry.register( schema.getSchemaName(), objectClass );
                break;
            case( ProducerTypeEnum.MATCHING_RULE_USE_PRODUCER_VAL ):
                MatchingRuleUse matchingRuleUse = ( MatchingRuleUse ) schemaObject;
                MatchingRuleUseRegistry matchingRuleUseRegistry;
                matchingRuleUseRegistry = registries.getMatchingRuleUseRegistry();
View Full Code Here

Examples of org.apache.ldap.server.schema.ObjectClassRegistry

                attributeTypeRegistry = registries.getAttributeTypeRegistry();
                attributeTypeRegistry.register( schema.getSchemaName(), attributeType );
                break;
            case( ProducerTypeEnum.OBJECT_CLASS_PRODUCER_VAL ):
                ObjectClass objectClass = ( ObjectClass ) schemaObject;
                ObjectClassRegistry objectClassRegistry;
                objectClassRegistry = registries.getObjectClassRegistry();
                objectClassRegistry.register( schema.getSchemaName(), objectClass );
                break;
            case( ProducerTypeEnum.MATCHING_RULE_USE_PRODUCER_VAL ):
                MatchingRuleUse matchingRuleUse = ( MatchingRuleUse ) schemaObject;
                MatchingRuleUseRegistry matchingRuleUseRegistry;
                matchingRuleUseRegistry = registries.getMatchingRuleUseRegistry();
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.