Oracle® Fusion Middleware Administrator's Guide for Oracle Directory Server Enterprise Edition 11g Release 1 (11.1.1.7.0) Part Number E28972-01 |
|
|
PDF · Mobi · ePub |
Virtual data transformations are defined on existing data views, and enables you to create virtual data using the virtual data views. For information about how they work, see Virtual Data Transformations in the Reference for Oracle Directory Server Enterprise Edition.
This chapter covers the following topics:
You can add a virtual data transformation to any type of data view: an LDAP data view, an LDIF data view, a join data view, or a JDBC data view.
You cannot use DSCC to perform this task. Use the command line, as described in this procedure.
Add the transformation to a data view.
$ dpconf add-virtual-transformation -h host -p port view-name \ transformation-model transformation-action attribute-name [parameters...]
The transformation-model can be one of the mapping
, write
, and read
transformations.
The transformation-action can be one of the add-attr
, remove-attr
, add-attr-value
, remove-attr-value
, def-value
, and attr-value-mapping
actions.
Note that parameters might be mandatory, depending on the transformation-model and the transformation-action.
For information about transformation models, transformation actions, and transformation parameters, see Virtual Data Transformations in the Reference for Oracle Directory Server Enterprise Edition.
View the list of virtual transformations that are defined on a data view.
$ dpconf list-virtual-transformations -h host -p port view-name
The following sections provide use cases in which virtual data views are required, and the combination of transformation models and actions required to implement the use cases.
Use the following transformation rule to derive an attribute from the existing attributes of an entry. For example, when the following transformation rule is applied, it displays the mail
attribute derived from the givenName
and sn
attributes.
$ dpconf add-virtual-transformation dataview1 read add-attr \ mail \${givenName}.\${sn}@example.com
The following diagram indicates the transformation that occurs on user entries when they are returned in a search.
Use the following mapping transformation rule to add an attribute that is delivered as a part of a pure virtual attribute. For example, when the following transformation rule is applied, the givenName
is stored in the server even when it is not specified in the entry. The value is taken from the pure virtual attribute which is defined as mail \${givenName}@example.com
.
$ dpconf add-virtual-transformation dataview1 mapping add-attr \ mail \${givenName}@example.com
First add an entry that contains a virtual attribute, mail
, but no givenName
attribute. The virtual transformation generates the value for the givenName
attribute and the entry is stored with givenName
but without the mail
attribute. Then, doing a search on using the uid
attribute, retrieve the value for givenName
, and the same virtual transformation generates the value of the virtual attribute mail
.
The following diagram indicates the transformation that occurs on user entries.
Use the following transformation to display the value of an attribute that is specified by another attribute. For example, displaying uid
as cn
along with the value of cn
that is already stored in the entry. The following does not store the additional value to cn
but before the result is returned to the client, the transformation is applied.
$ dpconf add-virtual-transformation dataview1 read add-attr-value cn \${uid}
The following diagram indicates the transformation that occurs on user entries when they are returned in a search.
Use the following transformation rule to store the value of an attribute along with the value that you provide while adding a new entry. In this scenario, when you add an entry, an additional value for the mail
attribute is stored. This transformation is applied only at the time of creating new entries.
$ dpconf add-virtual-transformation dataview1 write add-attr-value \ mail \${uid}@example.com
The following diagram indicates the transformation that occurs on an add request.
Use the following transformation rule if you do not want to display an attribute in the output. For example, when the following transformation rule is applied, the givenName
is not returned in the output.
dpconf add-virtual-transformation dataview1 read remove-attr givenName
The following diagram indicates the transformation that occurs on user entries when they are returned in a search.
Use the following transformation rule if you do not want to store a specific attribute. For example, when the following transformation rule is applied, the givenName
attribute is not stored in the physical database. This transformation is applied only at the time of creating new entries.
$ dpconf add-virtual-transformation dataview1 write remove-attr givenName
The following diagram indicates the transformation that occurs on an add request.
Use the following transformation if you want to display a default value assigned to an attribute. For example, when the following transformation is applied, a default telephone number in the entries that do not contain their own telephone number is displayed.
$ dpconf add-virtual-transformation data-view read 11111 telephoneNumber default-number
The following diagram indicates the transformation that occurs on user entries when they are returned in a search.
The default value is stored only if the value for an attribute is not specified during the creation of an entry. Use the following transformation rule if you want to store an attribute with the default value. For example, when the following transformation is applied, a default telephone number with each entry you create is added. This transformation is applied only at the time of adding an entry.
$ dpconf add-virtual-transformation dataview1 write 11111 \
telephoneNumber telephone-number
The following diagram indicates the transformation that occurs on an add request.