Examples of ObjectClassDefinition


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

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

     *             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

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

     *         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

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

        @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

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

        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

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

    }

    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

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

                                                        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

Examples of org.osgi.service.metatype.ObjectClassDefinition

  }
 
  public void designate(String factoryPid, String pid, String ocdref,
                    Configuration conf, Vector currentAttributes){
   
    ObjectClassDefinition ocd;
    ocd = (ObjectClassDefinition) OCDs.get(ocdref);
   
    if(ocd != null){
      if(conf != null && currentAttributes.size() > 0){
        AttributeDefinition[] attrDefs = ocd.getAttributeDefinitions(ObjectClassDefinition.ALL);
        Hashtable ADs = new Hashtable(); //id is key
        for(int i = 0; i < attrDefs.length; i++){
          AttributeDefinition ad = attrDefs[i];
          ADs.put(ad.getID(), ad);
        }
View Full Code Here

Examples of org.osgi.service.metatype.ObjectClassDefinition

            {
                return ocd;
            }
        }

        ObjectClassDefinition xocd = null;
        final Locale localeObj = Util.parseLocaleString( locale );
        final ResourceBundle rb = osgiManager.resourceBundleManager.getResourceBundle( osgiManager.getBundleContext()
            .getBundle(), localeObj );
        final Map defaultConfig = osgiManager.getDefaultConfiguration();

        // simple configuration properties
        final ArrayList adList = new ArrayList();
        for ( int i = 0; i < CONF_PROPS.length; i++ )
        {
            final String key = CONF_PROPS[i++];
            final String defaultValue = ConfigurationUtil.getProperty( defaultConfig, key, CONF_PROPS[i] );
            final String name = getString( rb, "metadata." + key + ".name", key ); //$NON-NLS-1$ //$NON-NLS-2$
            final String descr = getString( rb, "metadata." + key + ".description", key ); //$NON-NLS-1$ //$NON-NLS-2$
            adList.add( new AttributeDefinitionImpl( key, name, descr, defaultValue ) );
        }

        // log level is select - so no simple default value; requires localized option labels
        adList.add( new AttributeDefinitionImpl( OsgiManager.PROP_LOG_LEVEL, getString( rb,
            "metadata.loglevel.name", OsgiManager.PROP_LOG_LEVEL ), //$NON-NLS-1$
            getString( rb, "metadata.loglevel.description", OsgiManager.PROP_LOG_LEVEL ), //$NON-NLS-1$
            AttributeDefinition.INTEGER, // type
            new String[]
                { String.valueOf( ConfigurationUtil.getProperty( defaultConfig, OsgiManager.PROP_LOG_LEVEL,
                    OsgiManager.DEFAULT_LOG_LEVEL ) ) }, // default values
            0, // cardinality
            new String[]
                { // option labels
            getString( rb, "log.level.debug", "Debug" ), //$NON-NLS-1$ //$NON-NLS-2$
                getString( rb, "log.level.info", "Information" ), //$NON-NLS-1$ //$NON-NLS-2$
                getString( rb, "log.level.warn", "Warn" ), //$NON-NLS-1$ //$NON-NLS-2$
                getString( rb, "log.level.error", "Error" ), //$NON-NLS-1$ //$NON-NLS-2$
            }, new String[]
            { "4", "3", "2", "1" } ) ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$

        // list plugins - requires localized plugin titles
        final TreeMap namesByClassName = new TreeMap();
        final String[] defaultPluginsClasses = OsgiManager.PLUGIN_MAP;
        for ( int i = 0; i < defaultPluginsClasses.length; i++ )
        {
            final String clazz = defaultPluginsClasses[i++];
            final String label = defaultPluginsClasses[i];
            final String name = getString( rb, label + ".pluginTitle", label ); //$NON-NLS-1$
            namesByClassName.put( clazz, name );
        }
        final String[] classes = ( String[] ) namesByClassName.keySet().toArray( new String[namesByClassName.size()] );
        final String[] names = ( String[] ) namesByClassName.values().toArray( new String[namesByClassName.size()] );

        adList.add( new AttributeDefinitionImpl( OsgiManager.PROP_ENABLED_PLUGINS, getString( rb,
            "metadata.plugins.name", OsgiManager.PROP_ENABLED_PLUGINS ), //$NON-NLS-1$
            getString( rb, "metadata.plugins.description", OsgiManager.PROP_ENABLED_PLUGINS ), //$NON-NLS-1$
            AttributeDefinition.STRING, classes, Integer.MIN_VALUE, names, classes ) );

        xocd = new ObjectClassDefinition()
        {

            private final AttributeDefinition[] attrs = ( AttributeDefinition[] ) adList
                .toArray( new AttributeDefinition[adList.size()] );
View Full Code Here

Examples of org.osgi.service.metatype.ObjectClassDefinition

                        // After getting the list of PIDs, a configuration  might be
                        // removed. So the getObjectClassDefinition will throw
                        // an exception, and this will prevent ALL configuration from
                        // being displayed. By catching it, the configurations will be
                        // visible
                        ObjectClassDefinition ocd = null;
                        try
                        {
                            ocd = mti.getObjectClassDefinition( idList[j], locale );
                        }
                        catch ( IllegalArgumentException ignore )
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.