This chapter describes how entry type formats -- defined by object classes and their attributes -- can be controlled by editing parameters in the dsgw.conf file. The chapter contains the following sections:
The following sections describe entry types in detail:
The functionality of entry types appearing on gateway forms are controlled by parameters stored in dsgw.conf:
Parameters in the dsgw.conf
file are described in Appendix
A, "Parameters
Defined in the .conf File."
The
template parameter is used to map the gateway's HTML templates
for entry types to the Directory Server's LDAP object classes.
The
location parameter is used to define points in the directory
tree where new entries can be added. The parameter definitions must
precede newtype
parameter definitions in the
.conf file.
Each entry type is described by a newtype parameter. The newtype template indicates how the entry will be formatted and the location in the directory tree where the entry will be created. Entry types for the default gateway, such as the Create New Entry form (Figure 4-1), appear in the pop-up menu gateway forms,.
Before adding support for a new entry type (object class), decide:
The newtype and location parameters are described in Appendix A, "Parameters Defined in the .conf File."
The location parameter is used to define points in the directory tree where new entries can be added. The default locations defined in dsgw.conf are intended for the sample directory shipped with the Directory Server. They are unlikely to match the structure of the actual directory.
This section explains the following:
|
|
|
|
For simple directory structures, define locations that represent branch points in the directory. For complex structures, define branch points for the most commonly used directory branches only. |
|
|
|
|
Each entry type must be mapped to a location where that type of entry can be placed. The following example shows a mapping of locations and newtype parameters in dsgw.conf:
In the example, locations defined in the newtype parameter (such as country, org, or groups) correspond to handles defined in the location parameter. The friendly names (in quotes) in the third column indicate the choices that will appear in pull-down menus on gateway forms.
|
|
|
|
Location parameter definitions in dsgw.conf must be listed before newtype parameter definitions.
|
|
|
|
|
See Entry Types (Object Classes) for more information.
Assuming that the root DN is set to o=example.com, the mappings in the following example can be used to create people in the following organizational units:
ou=Accounting,
o=example.com
ou=Human
Resources, o=example.com
ou=Payroll,
o=example.com
ou=Product
Development, o=example.com
ou=Product
Testing, o=example.com
The following sections describe how to configure entry type DNs depending upon the format.
When a person or NT person entry is added to the directory, the gateway prompts for a unique DN. The unique DN is typically the user ID of a person in the organization.
Although DN formats can be based on the
common names of employees in the organization, common names are
frequently not unique within an organization.
The default DN format can be modified by editing the rdnattr variable within the newtype parameter.
To change the gateway configuration so that person entries are created using common name-based DNs rather than user ID-based DNs, edit the following line in the dsgw.conf file:
The following sections describe the object classes and attributes contained by the template files:
The default gateway supports the object classes listed in Default Object Classes.
Object class attributes associated with an entry type are defined by directives contained in gateway template files. Directives are instructions, written as HTML comments, that are interpreted by the gateway's CGI scripts. Each directive is an independent, single line of HTML in a template file (with the exception of <!-- GCONTEXT -->, which is embedded within an URL).
Entry-related directives are responsible for how the gateway displays, edits, adds, and lists directory entries. The most commonly used entry-related directive is DS_ATTRIBUTE, which determines how attributes in LDAP entries are displayed on gateway forms.
DS_ATTRIBUTE directives begin with a DS_ENTRYBEGIN tag and close with a DS_ENTRYEND tag.
Appendix B, "Gateway Directives," lists the possible arguments for the DS_ATTRIBUTE directive.
Adding an attribute to an object class requires adding an additional row to the HTML table in the template file where the object class is defined.
The syntax in the following example defines an Initials attribute for the orgperson object class:
<TR>
<TD VALIGN= "TOP" NOWRAP>Initials</TD>
<TD VALIGN= "TOP" NOWRAP><B>
<!-- DS ATTRIBUTE
"attr=Initials"
"syntax=cis"
"cols=>16" -->
</B></TD>
<TD> </TD>
<TD> </TD>
</TR>
To complete the row, two null cells are added. This maintains the HTML table format. For Asian character sets, substitute an ideographic space for the non-breaking space ( ) shown in the example.
Deleting an attribute from an object class requires deleting a complete row or part of a row from the HTML table where the object is defined. The following example shows the steps required to delete the mobile phone attribute from the orgperson object class:
The gateway can be extended to support additional object classes. This requires changing information in an existing object class template so that the gateway displays the associated entry type.
|
|
|
|
When extending object class definitions, the child should appear below the parent object class in the HTML file. Otherwise, the gateway cannot correctly interpret the HTML syntax. |
|
|
|
|
The easiest way to create a new object class is to extend an existing object class template, adding and deleting attributes as necessary. The following example shows the steps required to add a template for a new object class, examplePerson. The new template adds two custom attributes, dateOfBirth and preferredOS, to the inetOrgPerson object class.
See Considerations for Adding New Entry Types and Extending Search Preferences.
These steps are required when the object class is not a child of an existing object class.
|
|
|
|
Modify an existing search result form to create a new search results form. See Adding Information to Search Results and Removing Information from Search Results. |
|
|
|
|
| Previous |
Contents |
Index |
DocHome | Next |