org.dsmltools
Class LDAP2DSML
java.lang.Object
|
+--org.dsmltools.DSMLFile
|
+--org.dsmltools.LDAP2DSML
- public class LDAP2DSML
- extends DSMLFile
This class exposes functionality to export a DSML file from a directory.
This program takes LDAP host and search parameters on the command line,
connects to the given LDAP server and performs the search. It takes the
results given and, according to options set, outputs them as a DSML file
to stdout or a specified file.
The command syntax is as follows. Bold indicates a mandatory option.
LDAP2DSML outfile -h ldap.example.com [options]
Connection options:
- --host -h LDAP host.
- --port -p Port on the server to connect to. Default - 389.
- --username -u Username. Omit for anonymous login.
- --password -w Password. Omit for anonymous login.
Search options:
- --basedn -b The base DN (distinguished name) for the search.
Default - root.
- --filter -f An LDAP filter string, e.g. "(objectclass=person)".
Default - no filter.
- --attributes -a A comma-separated list of attributes to return.
Default - all user attributes.
- --scope -s Defines the scope of the search. Followed by one of
the following keywords:
- base - scope includes only the base DN
- one - scope includes base DN and entries one level below it
- sub - scope includes base DN and entries at all levels below it.
Default.
- --deref -d Defines how alias dereferencing is done during
search. Followed by one of the following keywords:
- never - never dereference
- always - always dereference
- search - dereference during searching only. Default.
- find - dereference during finding of the base DN only.
- --maxresults -z Maximum number of results to return. Default - all.
(-z for compatibility with ldapsearch).
Output options:
- --contains -c Defines the contents of the DSML file. Followed by
one of the following keywords:
- schema - just schema information
- data - just the data
- all - both schema and data. Default.
- --fullschema -e Output the entire directory schema, not just the
bits referenced by the data.
- --quick -q Quick mode - do not validate DSML documents
- --help -? Prints a usage message.
E.g.:
LDAP2DSML -h ldap.ex.com -u "cn=Fred Bloggs" -w SecretWord -m 50 -s one
-b "ou=Sales,o=Ace Ltd,c=us" -a "cn, email" > out.dsml
Method Summary |
static void |
main(java.lang.String[] xiArgs)
This method drives the LDAP2DSML process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LDAP2DSML
public LDAP2DSML()
main
public static void main(java.lang.String[] xiArgs)
- This method drives the LDAP2DSML process.
- Parameters:
xiArgs
- The command-line arguments