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