5398N/A<?
xml version="1.0" encoding="UTF-8" standalone="no"?>
5398N/A ! The contents of this file are subject to the terms of the 5398N/A ! Common Development and Distribution License, Version 1.0 only 5398N/A ! (the "License"). You may not use this file except in compliance 5398N/A ! You can obtain a copy of the license at 5398N/A ! See the License for the specific language governing permissions 5398N/A ! and limitations under the License. 5398N/A ! When distributing Covered Code, include this CDDL HEADER in each 5398N/A ! file and include the License file at 5398N/A ! add the following below this CDDL HEADER, with the fields enclosed 5398N/A ! by brackets "[]" replaced with your own identifying information: 5398N/A ! Portions Copyright [yyyy] [name of copyright owner] 5398N/A ! Copyright 2011 ForgeRock AS 5398N/A <!-- SDK ldapsearch Function --> 5398N/A <
function name="SDKldapSearch">
5398N/A This function performs an ldapsearch using the SDK java API
5398N/A <
function-
arg-
def name="dsInstanceHost" type="optional">
5398N/A Directory server hostname or IP address
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="hostname"/>
5398N/A <
function-
arg-
def name="dsInstancePort" type="optional">
5398N/A Directory server port number
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="Port number"/>
5398N/A <
function-
arg-
def name="dsInstanceDn" type="optional">
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="DN"/>
5398N/A <
function-
arg-
def name="dsInstancePswd" type="optional">
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="string"/>
5398N/A <
function-
arg-
def name="dsScope" type="optional">
5398N/A The scope of the search operation
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="string"/>
5398N/A <
function-
arg-
def name="dsBaseDN" type="optional">
5398N/A The baseDN for the search operation
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="dn"/>
5398N/A <
function-
arg-
def name="dsFilter" type="optional">
5398N/A The filter for the search operation
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="filter"/>
5398N/A <
function-
arg-
def name="dsAttributes" type="optional">
5398N/A Only return these attributes
5398N/A </
function-
arg-
description>
5398N/A <
function-
arg-
property name="type" value="string"/>
5398N/A myHost=String(dsInstanceHost)
5398N/A myPassword=String(dsInstancePswd).toCharArray()
5398N/A myFilter = '(objectClass=*)'
5398N/A factory = LDAPConnectionFactory(myHost,myPort)
5398N/A #TODO: handle search result references
5398N/A #TODO: not really a need to use writer to write to stdout
5398N/A except ErrorResultException, e:
5398N/A except ErrorResultIOException, e:
5398N/A except InterruptedException, e: