Dirxml Script Policy Calling An Ecmascript Function; Xslt Policy Calling An Ecmascript Function At The Driver Level - Novell POLICIES IN IMANAGER 3.6.1 - 06-05-2009 Manual

Table of Contents

Advertisement

8.3.1 DirXML Script Policy Calling an ECMAScript Function

The DirXML
encoded photo data by calling the ECMAScript function
be used as an Input Transformation or Output Transformation policy.
The function reads an image from a URL and returns the content as Base64 encoded string.
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC "policy-builder-
dtd" "C:\Program
Files\Novell\Designer\eclipse\plugins\com.novell.designer.idm.policybuilder_1
.2.0.200612180606\DTD\dirxmlscript.dtd"><policy>
<rule>
<description>Reformat photo from URL to octet</description>
<conditions/>
<actions>
<do-reformat-op-attr name="photo">
<arg-value type="octet">
value))"/>
</arg-value>
</do-reformat-op-attr>
</actions>
</rule>
</policy>
Function:
Parameters:
Returns: Base64 encoded content of the image (or empty string if error)
The file
ReformatPhoto.xml
getB64ImageFromURL
phototest.xml)
Figure 8-1
The ECMAScript calls the getB64ImageFromURL function which then returns the current value as
a string.
8.3.2 XSLT Policy Calling an ECMAScript Function at the Driver
Level
The XSLT policy either splits a single comma-delimited value into multiple values, or joins multiple
values into a single comma-delimited value. The XSLT policy is defined at the driver level and is
used as an Input Transformation or Output Transformation policy.
88
Policies in iManager for Identity Manager 3.6.1
®
Script policy converts an attribute that is a URL reference to a photo to the Base64
<token-xpath expression="es:getB64ImageFromURL(string($current-
<static> String getB64ImageFromURL(<String> urlString)
(URL of the image file)
urlString
(../samples/ReformatPhoto.xml)
from a DirXML Script policy. The file
is a sample input document that shows the policy in action.
Reformat Photo Example
getB64ImageFromURL()
calls the ECMAScript function
(../samples/
phototest.xml
.The policy can

Advertisement

Table of Contents
loading

This manual is also suitable for:

Policies in imanager 3.6.1

Table of Contents