use of org.osgi.service.component.runtime.dto.ComponentDescriptionDTO in project felix by apache.
the class WebConsolePlugin method renderResult.
private void renderResult(final PrintWriter pw, RequestInfo info, final ComponentConfigurationDTO component) throws IOException {
final JSONWriter jw = new JSONWriter(pw);
jw.object();
// $NON-NLS-1$
jw.key("status");
jw.value(info.configurations.size());
if (!info.configurations.isEmpty()) {
// render components
// $NON-NLS-1$
jw.key("data");
jw.array();
if (component != null) {
if (component.state == -1) {
component(jw, component.description, null, true);
} else {
component(jw, component.description, component, true);
}
} else {
for (final ComponentDescriptionDTO cd : info.disabled) {
component(jw, cd, null, false);
}
for (final ComponentConfigurationDTO cfg : info.configurations) {
component(jw, cfg.description, cfg, false);
}
}
jw.endArray();
}
jw.endObject();
}
Aggregations