Package org.jitterbit.integration.ldap.structure

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


    }

    private void buildModel(SelectedObjectStructures structures, LdapStructure ldapStructure) {
        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());
                if (auxStructs != null) {
                    auxClassSelection.setAuxiliaryClasses(classDef.getOid(), auxStructs);
                }
                buildTree(attrs, parent);
            } else {
                new UnknownStructureNode(parent);
            }
View Full Code Here


     *             if the OID of the classis not one of the selected classes that were passed to the
     *             constructor when this instance was created.
     */
    public void addStructure(NumericOid oid, ObjectClassStructure structure) {
        NumericOid toCheck = (structure != null) ? structure.getOid() : oid;
        ObjectClassDefinition classDef = classes.getClassDefinition(toCheck);
        checkArgument(classDef != null, "Unknown class: " + toCheck);
        structures.put(classDef, structure);
    }
View Full Code Here

     *         structure is known to this <code>SelectedObjectStructure</code> instance.
     *         <code>null</code> is returned if this instance does not know about the asked for
     *         class.
     */
    public ObjectClassStructure getStructure(NumericOid classOid) {
        ObjectClassDefinition classDef = classes.getClassDefinition(classOid);
        if (classDef != null) {
            return structures.get(classDef);
        }
        return null;
    }
View Full Code Here

        @Override
        public void objectClassesRetrieved(ObjectClassDefinition[] classes) {
            ObjectClassDefinition[] filtered = new ObjectClassDefinition[requestedOids.length];
            Map<NumericOid, ObjectClassDefinition> map = LdapUtils.toMap(classes);
            for (int n = 0; n < filtered.length; ++n) {
                ObjectClassDefinition classDef = map.get(requestedOids[n]);
                filtered[n] = classDef;
            }
            external.objectClassesRetrieved(filtered);
        }
View Full Code Here

        try {
            XmlPersistor root = XmlPersistor.load(file);
            List<ObjectClassDefinition> classDefs = new ArrayList<ObjectClassDefinition>();
            for (Persistor p : root.getChildren(CLASS_DEFINITION)) {
                try {
                    ObjectClassDefinition classDef = restoreDefinition(p);
                    classDefs.add(classDef);
                } catch (RuntimeException ex) {
                    ApplicationLog.getMainLogger().severe(
                                    "Invalid data encountered in LDAP object class cache, stored in the file " + file);
                }
View Full Code Here

    }

    private WsObjectClassInfoReturn convert(ObjectClassDefinition[] classDefinitions) {
        WsObjectClassInfo[] converted = new WsObjectClassInfo[classDefinitions.length];
        for (int n = 0, len = classDefinitions.length; n < len; ++n) {
            ObjectClassDefinition classDef = classDefinitions[n];
            converted[n] = new WsObjectClassInfo(
                            classDef.getOid().toString(),
                            classDef.getName(),
                            classDef.getType().name(),
                            classDef.getDescription(),
                            classDef.isObsolete());
        }
        return new WsObjectClassInfoReturn(converted);
    }
View Full Code Here

                                                        boolean skipObsoletethrows NamingException {
        ServerDebugLog.LOG.info("Looping over returned NameClassPairs");
        List<ObjectClassDefinition> defs = new ArrayList<ObjectClassDefinition>();
        while (names.hasMore()) {
            NameClassPair pair = names.next();
            ObjectClassDefinition def = getClassDefinition(schema, pair.getName(), skipAbstract, skipObsolete);
            if (skipAbstract && def.getType() == ObjectClassType.ABSTRACT) {
                continue;
            }
            if (skipObsolete && def.isObsolete()) {
                continue;
            }
            defs.add(def);
        }
        ServerDebugLog.LOG.info("Returning found objects (" + defs.size() + ")");
View Full Code Here

TOP

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

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.