LDAP Wrappers

Virtual DataPort supports the creation of wrappers for the extraction of data contained in LDAP servers. To create a wrapper of this type, it is needed to indicate the data source name encapsulating the access data to the LDAP server (DATASOURCENAME parameter).

To identify the data to extract, there are two options. You can use the OBJECTCLASSES parameter to specify the list of Object Classes in the LDAP server that the wrapper will access. With this option the requests to the server will be automatically generated by Virtual DataPort from the user queries.

Also, the wrapper can be created from an expression (LDAPEXPRESSION) which is directly delegated to the source. This expression can have interpolation variables including the predefined interpolation variable WHEREEXPRESSION (see section Using WHEREEXPRESSION). Remember that this variable can optimize NESTED joins delegating OR conditions in a simple query to a LDAP server.

To create a base view with this option, at least one object accessible with the expression must be selected.

Optionally, the kind of search can be selected. There are two kinds of search: recursive or in the level of root node only (the root node is specified in the data source URL). Recursive search is selected by default.

If RECURSIVESEARCH is TRUE, the LDAP query will recursively consider all the nodes in the subtree hanging from the node pointed by the data source path. If FALSE, the LDAP query will only consider the direct children of the node.

If SINGLE-VALUE is TRUE, the multivalued attributes of the base view will be converted into an array, where each element will be one of the values. If FALSE, all the values will be concatenated and separated with the character .

Optionally, as with the other wrappers, the schema of data returned by the wrapper may be specified (OUTPUTSCHEMA).

The wrapper creation statement also accepts the OR REPLACE modifier. Where specified, if there is already a wrapper with the same name, its definition is replaced by the new one.

Lastly, certain wrapper properties can be specified (SOURCECONFIGURATION). Virtual DataPort will take them into account to determine the operations that can be made on the wrapper. The applicable properties are indicated in the corresponding statement declaration and are explained in the section Wrapper Configuration Properties.

Syntax of the CREATE WRAPPER LDAP statement
CREATE [ OR REPLACE ] WRAPPER LDAP <name:identifier>
    [ FOLDER = <literal> ]
    DATASOURCENAME = <name:identifier>
    OBJECTCLASSES = <name:literal> [, <name:literal> ]*
    [ LDAPEXPRESSION = <name:literal> ]
    [ RECURSIVESEARCH = { TRUE | FALSE } ]
    [ SINGLE-VALUE = { TRUE | FALSE } ]
    [ OUTPUTSCHEMA ( <field> [, <field> ]* ) ]
    [ SOURCECONFIGURATION ( [ <source configuration property>
                            [, <source configuration property> ]* ] ) ]

<field> ::=
      <name:identifier> [ = <mapping:literal> ] [ : <type:literal> ]
         [ ( { OBL | OPT } ) ]
         [ ( DEFAULTVALUE <literal> ) ]
         [ EXTERN ]
         [ <inline constraints> ]*
    | <name:identifier> [ = <mapping:literal> ] : ARRAY OF ( <register field> )
        [ ( DEFAULTVALUE <literal> ) ]
        [ <inline constraints> ]*
    | <name:register field>

<register field> ::=
    <name:identifier> [ = <mapping:literal> ] :
        REGISTER OF ( <field> [, <field> ]* )
          [ ( DEFAULTVALUE <literal> ) ]
          [ <inline constraints> ]*

<source configuration property> ::=
    DATAINORDERFIELDSLIST = { DEFAULT | ( <name:identifier> { ASC | DESC }
                                      [, <name:identifier> { ASC | DESC } ]* ) }

The syntax of the modification statement of an LDAP wrapper is similar.

Syntax of the ALTER WRAPPER LDAP statement
ALTER WRAPPER LDAP <name:identifier>
    [ DATASOURCENAME = <name:identifier> ]
    [ OBJECTCLASSES = <name:literal> [, <name:literal> ]* ]
    [ LDAPEXPRESSION = <name:literal> ]
    [ RECURSIVESEARCH = { TRUE | FALSE } ]
    [ SINGLE-VALUE = { TRUE | FALSE } ]
    [ OUTPUTSCHEMA ( <field> [, <field> ]* ) ]
    [ SOURCECONFIGURATION ( [ <source configuration property>
    [, <source configuration property> ]* ] ) ]

<field> ::= (see Syntax of the CREATE WRAPPER LDAP statement)

<source configuration property> ::= (see Syntax of the CREATE WRAPPER LDAP statement)