Quickstart Guide

If you are familiar with Spring it is really easy. If not, there will be some kind of magic for you. But that dosen't matter, if you just use the higher API.

This guide just describes how you can use the higher API with the beans of this client library. If you want to map your own objects, please have a look at the mapping guide.

For a quick start please try the SimpleExample.java. Here is the documented and important source code of this class.

        //first we create the spring application context
        final String appContextFile =
        final ApplicationContext ac =
                new ClassPathXmlApplicationContext(appContextFile);
        //Obtain the sessionFactory from the application context
        final IOXSessionFactory sessionFactory =
                (IOXSessionFactory) ac.getBean("oxSessionFactory");
        //create the user to login
        final SimpleUser user = new SimpleUser();
        //login and get the session
        final IOXSession session = sessionFactory.login(user);
        //get a list of root folders and the folder module
        final List<Folder> rootFolders = session.getRootFolders();
        final IFolderModule<Folder> folderModule = session.getFolderModule();
        //walk through the root folders and their child folders
        for (final Folder folder : rootFolders) {
                final List<Folder> childes = folderModule.getSubFolders(folder);
                for (final Folder folder2 : childes) {
        //get the contact module
        final IOXContactModule contactModule = session.getContactModule();
        //get the default folder for contacts of the user
        final Folder contactFolder = contactModule.getDefaultFolder();
        //walk through the contacts of the user
        final List<Contact> contacts = contactModule.list(contactFolder);
        for (Contact contact : contacts) {