Search in sources :

Example 1 with MetaTypeObjectSummaryDTO

use of io.fabric8.api.jmx.MetaTypeObjectSummaryDTO in project fabric8 by jboss-fuse.

the class ProfileMetadata method addMetaData.

protected void addMetaData(MetaTypeSummaryDTO summary, MetaData metadata, Properties resources) {
    Map<String, Object> map = metadata.getDesignates();
    Map<String, Object> objects = metadata.getObjectClassDefinitions();
    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()));
        }
    }
}
Also used : OCD(org.apache.felix.metatype.OCD) JarEntry(java.util.jar.JarEntry) MetaTypeObjectSummaryDTO(io.fabric8.api.jmx.MetaTypeObjectSummaryDTO) Map(java.util.Map) HashMap(java.util.HashMap)

Aggregations

MetaTypeObjectSummaryDTO (io.fabric8.api.jmx.MetaTypeObjectSummaryDTO)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 JarEntry (java.util.jar.JarEntry)1 OCD (org.apache.felix.metatype.OCD)1