Package org.jitterbit.integration.ldap.structure

Examples of org.jitterbit.integration.ldap.structure.ObjectClassStructure


        List<ObjectClassStructure> structs = new ArrayList<ObjectClassStructure>();
        for (NumericOid oid : oids) {
            // TODO: Instead of downloading all requested structures from the server
            // if one of them is missing in the cache, we could ask for only the ones
            // that are missing.
            ObjectClassStructure struct = cache.getClassStructure(oid);
            if (struct == null) {
                return false;
            }
            structs.add(struct);
        }
View Full Code Here


        // was not in the cache, and the user cancelled login or provided the wrong
        // credentials) and the model has not been refreshed, there are no
        // AttributeContributions yet.
        if (contributions != null) {
            for (NumericOid oid : delta.toRemove()) {
                ObjectClassStructure struct = auxClassStructures.get(oid);
                contributions.remove(struct);
            }
        }
    }
View Full Code Here

    }

    private void processAddedAuxClasses(NumericOid classOid, AuxClassDelta delta) {
        AttributeContributions contributions = getAttributeContributionsCreateIfNotExist(classOid);
        for (NumericOid oid : delta.toAdd()) {
            ObjectClassStructure struct = auxClassStructures.get(oid);
            contributions.add(struct);
        }
    }
View Full Code Here

        Map<NumericOid, ObjectClassStructure[]> auxInfo = translateAuxClassInfo(ldapStructure);
        for (Map.Entry<ObjectClassDefinition, ObjectClassStructure> e : structures.getStructuresAlphabetically()) {
            ObjectClassDefinition classDef = e.getKey();
            ClassNameNode parent = new ClassNameNode(classDef, getRoot());
            classNodes.put(classDef.getOid(), parent);
            ObjectClassStructure classStruct = e.getValue();
            if (classStruct != null) {
                Collection<LdapStructureAttribute> extAttrs = askStructureForExtendedAttributes(ldapStructure,
                                classStruct);
                AttributeContributions attrs = addAttributeContributions(classDef.getOid(), classStruct, extAttrs);
                ObjectClassStructure[] auxStructs = auxInfo.get(classDef.getOid());
View Full Code Here

        String[] compressedData = raw.getCompressedStructureStrings();
        ObjectClassStructure[] structs = new ObjectClassStructure[compressedData.length];
        for (int n = 0, len = compressedData.length; n < len; ++n) {
            try {
                String uncompr = JitterbitServerEncoding.base64DecodeAndInflateString(compressedData[n]);
                ObjectClassStructure e = xmlHandler.load(uncompr);
                structs[n] = e;
            } catch (DataFormatException ex) {
                callback.caught(new IntegrationServerException("The data returned by the server is corrupt", ex));
            }
        }
View Full Code Here

    public void getLdapStructures(LdapStructureSearchParameters searchParams, GetLdapStructuresCallback callback) {
        int len = searchParams.getObjectClasses().length;
        ObjectClassStructure[] structures = new ObjectClassStructure[len];
        DummyStructureFactory factory = new DummyStructureFactory();
        for (int n = 0; n < len; ++n) {
            ObjectClassStructure s = factory.newStructure(searchParams.getObjectClasses()[n].toString());
            structures[n] = s;
        }
        callback.structuresRetrieved(structures);
    }
View Full Code Here

     * @return a <code>List</code> of <code>LdapStructureEntryNode</code> objects.
     */
    public List<LdapStructureEntryNode> getEntryNodes() {
        List<LdapStructureEntryNode> nodes = Lists.newArrayList();
        for (Map.Entry<LdapStructureEntry, AttributeContributions> e : attributes.entrySet()) {
            ObjectClassStructure struct = classStructs.get(e.getKey().getOid());
            // struct is guaranteed to be != null, otherwise we would have got an
            // IllegalArgumentException from build()
            AttributeContributions attrs = attributes.get(e.getKey());
            LdapStructureEntryNode node = new LdapStructureEntryNodeImpl(e.getKey(), struct, attrs);
            nodes.add(node);
View Full Code Here

        }
        attributes.put(e, attrs);
    }
   
    private void addAttributes(NumericOid classOid, AttributeContributions attrs) {
        ObjectClassStructure struct = classStructs.get(classOid);
        checkArgument(struct != null, "Missing class structure for the OID " + classOid);
        attrs.add(struct);
    }
View Full Code Here

                }
                builder.setName(className);
                ServerDebugLog.LOG.fine("Creating structure for the class " + className);
                ServerDebugLog.LOG.finer("Found the following attributes: " + attrs);
                populateStructure(attrs, builder);
                ObjectClassStructure struct = builder.getStructure();
                knownStructures.put(oid, struct);
                return struct;
            } catch (NamingException ex) {
                String msg = "Failed to lookup class definitions.";
                if (className != null) {
View Full Code Here

        }
       
        private void checkSuperClass(Attributes attrs, ObjectClassStructureBuilder parent) throws NamingException {
            NumericOid supClass = lookupSuperClassOid(attrs);
            if (supClass != null) {
                ObjectClassStructure struct = getStructure(supClass);
                copyAttributes(struct, parent);
            }
        }
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.ldap.structure.ObjectClassStructure

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.