| Title: 4.2.1 - Schema Objects |
| NavPrev: 4.2-schema-manager.html |
| NavPrevText: 4.2 - Schema Manager |
| NavUp: 4.2-schema-manager.html |
| NavUpText: 4.2 - Schema Manager |
| NavNext: 4.2.2-registries.html |
| NavNextText: 4.2.2 - Registries |
| Notice: Licensed to the Apache Software Foundation (ASF) under one |
| or more contributor license agreements. See the NOTICE file |
| distributed with this work for additional information |
| regarding copyright ownership. The ASF licenses this file |
| to you under the Apache License, Version 2.0 (the |
| "License"); you may not use this file except in compliance |
| with the License. You may obtain a copy of the License at |
| . |
| http://www.apache.org/licenses/LICENSE-2.0 |
| . |
| Unless required by applicable law or agreed to in writing, |
| software distributed under the License is distributed on an |
| "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| KIND, either express or implied. See the License for the |
| specific language governing permissions and limitations |
| under the License. |
| |
| # 4.2.1 - Schema Objects |
| |
| ## Content |
| |
| * [AttributeTypes](4.2.1.1-attribute-types.html) |
| * [ObjectClasses](4.2.1.2-object-classes.html) |
| * [Syntaxes](4.2.1.3-syntaxes.html) |
| * [MatchingRules](4.2.1.4-matching-rules.html) |
| * [DITContentRules](4.2.1.5-dit-content-rules.html) |
| * [DITStructureRules](4.2.1.6-dit-structure-rules.html) |
| * [MatchingRuleUses](4.2.1.7-matching-rule-uses.html) |
| * [NameForms](4.2.1.8-name-forms.html) |
| * [ApacheDS Schema Elements](4.2.1.9-apacheds-schema-elements.html) |
| |
| # Introduction |
| |
| LDAP defines 8 different Schema Objects, that are used to define what we can store in a LDAP server, how what we store is organized, and which constraints are applied on those elements. |
| |
| In the API, we also define 3 other **SchemaObjects**, which are necessary to control the values and to compare them. They are hard coded, and can be extended if needed. |
| |
| ## The Schema Object list |
| |
| Here are the 8 LDAP **SchemaObject**s and the 3 additional ones : |
| |
| | Name | Description | |
| |---|---| |
| | **[ObjectClasses (e)](4.8-object-classes.html)** | Defines the permitted **AttributeType**s of an entry | |
| | **[AttributeTypes (...)](4.2-attribute-types.html)** | Defines the type of attributes we can store in an entry | |
| | **[Syntaxes (e)](4.9-syntaxes.html)** | Defines the syntax that is applied to the **AttributeType** values | |
| | **[MatchingRules (e)](4.5-matching-rules.html)** | The rules that are used to match **AttributeType**'s values | |
| | **[DITContentRules (e)](4.3-dit-content-rules.html)** | Defines the allowed or forbidden **AttributeType**s and **ObjectClasse**s | |
| | **[DITStructureRules (e)](4.4-dit-structure-rules.html)** | Defines the hierarchical relationships between entries | |
| | **[NameForms (e)](4.7-name-forms.html)** | Defines the **AttributeType**s that may be use in a **RDN** | |
| | **[MatchingRuleUses (e)](4.6-matching-rule-uses.html)** | Defines the **AttributeType**s that can be used for a **MatchingRule** | |
| | _**[SyntaxChecker (e)]()**_ | The function that do the check on values | |
| | _**[Normalizer (e)]()**_ | The function that normalize the values | |
| | _**[LdapComparator (e)]()**_ | The function that compare two values | |
| |
| The last three elements are ApacheDS specific. |
| |
| All those elements have some tight relationships. The following schema expose all the relations between all those elements : |
| |
| ![](images/SchemaObjects.png) |
| |
| ## Java Class hierarchy |
| |
| Here is the relation between the various Java classes that are implementing the various **SchemaObject**s elements : |
| |
| ![](images/SchemaObjectHier.png) |
| |
| As we can see, the 3 specific **SchemaObject**s are derived from a **LoadableSchemaObject** abstract class, which allows the developper to inject a new instance of one of those 3 **SchemaObject**s. |
| |
| From teh developper point of view, the interesting methods are the following : |
| |
| * equals() : checks that two **SchemaObject** instances are equals |
| * getDescription() : gets the DESC part of the **SchemaObject** |
| * getExtension(String) : gets the given extension (X-abc) |
| * getExtensions() : gets all the extensions for this **SchemaObject** |
| * getName() : gets the first name fo this **SchemaObject** |
| * getNames() : gets all the nales for this **SchemaObject** |
| * getObjectType() : gets the **SchemaObject** type |
| * getOid() : gets the **SchemaObject** OID |
| * getSchemaName() : gets the associated shcema name, if any |
| * getSpecification() : gets the OpenLDAP synatx specification for this **SchemaObject** |
| * hasExtension(String) : tells if this **SchemaObject** has some extensions |
| * isDisabled() : tells if this **SchemaObject** is disabled |
| * isEnabled() : tells if this **SchemaObject** is enabled |
| * isObsolete() : tells if this **SchemaObject** is obsolete and should not been used |
| * isReadOnly() : tells if this **SchemaObject** can't be modified |
| |
| All those methods are available for all the **SchemaObject**. There are specific methods available for each specific **SchemaObject**, taht will be exposed in the dedicated pages. |