001    /*
002     *  Licensed to the Apache Software Foundation (ASF) under one
003     *  or more contributor license agreements.  See the NOTICE file
004     *  distributed with this work for additional information
005     *  regarding copyright ownership.  The ASF licenses this file
006     *  to you under the Apache License, Version 2.0 (the
007     *  "License"); you may not use this file except in compliance
008     *  with the License.  You may obtain a copy of the License at
009     *  
010     *    http://www.apache.org/licenses/LICENSE-2.0
011     *  
012     *  Unless required by applicable law or agreed to in writing,
013     *  software distributed under the License is distributed on an
014     *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
015     *  KIND, either express or implied.  See the License for the
016     *  specific language governing permissions and limitations
017     *  under the License. 
018     *  
019     */
020    package org.apache.directory.shared.ldap.schema;
021    
022    
023    import java.util.List;
024    import java.util.Map;
025    import java.util.Set;
026    
027    import javax.naming.NamingException;
028    
029    import org.apache.directory.shared.ldap.name.DN;
030    import org.apache.directory.shared.ldap.schema.normalizers.OidNormalizer;
031    import org.apache.directory.shared.ldap.schema.registries.AttributeTypeRegistry;
032    import org.apache.directory.shared.ldap.schema.registries.ComparatorRegistry;
033    import org.apache.directory.shared.ldap.schema.registries.DITContentRuleRegistry;
034    import org.apache.directory.shared.ldap.schema.registries.DITStructureRuleRegistry;
035    import org.apache.directory.shared.ldap.schema.registries.LdapSyntaxRegistry;
036    import org.apache.directory.shared.ldap.schema.registries.MatchingRuleRegistry;
037    import org.apache.directory.shared.ldap.schema.registries.MatchingRuleUseRegistry;
038    import org.apache.directory.shared.ldap.schema.registries.NameFormRegistry;
039    import org.apache.directory.shared.ldap.schema.registries.NormalizerRegistry;
040    import org.apache.directory.shared.ldap.schema.registries.ObjectClassRegistry;
041    import org.apache.directory.shared.ldap.schema.registries.OidRegistry;
042    import org.apache.directory.shared.ldap.schema.registries.Registries;
043    import org.apache.directory.shared.ldap.schema.registries.Schema;
044    import org.apache.directory.shared.ldap.schema.registries.SchemaLoader;
045    import org.apache.directory.shared.ldap.schema.registries.SyntaxCheckerRegistry;
046    
047    
048    /**
049     * A class used to manage access to the Schemas and Registries. It's associated 
050     * with a SchemaLoader, in charge of loading the schemas from the disk.
051     * 
052     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
053     * @version $Rev$, $Date$
054     */
055    public interface SchemaManager
056    {
057        //---------------------------------------------------------------------------------
058        // Schema loading methods
059        //---------------------------------------------------------------------------------
060        /**
061         * Load some Schemas into the registries. The Registries is checked after the 
062         * schemas have been loaded, and if there is an error, the method returns false
063         * and the registries is kept intact.
064         * <br>
065         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
066         * <br>
067         * If any error was met, the {@link #getErrors} method will contain them
068         * 
069         * @param schemas the Schemas to load
070         * @return true if the schemas have been loaded and the registries is consistent
071         * @throws Exception @TODO 
072         */
073        boolean load( Schema... schemas ) throws Exception;
074    
075    
076        /**
077         * Load some Schemas into the registries. The Registries is checked after the 
078         * schemas have been loaded, and if there is an error, the method returns false
079         * and the registries is kept intact.
080         * <br>
081         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
082         * <br>
083         * If any error was met, the {@link #getErrors} method will contain them
084         * 
085         * @param schemas the Schemas' name to load
086         * @return true if the schemas have been loaded and the registries is consistent
087         * @throws Exception @TODO 
088         */
089        boolean load( String... schemas ) throws Exception;
090    
091    
092        /**
093         * Load some Schemas into the registries, and loads all of the schemas they depend
094         * on. The Registries is checked after the schemas have been loaded, and if there 
095         * is an error, the method returns false and the registries is kept intact.
096         * <br>
097         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
098         * <br>
099         * If any error was met, the {@link #getErrors} method will contain them
100         * 
101         * @param schemas the Schemas to load
102         * @return true if the schemas have been loaded and the registries is consistent
103         * @throws Exception @TODO 
104         */
105        boolean loadWithDeps( Schema... schemas ) throws Exception;
106    
107    
108        /**
109         * Load some Schemas into the registries, and loads all of the schemas they depend
110         * on. The Registries is checked after the schemas have been loaded, and if there 
111         * is an error, the method returns false and the registries is kept intact.
112         * <br>
113         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
114         * <br>
115         * If any error was met, the {@link #getErrors} method will contain them
116         * 
117         * @param schemas the Schemas' name to load
118         * @return true if the schemas have been loaded and the registries is consistent
119         * @throws Exception @TODO 
120         */
121        boolean loadWithDeps( String... schemas ) throws Exception;
122    
123    
124        /**
125         * Load Schemas into the registries, even if there are some errors in the schemas. 
126         * The Registries is checked after the schemas have been loaded. Even if we have 
127         * errors, the registries will be updated.
128         * <br>
129         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
130         * <br>
131         * If any error was met, the {@link #getErrors} method will contain them
132         * 
133         * @param schemas the Schemas to load, if enabled
134         * @return true if the schemas have been loaded
135         * @throws Exception @TODO 
136         */
137        boolean loadRelaxed( Schema... schemas ) throws Exception;
138    
139    
140        /**
141         * Load Schemas into the registries, even if there are some errors in the schemas. 
142         * The Registries is checked after the schemas have been loaded. Even if we have 
143         * errors, the registries will be updated.
144         * <br>
145         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
146         * <br>
147         * If any error was met, the {@link #getErrors} method will contain them
148         * 
149         * @param schemas the Schemas' name to load, if enabled
150         * @return true if the schemas have been loaded and the registries is consistent
151         * @throws Exception @TODO 
152         */
153        boolean loadRelaxed( String... schemas ) throws Exception;
154    
155    
156        /**
157         * Load some Schemas into the registries, and loads all of the schemas they depend
158         * on. The Registries is checked after the schemas have been loaded. Even if we have 
159         * errors, the registries will be updated.
160         * <br>
161         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
162         * <br>
163         * If any error was met, the {@link #getErrors} method will contain them
164         * 
165         * @param schemas the Schemas to load
166         * @return true if the schemas have been loaded
167         * @throws Exception @TODO 
168         */
169        boolean loadWithDepsRelaxed( Schema... schemas ) throws Exception;
170    
171    
172        /**
173         * Load some Schemas into the registries, and loads all of the schemas they depend
174         * on. The Registries is checked after the schemas have been loaded. Even if we have 
175         * errors, the registries will be updated.
176         * <br>
177         * The Schemas must be enabled, and only enabled SchemaObject will be loaded.
178         * <br>
179         * If any error was met, the {@link #getErrors} method will contain them
180         * 
181         * @param schemas the Schemas' name to load
182         * @return true if the schemas have been loaded
183         * @throws Exception @TODO 
184         */
185        boolean loadWithDepsRelaxed( String... schemas ) throws Exception;
186    
187    
188        /**
189         * Load Schemas into the Registries, even if they are disabled. The disabled
190         * SchemaObject from an enabled schema will also be loaded. The Registries will
191         * be checked after the schemas have been loaded. Even if we have errors, the
192         * Registries will be updated.
193         * <br>
194         * If any error was met, the {@link #getErrors} method will contain them
195         *
196         * @param schemas The Schemas to load
197         * @return true if the schemas have been loaded
198         * @throws Exception @TODO 
199         */
200        boolean loadDisabled( Schema... schemas ) throws Exception;
201    
202    
203        /**
204         * Load Schemas into the Registries, even if they are disabled. The disabled
205         * SchemaObject from an enabled schema will also be loaded. The Registries will
206         * be checked after the schemas have been loaded. Even if we have errors, the
207         * Registries will be updated.
208         * <br>
209         * If any error was met, the {@link #getErrors} method will contain them
210         *
211         * @param schemas The Schemas' name to load
212         * @return true if the schemas have been loaded
213         * @throws Exception @TODO 
214         */
215        boolean loadDisabled( String... schemas ) throws Exception;
216    
217    
218        /**
219         * Load all the enabled schema into the Registries. The Registries is strict,
220         * any inconsistent schema will be rejected. 
221         *
222         * @return true if the schemas have been loaded
223         * @throws Exception @TODO
224         */
225        boolean loadAllEnabled() throws Exception;
226    
227    
228        /**
229         * Load all the enabled schema into the Registries. The Registries is relaxed,
230         * even inconsistent schema will be loaded. 
231         *
232         * @return true if the schemas have been loaded
233         * @throws Exception @TODO
234         */
235        boolean loadAllEnabledRelaxed() throws Exception;
236    
237    
238        /**
239         * Unload the given set of Schemas
240         *
241         * @param schemas The list of Schema to unload
242         * @return True if all the schemas have been unloaded
243         */
244        boolean unload( Schema... schemas ) throws Exception;
245    
246    
247        /**
248         * Unload the given set of Schemas
249         *
250         * @param schemas The list of Schema to unload
251         * @return True if all the schemas have been unloaded
252         */
253        boolean unload( String... schemas ) throws Exception;
254    
255    
256        //---------------------------------------------------------------------------------
257        // Other Schema methods
258        //---------------------------------------------------------------------------------
259        /**
260         * Enables a set of Schemas, and returns true if all the schema have been
261         * enabled, with all the dependent schemas, and if the registries is 
262         * still consistent.
263         * 
264         * If the modification is ok, the Registries will be updated. 
265         * 
266         *  @param schemas The list of schemas to enable
267         *  @return true if the Registries is still consistent, false otherwise.
268         *  @throws If something went wrong
269         */
270        boolean enable( Schema... schemas ) throws Exception;
271    
272    
273        /**
274         * Enables a set of Schemas, and returns true if all the schema have been
275         * enabled, with all the dependent schemas, and if the registries is 
276         * still consistent.
277         * 
278         * If the modification is ok, the Registries will be updated.
279         *  
280         *  @param schemas The list of schema name to enable
281         *  @return true if the Registries is still consistent, false otherwise.
282         *  @throws If something went wrong
283         */
284        boolean enable( String... schemas ) throws Exception;
285    
286    
287        /**
288         * Enables a set of Schemas, and returns true if all the schema have been
289         * enabled, with all the dependent schemas. No check is done, the Registries
290         * might become inconsistent after this operation.
291         * 
292         *  @param schemas The list of schemas to enable
293         *  @return true if all the schemas have been enabled
294         */
295        boolean enableRelaxed( Schema... schemas );
296    
297    
298        /**
299         * Enables a set of Schemas, and returns true if all the schema have been
300         * enabled, with all the dependent schemas. No check is done, the Registries
301         * might become inconsistent after this operation.
302         * 
303         *  @param schemas The list of schema names to enable
304         *  @return true if all the schemas have been enabled
305         */
306        boolean enableRelaxed( String... schemas );
307    
308    
309        /**
310         * @return the list of all the enabled schema
311         */
312        List<Schema> getEnabled();
313    
314    
315        /**
316         * Tells if the given Schema is enabled
317         *
318         * @param schemaName The schema name
319         * @return true if the schema is enabled
320         */
321        boolean isEnabled( String schemaName );
322    
323    
324        /**
325         * Tells if the given Schema is enabled
326         *
327         * @param schema The schema
328         * @return true if the schema is enabled
329         */
330        boolean isEnabled( Schema schema );
331    
332    
333        /**
334         * Disables a set of Schemas, and returns true if all the schema have been
335         * disabled, with all the dependent schemas, and if the registries is 
336         * still consistent.
337         * 
338         * If the modification is ok, the Registries will be updated. 
339         * 
340         *  @param schemas The list of schemas to disable
341         *  @return true if the Registries is still consistent, false otherwise.
342         *  @throws If something went wrong
343         */
344        boolean disable( Schema... schemas ) throws Exception;
345    
346    
347        /**
348         * Disables a set of Schemas, and returns true if all the schema have been
349         * disabled, with all the dependent schemas, and if the registries is 
350         * still consistent.
351         * 
352         * If the modification is ok, the Registries will be updated. 
353         * 
354         *  @param schemas The list of schema names to disable
355         *  @return true if the Registries is still consistent, false otherwise.
356         *  @throws If something went wrong
357         */
358        boolean disable( String... schemas ) throws Exception;
359    
360    
361        /**
362         * Disables a set of Schemas, and returns true if all the schema have been
363         * disabled, with all the dependent schemas. The Registries is not checked
364         * and can be inconsistent after this operation
365         * 
366         * If the modification is ok, the Registries will be updated. 
367         * 
368         *  @param schemas The list of schemas to disable
369         *  @return true if all the schemas have been disabled
370         */
371        boolean disabledRelaxed( Schema... schemas );
372    
373    
374        /**
375         * Disables a set of Schemas, and returns true if all the schema have been
376         * disabled, with all the dependent schemas. The Registries is not checked
377         * and can be inconsistent after this operation
378         * 
379         * If the modification is ok, the Registries will be updated. 
380         * 
381         *  @param schemas The list of schema names to disable
382         *  @return true if all the schemas have been disabled
383         */
384        boolean disabledRelaxed( String... schemas );
385    
386    
387        /**
388         * @return the list of all the disabled schema
389         */
390        List<Schema> getDisabled();
391    
392    
393        /**
394         * Tells if the given Schema is disabled
395         *
396         * @param schemaName The schema name
397         * @return true if the schema is disabled
398         */
399        boolean isDisabled( String schemaName );
400    
401    
402        /**
403         * Tells if the given Schema is disabled
404         *
405         * @param schema The schema
406         * @return true if the schema is disabled
407         */
408        boolean isDisabled( Schema schema );
409    
410    
411        /**
412         * Check that the Schemas are consistent regarding the current Registries.
413         * 
414         * @param schemas The schemas to check
415         * @return true if the schemas can be loaded in the registries
416         * @throws Exception if something went wrong
417         */
418        boolean verify( Schema... schemas ) throws Exception;
419    
420    
421        /**
422         * Check that the Schemas are consistent regarding the current Registries.
423         * 
424         * @param schemas The schema names to check
425         * @return true if the schemas can be loaded in the registries
426         * @throws Exception if something went wrong
427         */
428        boolean verify( String... schemas ) throws Exception;
429    
430    
431        /**
432         * @return The Registries
433         */
434        Registries getRegistries();
435    
436    
437        /**
438         * Lookup for an AttributeType in the AttributeType registry
439         * 
440         * @param String oid the OID we are looking for
441         * @return The found AttributeType 
442         * @throws NamingException if the OID is not found in the AttributeType registry
443         */
444        AttributeType lookupAttributeTypeRegistry( String oid ) throws NamingException;
445    
446    
447        /**
448         * Lookup for a Comparator in the Comparator registry
449         * 
450         * @param String oid the OID we are looking for
451         * @return The found Comparator 
452         * @throws NamingException if the OID is not found in the Comparator registry
453         */
454        LdapComparator<?> lookupComparatorRegistry( String oid ) throws NamingException;
455    
456    
457        /**
458         * Lookup for a MatchingRule in the MatchingRule registry
459         * 
460         * @param String oid the OID we are looking for
461         * @return The found MatchingRule 
462         * @throws NamingException if the OID is not found in the MatchingRule registry
463         */
464        MatchingRule lookupMatchingRuleRegistry( String oid ) throws NamingException;
465    
466    
467        /**
468         * Lookup for a Normalizer in the Normalizer registry
469         * 
470         * @param String oid the OID we are looking for
471         * @return The found Normalizer 
472         * @throws NamingException if the OID is not found in the Normalizer registry
473         */
474        Normalizer lookupNormalizerRegistry( String oid ) throws NamingException;
475    
476    
477        /**
478         * Lookup for a ObjectClass in the ObjectClass registry
479         * 
480         * @param String oid the OID we are looking for
481         * @return The found ObjectClass 
482         * @throws NamingException if the OID is not found in the ObjectClass registry
483         */
484        ObjectClass lookupObjectClassRegistry( String oid ) throws NamingException;
485    
486    
487        /**
488         * Lookup for an LdapSyntax in the LdapSyntax registry
489         * 
490         * @param String oid the OID we are looking for
491         * @return The found LdapSyntax 
492         * @throws NamingException if the OID is not found in the LdapSyntax registry
493         */
494        LdapSyntax lookupLdapSyntaxRegistry( String oid ) throws NamingException;
495    
496    
497        /**
498         * Lookup for a SyntaxChecker in the SyntaxChecker registry
499         * 
500         * @param String oid the OID we are looking for
501         * @return The found SyntaxChecker 
502         * @throws NamingException if the OID is not found in the SyntaxChecker registry
503         */
504        SyntaxChecker lookupSyntaxCheckerRegistry( String oid ) throws NamingException;
505    
506    
507        /**
508         * Get an immutable reference on the AttributeType registry
509         * 
510         * @return A reference to the AttributeType registry.
511         */
512        AttributeTypeRegistry getAttributeTypeRegistry();
513    
514    
515        /**
516         * Get an immutable reference on the Comparator registry
517         * 
518         * @return A reference to the Comparator registry.
519         */
520        ComparatorRegistry getComparatorRegistry();
521    
522    
523        /**
524         * Get an immutable reference on the DITContentRule registry
525         * 
526         * @return A reference to the DITContentRule registry.
527         */
528        DITContentRuleRegistry getDITContentRuleRegistry();
529    
530    
531        /**
532         * Get an immutable reference on the DITStructureRule registry
533         * 
534         * @return A reference to the DITStructureRule registry.
535         */
536        DITStructureRuleRegistry getDITStructureRuleRegistry();
537    
538    
539        /**
540         * Get an immutable reference on the MatchingRule registry
541         * 
542         * @return A reference to the MatchingRule registry.
543         */
544        MatchingRuleRegistry getMatchingRuleRegistry();
545    
546    
547        /**
548         * Get an immutable reference on the MatchingRuleUse registry
549         * 
550         * @return A reference to the MatchingRuleUse registry.
551         */
552        MatchingRuleUseRegistry getMatchingRuleUseRegistry();
553    
554    
555        /**
556         * Get an immutable reference on the Normalizer registry
557         * 
558         * @return A reference to the Normalizer registry.
559         */
560        NormalizerRegistry getNormalizerRegistry();
561    
562    
563        /**
564         * Get an immutable reference on the NameForm registry
565         * 
566         * @return A reference to the NameForm registry.
567         */
568        NameFormRegistry getNameFormRegistry();
569    
570    
571        /**
572         * Get an immutable reference on the ObjectClass registry
573         * 
574         * @return A reference to the ObjectClass registry.
575         */
576        ObjectClassRegistry getObjectClassRegistry();
577    
578    
579        /**
580         * Get an immutable reference on the LdapSyntax registry
581         * 
582         * @return A reference to the LdapSyntax registry.
583         */
584        LdapSyntaxRegistry getLdapSyntaxRegistry();
585    
586    
587        /**
588         * Get an immutable reference on the SyntaxChecker registry
589         * 
590         * @return A reference to the SyntaxChecker registry.
591         */
592        SyntaxCheckerRegistry getSyntaxCheckerRegistry();
593    
594    
595        /**
596         * Get an immutable reference on the Normalizer mapping
597         * 
598         * @return A reference to the Normalizer mapping
599         */
600        Map<String, OidNormalizer> getNormalizerMapping();
601    
602    
603        /**
604         * Associate a new Registries to the SchemaManager
605         *
606         * @param registries The new Registries
607         */
608        void setRegistries( Registries registries );
609    
610    
611        /**
612         * @return The errors obtained when checking the registries
613         */
614        List<Throwable> getErrors();
615    
616    
617        /**
618         * Associate a Schema loader to this SchemaManager
619         *
620         * @param schemaLoader The schema loader to use
621         */
622        void setSchemaLoader( SchemaLoader schemaLoader );
623    
624    
625        /**
626         * @return the namingContext
627         */
628        DN getNamingContext();
629    
630    
631        /**
632         * Initializes the SchemaService
633         *
634         * @throws Exception If the initialization fails
635         */
636        void initialize() throws Exception;
637    
638    
639        /**
640         * @return The used loader
641         */
642        SchemaLoader getLoader();
643    
644    
645        /**
646         * Registers a new SchemaObject. The registries will be updated only if it's
647         * consistent after this addition, if the SchemaManager is in Strict mode.
648         * If something went wrong during this operation, the 
649         * SchemaManager.getErrors() will give the list of generated errors.
650         *
651         * @param schemaObject the SchemaObject to register
652         * @return true if the addition has been made, false if there were some errors
653         * @throws Exception if the SchemaObject is already registered or
654         * the registration operation is not supported
655         */
656        boolean add( SchemaObject schemaObject ) throws Exception;
657    
658    
659        /**
660         * Unregisters a new SchemaObject. The registries will be updated only if it's
661         * consistent after this deletion, if the SchemaManager is in Strict mode.
662         * If something went wrong during this operation, the 
663         * SchemaManager.getErrors() will give the list of generated errors.
664         *
665         * @param schemaObject the SchemaObject to unregister
666         * @return true if the deletion has been made, false if there were some errors
667         * @throws Exception if the SchemaObject is not registered or
668         * the deletion operation is not supported
669         */
670        boolean delete( SchemaObject schemaObject ) throws Exception;
671    
672    
673        /**
674         * Removes the registered attributeType from the attributeTypeRegistry 
675         * 
676         * @param String the attributeType OID to unregister
677         * @throws NamingException if the attributeType is invalid
678         */
679        SchemaObject unregisterAttributeType( String attributeTypeOid ) throws NamingException;
680    
681    
682        /**
683         * Removes the registered Comparator from the ComparatorRegistry 
684         * 
685         * @param String the Comparator OID to unregister
686         * @throws NamingException if the Comparator is invalid
687         */
688        SchemaObject unregisterComparator( String comparatorOid ) throws NamingException;
689    
690    
691        /**
692         * Removes the registered DitControlRule from the DitControlRuleRegistry 
693         * 
694         * @param String the DitControlRule OID to unregister
695         * @throws NamingException if the DitControlRule is invalid
696         */
697        SchemaObject unregisterDitControlRule( String ditControlRuleOid ) throws NamingException;
698    
699    
700        /**
701         * Removes the registered DitStructureRule from the DitStructureRuleRegistry 
702         * 
703         * @param String the DitStructureRule OID to unregister
704         * @throws NamingException if the DitStructureRule is invalid
705         */
706        SchemaObject unregisterDitStructureRule( String ditStructureRuleOid ) throws NamingException;
707    
708    
709        /**
710         * Removes the registered MatchingRule from the MatchingRuleRegistry 
711         * 
712         * @param String the MatchingRuleRule OID to unregister
713         * @throws NamingException if the MatchingRule is invalid
714         */
715        SchemaObject unregisterMatchingRule( String matchingRuleOid ) throws NamingException;
716    
717    
718        /**
719         * Removes the registered MatchingRuleUse from the MatchingRuleUseRegistry 
720         * 
721         * @param String the MatchingRuleUse OID to unregister
722         * @throws NamingException if the MatchingRuleUse is invalid
723         */
724        SchemaObject unregisterMatchingRuleUse( String matchingRuleUseOid ) throws NamingException;
725    
726    
727        /**
728         * Removes the registered NameForm from the NameFormRegistry 
729         * 
730         * @param String the NameForm OID to unregister
731         * @throws NamingException if the NameForm is invalid
732         */
733        SchemaObject unregisterNameForm( String nameFormOid ) throws NamingException;
734    
735    
736        /**
737         * Removes the registered Normalizer from the NormalizerRegistry 
738         * 
739         * @param String the Normalizer OID to unregister
740         * @throws NamingException if the Normalizer is invalid
741         */
742        SchemaObject unregisterNormalizer( String normalizerOid ) throws NamingException;
743    
744    
745        /**
746         * Removes the registered ObjectClass from the ObjectClassRegistry 
747         * 
748         * @param String the ObjectClass OID to unregister
749         * @throws NamingException if the ObjectClass is invalid
750         */
751        SchemaObject unregisterObjectClass( String objectClassOid ) throws NamingException;
752    
753    
754        /**
755         * Removes the registered LdapSyntax from the LdapSyntaxRegistry 
756         * 
757         * @param String the LdapSyntax OID to unregister
758         * @throws NamingException if the LdapSyntax is invalid
759         */
760        SchemaObject unregisterLdapSyntax( String ldapSyntaxOid ) throws NamingException;
761    
762    
763        /**
764         * Removes the registered SyntaxChecker from the SyntaxCheckerRegistry 
765         * 
766         * @param String the SyntaxChecker OID to unregister
767         * @throws NamingException if the SyntaxChecker is invalid
768         */
769        SchemaObject unregisterSyntaxChecker( String syntaxCheckerOid ) throws NamingException;
770    
771    
772        /**
773         * Returns a reference to the global OidRegistry
774         *
775         * @return The the global OidRegistry
776         */
777        OidRegistry getGlobalOidRegistry();
778    
779    
780        /**
781         * Gets a schema that has been loaded into these Registries.
782         * 
783         * @param schemaName the name of the schema to lookup
784         * @return the loaded Schema if one corresponding to the name exists
785         */
786        Schema getLoadedSchema( String schemaName );
787    
788    
789        /**
790         * Tells if the specific schema is loaded
791         *
792         * @param schemaName The schema we want to check
793         * @return true if the schema is laoded
794         */
795        boolean isSchemaLoaded( String schemaName );
796        
797        
798        /**
799         * Get the list of Schema names which has the given schema name as a dependence
800         *
801         * @param schemaName The Schema name for which we want to get the list of dependent schemas
802         * @return The list of dependent schemas
803         */
804        Set<String> listDependentSchemaNames( String schemaName );
805    }