![]() ![]() ![]() ![]() |
Preparations |
Once you've set up the directory, or have directed your program to communicate with an existing directory, what sort of information can you expect to find there?There are two kinds of information that you can get from the directory: bindings and attributes. The directory can be viewed as consisting of name-to-object bindings. That is, each object in the directory has a corresponding name. An object in the directory can be retrieved by looking up its name. If you are using a naming service like the file system (as we will be doing in some of our examples), the objects are files and they are bound to file names.
Another kind of data that is stored in the directory are attributes. An object in the directory, in addition to having a name, also has an optional set of attributes. You can ask the directory for an object's attributes, as well as ask the directory to search for an object that has certain attributes.
Examples of accessing both these kinds of information are given in this trail. Specifics of exactly what you can access from a naming or directory service depend on how the particular service has been laid out and what information has been added into it.
Providing Directory Content for This Tutorial
To set up the file system namespace, run the Setup program. To run this program, you give it the name of the directory in which to create the tutorial test namespace. For example, typing the following:creates a directory "/tmp/tutorial" and populates it with directories and files.# java Setup /tmp/tutorialIn the directory examples in this trail, the results shown reflect how the LDAP directory has been set up using the configuration file (tutorial.ldif) that accompanies this tutorial. If you are using an existing server, or a server with a different setup, you may see different results.
![]() ![]() ![]() ![]() |
Preparations |