List<SpyComponent> spyComponents = new ArrayList<SpyComponent>(size);
List<AlertComponent> alertComponents = new ArrayList<AlertComponent>(size);
List<MessageAlertChannelActiveAwareComponent> channelAwareComponents;
channelAwareComponents = new ArrayList<MessageAlertChannelActiveAwareComponent>(size);
CoreComponent coreComponent = null;
for (Component component : components) {
if (component instanceof SpyComponent) {
spyComponents.add((SpyComponent) component);
} else if (component instanceof AlertComponent) {
alertComponents.add((AlertComponent) component);
} else if (component instanceof MessageAlertChannelActiveAwareComponent) {
channelAwareComponents.add((MessageAlertChannelActiveAwareComponent) component);
} else if (component instanceof CoreComponent) {
coreComponent = (CoreComponent) component;
}
}
sbuff.append("<b>Components list:</b><br><br><br>");
if ("spy".equals(parameter)) {
getSpyHtmlView(spyComponents, sbuff);
} else if ("alert".equals(parameter)) {
getAlertHtmlView(alertComponents, sbuff);
} else if ("channel".equals(parameter)) {
getChannelHtmlView(channelAwareComponents, sbuff);
} else if ("rule".equals(parameter)) {
if (coreComponent != null) {
getAlertRuleHtmlView(coreComponent.getAlertRule(), sbuff);
}
}
response.getWriter().println(sbuff);
}