Package org.apache.directory.server.schema.bootstrap

Examples of org.apache.directory.server.schema.bootstrap.Schema


        }

        String oid = ( String ) newRdn.getValue();
        checkOidIsUniqueForNormalizer( oid );
       
        Schema schema = getSchema( name );
       
        if ( ! schema.isDisabled() )
        {
            Normalizer normalizer = factory.getNormalizer( entry, targetRegistries );
            normalizerRegistry.unregister( oldOid );
           
            NormalizerDescription normalizerDescription = getNormalizerDescription( schema.getSchemaName(), entry );
            normalizerDescription.setNumericOid( oid );
            normalizerRegistry.register( normalizerDescription, normalizer );
        }
    }
View Full Code Here


        }

        String oid = ( String ) newRdn.getValue();
        checkOidIsUniqueForNormalizer( oid );
       
        Schema oldSchema = getSchema( oriChildName );
        Schema newSchema = getSchema( newParentName );
       
        Normalizer normalizer = factory.getNormalizer( entry, targetRegistries );

        if ( ! oldSchema.isDisabled() )
        {
            normalizerRegistry.unregister( oldOid );
        }

        if ( ! newSchema.isDisabled() )
        {
            NormalizerDescription normalizerDescription = getNormalizerDescription( newSchema.getSchemaName(), entry );
            normalizerDescription.setNumericOid( oid );
            normalizerRegistry.register( normalizerDescription, normalizer );
        }
    }
View Full Code Here

                + " cannot be moved to another schema until all "
                + "matchingRules using that normalizer have been deleted.",
                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }

        Schema oldSchema = getSchema( oriChildName );
        Schema newSchema = getSchema( newParentName );
       
        Normalizer normalizer = factory.getNormalizer( entry, targetRegistries );
       
        if ( ! oldSchema.isDisabled() )
        {
            normalizerRegistry.unregister( oid );
        }
       
        if ( ! newSchema.isDisabled() )
        {
            NormalizerDescription normalizerDescription = getNormalizerDescription( newSchema.getSchemaName(), entry );
            normalizerRegistry.register( normalizerDescription, normalizer );
        }
    }
View Full Code Here

                    if ( schemaName == null )
                    {
                        throw new NamingException( "Index on unidentified attribute: " + index.toString() );
                    }

                    Schema schema = schemaMap.get( schemaName );
                    if ( schema.isDisabled() )
                    {
                        dao.enableSchema( schemaName );
                    }
                }
            }
View Full Code Here

    protected boolean modify( LdapDN name, ServerEntry entry, ServerEntry targetEntry, boolean cascade ) throws Exception
    {
        String oid = getOid( entry );
        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );
       
        Schema schema = getSchema( name );
       
        if ( ! schema.isDisabled() )
        {
            syntaxCheckerRegistry.unregister( oid );
            SyntaxCheckerDescription syntaxCheckerDescription =
                getSyntaxCheckerDescription( schema.getSchemaName(), targetEntry );
            syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
            return SCHEMA_MODIFIED;
        }
       
        return SCHEMA_UNCHANGED;
View Full Code Here

            throw new LdapNamingException( "Oid " + oid + " for new schema syntaxChecker is not unique.",
                ResultCodeEnum.OTHER );
        }
       
        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( entry, targetRegistries );
        Schema schema = getSchema( name );
       
        if ( ! schema.isDisabled() )
        {
            SyntaxCheckerDescription syntaxCheckerDescription =
                getSyntaxCheckerDescription( schema.getSchemaName(), entry );
            syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
        }
    }
View Full Code Here

        {
            schemaName = syntaxCheckerDescription.getExtensions()
                .get( MetaSchemaConstants.X_SCHEMA ).get( 0 );
        }
       
        Schema schema = loader.getSchema( schemaName );
       
        if ( ! schema.isDisabled() )
        {
            syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
        }
    }
View Full Code Here

                + " cannot have it's OID changed until all "
                + "syntaxes using that syntaxChecker have been deleted.",
                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }

        Schema schema = getSchema( name );
        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
        String newOid = ( String ) newRdn.getValue();
        if ( super.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( newOid ) )
        {
            throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker is not unique.",
                ResultCodeEnum.OTHER );
        }

        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
        if ( ! schema.isDisabled() )
        {
            SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );
            syntaxCheckerRegistry.unregister( oldOid );
            SyntaxCheckerDescription syntaxCheckerDescription =
                getSyntaxCheckerDescription( schema.getSchemaName(), entry );
            syntaxCheckerDescription.setNumericOid( newOid );
            syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
        }
    }
View Full Code Here

                + " cannot have it's OID changed until all "
                + "syntaxes using that syntaxChecker have been deleted.",
                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }

        Schema oldSchema = getSchema( oriChildName );
        Schema newSchema = getSchema( newParentName );
        ServerEntry targetEntry = ( ServerEntry ) entry.clone();
       
        String newOid = ( String ) newRdn.getValue();
        if ( super.targetRegistries.getSyntaxCheckerRegistry().hasSyntaxChecker( newOid ) )
        {
            throw new LdapNamingException( "Oid " + newOid + " for new schema syntaxChecker is not unique.",
                ResultCodeEnum.OTHER );
        }

        targetEntry.put( MetaSchemaConstants.M_OID_AT, newOid );
        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( targetEntry, targetRegistries );

        if ( ! oldSchema.isDisabled() )
        {
            syntaxCheckerRegistry.unregister( oldOid );
        }

        if ( ! newSchema.isDisabled() )
        {
            SyntaxCheckerDescription syntaxCheckerDescription =
                getSyntaxCheckerDescription( newSchema.getSchemaName(), entry );
            syntaxCheckerDescription.setNumericOid( newOid );
            syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
        }
    }
View Full Code Here

                + " cannot be moved to another schema until all "
                + "syntax using that syntaxChecker have been deleted.",
                ResultCodeEnum.UNWILLING_TO_PERFORM );
        }

        Schema oldSchema = getSchema( oriChildName );
        Schema newSchema = getSchema( newParentName );
       
        SyntaxChecker syntaxChecker = factory.getSyntaxChecker( entry, targetRegistries );
       
        if ( ! oldSchema.isDisabled() )
        {
            syntaxCheckerRegistry.unregister( oid );
        }
       
        if ( ! newSchema.isDisabled() )
        {
            SyntaxCheckerDescription syntaxCheckerDescription =
                getSyntaxCheckerDescription( newSchema.getSchemaName(), entry );
            syntaxCheckerRegistry.register( syntaxCheckerDescription, syntaxChecker );
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.directory.server.schema.bootstrap.Schema

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.