Package org.apache.felix.metatype

Examples of org.apache.felix.metatype.OCD


                {
                    continue;
                }

                // get ocd for the reference, ignore designate if none
                OCD ocd = ( OCD ) md.getObjectClassDefinitions().get( ocdRef );
                if ( ocd == null )
                {
                    continue;
                }
View Full Code Here


                throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "Object ocdRef attribute missing or invalid");
            }

            // determine OCD
            ObjectClassDefinition ocd = null;
            OCD localOcd = (OCD) localOcds.get(ocdRef);
            // ask meta type service for matching OCD if no local OCD has been defined
            ocd = (localOcd != null) ? new ObjectClassDefinitionImpl(localOcd) : getMetaTypeOCD(data, designate);
            if (ocd == null) {
                throw new ResourceProcessorException(ResourceProcessorException.CODE_OTHER_ERROR, "No Object Class Definition found with id=" + ocdRef);
            }
View Full Code Here

                Set<Map.Entry<String, Object>> entries = map.entrySet();
                for (Map.Entry<String, Object> entry : entries) {
                    String aPid = entry.getKey();
                    Object value = objects.get(aPid);
                    if (Objects.equal(pid, aPid) && value instanceof OCD) {
                        OCD ocd = (OCD) value;
                        answer.set(createMetaTypeObjectDTO(resources, ocd));
                    }
                }
            }
        };
View Full Code Here

            LOG.info("Warning! " + xmlFile + " does not exist so no OSGi MetaType metadata");
            metadata = new MetaData();
            Designate designate = new Designate();
            designate.setPid(pid);
            metadata.addDesignate(designate);
            OCD ocd = new OCD();
            ocd.setId(pid);
            metadata.addObjectClassDefinition(ocd);
        } else {
            MetaDataReader reader = new MetaDataReader();
            metadata = reader.parse(new FileInputStream(xmlFile));
        }
View Full Code Here

        Set<Map.Entry<String, Object>> entries = map.entrySet();
        for (Map.Entry<String, Object> entry : entries) {
            String pid = entry.getKey();
            Object value = objects.get(pid);
            if (value instanceof OCD) {
                OCD ocd = (OCD) value;
                MetaTypeObjectSummaryDTO object = summary.getOrCreateMetaTypeSummaryDTO(pid);
                object.setId(pid);
                object.setName(localize(resources, ocd.getName()));
                object.setDescription(localize(resources, ocd.getDescription()));
            }
        }
    }
View Full Code Here

TOP

Related Classes of org.apache.felix.metatype.OCD

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.