org.dsmltools
Class DSML2LDAP
java.lang.Object
org.dsmltools.DSMLFile
org.dsmltools.DSML2LDAP
public class DSML2LDAP
- extends DSMLFile
This class exposes functionality to import a DSML file into a directory.
This program reads in DSML, either from a file or from stdin, connects to
a specified LDAP server and executes add or delete operations based on
options set and the contents of the DSML file.
The command syntax is as follows. Bold indicates a mandatory option.
DSML2LDAP infile -h ldap.example.com [-a|-d] [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.
Configuration options:
- --add -a Adds the contents of the DSML file to the directory
- --delete -d Deletes the contents of the DSML file from the
directory
- --proceed -f Proceed with full DSML file (add and/or delete entries)
You must specify one of -a or -d or -f.
- --careful -c In "add" mode, this means we don't overwrite entries
that are already present. In "delete" mode, this means
we only delete entries that are an exact match, rather
than just matching on DN.
- --update -U In "add" mode, this means we add new entries, and update
existing one that exact match, not just matching on DN.
Other options:
- --quick -q Quick mode - do not validate DSML documents
- --namespace -n Namespace. Force a specified a namespace
- --help -? Prints a usage message.
E.g.:
DSML2LDAP in.dsml -h ldap.ex.com -u "cn=Fred Bloggs" -w SecretWord -a -c
Method Summary |
static void |
main(java.lang.String[] xiArgs)
This method drives the DSML2LDAP process. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DSML2LDAP
public DSML2LDAP()
main
public static void main(java.lang.String[] xiArgs)
- This method drives the DSML2LDAP process.
- Parameters:
xiArgs
- The command-line options