Package org.jitterbit.integration.client.ldap.ui

Examples of org.jitterbit.integration.client.ldap.ui.SelectedObjectStructures


            this.classes = classes;
        }

        @Override
        public void run() {
            SelectedObjectStructures s = readStructures();
            setSelectedStructures(s);
        }
View Full Code Here


    public void refresh(final SelectedObjectClasses classes, final Receiver<SelectedObjectStructures> resultHandler) {
        GetLdapStructuresCallback callback = new GetLdapStructuresCallback() {

            @Override
            public void structuresRetrieved(ObjectClassStructure[] retrieved) {
                SelectedObjectStructures structures = new SelectedObjectStructures(classes);
                for (ObjectClassStructure struct : retrieved) {
                    structures.addStructure(struct.getOid(), struct);
                }
                resultHandler.handle(structures);
            }

            @Override
View Full Code Here

     *            the local cache with cached LDAP information
     * @return a <code>SelectedObjectStructures</code> instance holding the cached structure
     *         information.
     */
    public SelectedObjectStructures getModelStructures(SelectedObjectClasses classes, LdapStructureServerCache ldapCache) {
        SelectedObjectStructures structures = new SelectedObjectStructures(classes);
        DefaultClassStructureRetrieverCallback callback = new DefaultClassStructureRetrieverCallback();
        ObjectClassStructureRetriever retriever = new ObjectClassStructureRetriever();
        retriever.setLdapCache(ldapCache);
        retriever.retrieveStructures(
                        classes.getClassDefinitionOids(),
                        classes.getLdapLocation(),
                        callback,
                        true,
                        new DummyWaitService() /* TODO: Use a real WaitService */);
        ObjectClassStructure[] structs = callback.getStructures();
        if (structs == null) {
            // Happens if there is an error on the server side, e.g. the user credentials
            // specified in the LDAP target are wrong
            return null;
        }
        for (ObjectClassStructure struct : structs) {
            structures.addStructure(struct.getOid(), struct);
        }
        return structures;
    }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.client.ldap.ui.SelectedObjectStructures

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.