扩展Schema语法定义的办法
Schema可以理解为所有要在目录中存放的节点对象的类型定义(可以说是类的定义)。要放入目录的所有节点都是这些类的实例。目录中所有节点的属性(如:name 之于 Person)也必须在Schema中定义,如:guid,password,email-address。类的定义在Schema中叫classSchema;属性的定义在Schema中叫attributeSchema。
有下列方法可扩展Schema:
有下列方法可扩展Schema:
- 从已有Schma定义中继承类 – 子类继承所有父类的属性。需要通过继承来扩展Schma的情况:
- When the existing class requires additional attributes, but otherwise is acceptable.
- When the ability to transform existing objects of the class into a new class is not required. It is not possible to add a subclass to an existing object.
- To use the existing Directory Manager snap-in to manage the extended attributes of the objects.
- 加入属性到已有的类定义上. When adding multiple attributes, perform this operation in a structured manner by defining an auxiliary class and adding that auxiliary class to the existing class.
- Modification of an existing class is required when an application requires the ability to extend existing objects of the class. For example, to add application-specific data to the User object, extend the class User normally, because you must handle existing Users and not just special Users created by your application.
- 创建新类定义. Create a new class; that is, a class derived from "Top" when no existing class fulfills the operational requirements