PreviousNext

Abstract and Concrete Classes

OM classes are defined as being either abstract or concrete. An abstract OM class is an OM class in which instances are not permitted. An abstract OM class may be defined so that subclasses can share a common set of OM attributes between them.

In contrast to abstract OM classes, instances of OM concrete classes are permitted. However, the definition of each OM concrete class may include the restriction that a client not be allowed to create instances of that OM class. For example, consider two alternative means of defining the OM classes used in XDS: DS_C_LIST_INFO and DS_C_READ_RESULT. DS_C_LIST_INFO and DS_C_READ_RESULT are subclasses of the abstract OM class DS_C_COMMON_RESULT.

The following figure shows the relationship of DS_C_LIST_INFO and DS_C_READ_RESULTS when the abstract OM class DS_C_COMMON_RESULT is defined and when it is not defined. It demonstrates that the presence of an abstract OM class enables the programmer to develop applications that process information more efficiently.


Comparison of Two Classes With/Without an Abstract OM Class

The following list contains the hierarchy of concrete and abstract OM classes in the directory service package. Abstract OM classes are shown in italics. The indentation shows the class hierarchy; for example, the abstract class OM_C_OBJECT is a superclass of the abstract class DS_C_COMMON_RESULTS, which in turn is a superclass of the concrete class DS_C_COMPARE_RESULT.

OM_C_OBJECT

· DS_C_ACCESS_POINT

· DS_C_ADDRESS

- DS_C_PRESENTATION_ADDRESS

· DS_C_ATTRIBUTE

- DS_C_AVA

- DS_C_ENTRY_MOD

- DS_C_FILTER_ITEM

· DS_C_ATTRIBUTE_ERROR

· DS_C_ATTRIBUTE_LIST

- DS_C_ENTRY_INFO

· DS_C_COMMON_RESULTS

- DS_C_COMPARE_RESULT

- DS_C_LIST_INFO

- DS_C_READ_RESULT

- DS_C_SEARCH_INFO

· DS_C_CONTEXT

· DS_C_CONTINUATION_REF

- DS_C_REFERRAL

· DS_C_ENTRY_INFO_SELECTION

· DS_C_ENTRY_MOD_LIST

· DS_C_ERROR

- DS_C_ABANDON_FAILED

- DS_C_ATTRIBUTE_PROBLEM

- DS_C_COMMUNICATIONS_ERROR

- DS_C_LIBRARY_ERROR

- DS_C_NAME_ERROR

- DS_C_SECURITY_ERROR

- DS_C_SERVICE_ERROR

- DS_C_SYSTEM_ERROR

- DS_C_UPDATE_ERROR

· DS_C_EXT

· DS_C_FILTER

· DS_C_LIST_INFO_ITEM

· DS_C_LIST_RESULT

· DS_C_NAME

- DS_C_DS_DN

· DS_C_OPERATION_PROGRESS

· DS_C_PARTIAL_OUTCOME_QUAL

· DS_C_RELATIVE_NAME

- DS_C_DS_RDN

· DS_C_SEARCH_RESULT

· DS_C_SESSION

In summary, an OM class is defined with the following elements:

· OM class name (indicated by an object identifier)

· Identity of its immediate superclass

· Definitions of the OM attribute types specific to the OM class

· Indication whether the OM class is abstract or concrete

· Constraints on the OM attributes

A complete description of OM classes, OM attributes, syntaxes, and values that are defined for XDS and XOM APIs are described in Part 4. Tables and textual descriptions, such as the one shown in the following figure for the concrete OM class DS_C_ATTRIBUTE, are provided for each OM class.


Complete Description of Concrete OM Class DS_C_ATTRIBUTE

The table shown in the preceding figure provides information under the following headings:

· OM Attribute

This is the name of each of the OM attributes.

· Value Syntax

This provides the syntaxes of each of the OM attribute's values.

· Value Length

This describes any constraints on the number of bits, octets, or characters in each value that is a string.

· Value Number

This describes any constraints on the number of values.

· Value Initially

This is any value with which the OM attribute can be initialized.

An OM class can be constrained to contain only one member of a set of OM attributes. In turn, OM attributes can be restricted to having no more than a fixed number of values, either 0 (zero) or 1 as an optional value, or exactly one mandatory value.

An OM attribute's value may be also constrained to a single syntax. That syntax can be further restricted to a subset of defined values.

An object passed as a parameter to an XOM and XDS function call needs to meet a minimum set of conditions, as follows:

· The type of each OM attribute must be specific to the object's OM class or one of its superclasses.

· The number of values of each OM attribute must be within OM class limits.

· The syntax of each value must be among those the OM class permits.

· The number of bits, octets, or characters in each string value must be within OM class limits.