+ " (" + factory.getBundleContext().getBundle().getBundleId() + ")";
data.put("bundle", bundle);
// Provided service specifications
if (factory.getComponentDescription().getprovidedServiceSpecification().length != 0) {
JSONArray services = new JSONArray
(Arrays.asList(factory.getComponentDescription().getprovidedServiceSpecification()));
data.put("services", services);
}
// Properties
PropertyDescription[] props = factory.getComponentDescription().getProperties();
if (props != null && props.length != 0) {
JSONArray properties = new JSONArray();
for (int i = 0; i < props.length; i++) {
JSONObject prop = new JSONObject();
prop.put("name", props[i].getName());
prop.put("type", props[i].getType());
prop.put("mandatory", props[i].isMandatory());
prop.put("immutable", props[i].isImmutable());
if (props[i].getValue() != null) {
prop.put("value", props[i].getValue());
}
properties.put(prop);
}
data.put("properties", properties);
}
if (! factory.getRequiredHandlers().isEmpty()) {
JSONArray req = new JSONArray
(factory.getRequiredHandlers());
data.put("requiredHandlers", req);
}
if (! factory.getMissingHandlers().isEmpty()) {
JSONArray req = new JSONArray
(factory.getMissingHandlers());
data.put("missingHandlers", req);
}
List<?> instances = StateUtils.getInstanceList(m_archs, name);
if (! instances.isEmpty()) {
JSONArray req = new JSONArray(instances);
data.put("instances", req);
}
data.put("architecture", factory.getDescription().toString());
resp.put("data", data);