3.8 Verb Tokens

This section contains detailed reference to all verbs available using the Policy Builder interface.

3.8.1 Escape Destination DN

Escapes a string according to the rules of the DN format of the destination data store.

Example

The example is from the predefined rules that come with Identity Manager. For more information, see Placement - Publisher Flat.

The action of Set Operation Destination DN uses the Escape Destination DN token to build the destination DN of the User object.

Placement Publisher Flat
Escape Destination DN

The Escape Destination DN token takes the value in Unique Name and sets it to the format for the destination DN.

3.8.2 Escape Source DN

Escapes a string according to the rules of the DN format of the source data store.

Example

Escape Source DN

3.8.3 Lower Case

Converts the characters in a string to lowercase.

Example

This example sets the e-mail address to be name@slartybartfast.com where the name equals the first character of the Given Name plus the Surname. The policy name is Policy: Create E-mail from Given Name and Surname and it is available for download at Novell’s support Web site. For more information, see Downloadable Identity Manager Policies.

Policy to Set Email Address
Lower Case

The Lower Case token sets all of the information in the action Set Destination attribute value to lowercase.

3.8.4 Parse DN

Converts a DN to an alternate format.

Example

The example uses the Parse DN token to build the value the Add Destination Attribute Value action. The example is from the predefined rules that come with Identity Manager. For more information, see Command Transformation - Create Departmental Container - Part 1 and Part 2.

Policy to Create Department Container Part 2
Parse DN
Editor

The Parse DN token is taking the information from the source DN and converting it to the dot notation. The information from the Parse DN is stored in the attribute value of OU.

Fields

Start

Specify the RDN index to start with:

  • Index 0 is the root-most RDN

  • Positive indexes are an offset from the root-most RDN

  • Index -1 is the leaf-most segment

  • Negative indexes are an offset from the leaf-most RDN towards the root-most RDN

Length

Number of RDN’s to include. Negative numbers are interpreted as (total # of segments + length) + 1. For example, for a DN with 5 segments a length of -1 = (5 + (-1)) + 1 = 5, -2 = (5 + (-2)) + 1 = 4, etc.

Source DN Format

Specifies the format used to parse the source DN.

Destination DN Format

Specify the format used to output the parsed DN.

Source DN Delimiter

Specify the custom source DN delimiter set if Source DN Format is set to custom.

Destination DN Delimiter

Specify the custom destination DN delimiter set if Destination DN Format is set to custom.

Remarks

If start and length are set to the default values {0,-1}, then the entire DN is used; otherwise only the portion of the DN specified by start and length is used.

When specifying custom DN formats, the eight characters that make up the delimiter set are defined as follows:

1. Typed Name Boolean Flag: 0 means names are not typed, and 1 means names are typed

2. Unicode No-Map Character Boolean Flag: 0 means don’t output or interpret unmappable Unicode characters as escaped hex digit strings, such as \FEFF. The following Unicode characters are not accepted by eDirectory: 0xfeff, 0xfffe, 0xfffd, and 0xffff.

3. Relative RDN Delimiter

4. RDN Delimiter

5. Name Divider

6. Name Value Delimiter

7. Wildcard Character

8. Escape Character

If RDN Delimiter and Relative RDN Delimiter are the same character, the orientation of the name is root right, otherwise the orientation is root left.

If there are more than eight characters in the delimiter set, the extra characters are considered as characters that need to be escaped, but they have no other special meaning.

3.8.5 Replace All

Replaces all occurrences of a regular expression in a string.

Fields

Regular Expression

Specify the regular expression that matches the substring to be replaced.

Replace With

Specify the replacement string.

Remarks

For details on creating regular expressions, see:

The pattern options CASE_INSENSITIVE, DOTALL, and UNICODE_CASE are used but can be reversed by using the appropriate embedded escapes.

Example

Replace All

3.8.6 Replace First

Replaces the first occurrence of a regular expression in a string.

Fields

Regular Expression

Specify the regular expression that matches the substring to replace.

Replace With

Specify the replacement string.

Remarks

The matching instance is replaced the string specified by the value specified in the Replace with field.

For details on creating regular expressions, see:

The pattern option CASE_INSENSITIVE, DOTALL, and UNICODE_CASE are used but can be reversed using the appropriate embedded escapes.

Example

The example reformats the telephone number (nnn)-nnn-nnnn to nnn-nnn-nnnn. The rule is from the predefined rules that come with Identity Manager. For more information, see Input or Output Transformation - Reformat Telephone Number from (nnn) nnn-nnnn to nnn-nnn-nnnn.

The Replace First token is used in the Reformat Operation Attribute action.

Policy to Reformat Telephone Number
Replace First
Editor

The regular expression of ^\((\d\d\d)\)\s*(\d\d\d)-(\d\d\d\d)$ represents (nnn) nnn-nnnn and the regular expression of $1-$2-$3 represents nnn. This rule transforms the format of the telephone number from (nnn) nnn-nnnn to nnn-nnn-nnnn.

3.8.7 Substring

Extracts a portion of a string.

Fields

Start

Specify the starting character index:

  • Index 0 is the first character.

  • Positive indexes are an offset from the start of the string.

  • Index -1 is the last character.

  • Negative indexes are an offset from the last character towards the start of the string.

For example, if the start is specified as -2, then it starts reading the first character from the end. If -3 is specified, then is starts 2 characters from the end.

Length

Number of characters from the start to include in the substring. Negative numbers are interpreted as (total # of characters + length) + 1. For example, -1 represents the entire length or the original string. If -2 is specified, the length is the entire -1. For a string with 5 characters a length of -1 = (5 + (-1)) + 1 = 5, -2 = (5 + (-2)) + 1 = 4, etc.

Example

This example sets the e-mail address to be name@slartybartfast.com where the name equals the first character of the Given Name plus the Surname. The policy name is Policy: Create E-mail from Given Name and Surname and it is available for download at Novell’s support Web site. For more information, see Downloadable Identity Manager Policies.

Policy to Push Back on Email Change
Substring

The Substring token is used twice in the action Set Destination Attribute Value. It takes the first character of the First Name attribute and adds eight characters of the Last Name attribute together to form one substring.

3.8.8 Upper Case

Converts the characters in a string to uppercase.

Example

The example converts the first and last name attributes of the User object to uppercase. The policy name is Policy: Convert First/Last Name to Upper Case and it is available for download at Novell’s support Web site. For more information, see Downloadable Identity Manager Policies.

Policy to Convert First/Last Name to Upper Case
Upper Case