List<SortableSelectItem> availableServices = new ArrayList<SortableSelectItem>();
Collection<Integer> availableServicesIds = ejb.getServiceSession().getAuthorizedVisibleServiceIds(getAdmin());
Iterator<Integer> iter = availableServicesIds.iterator();
while (iter.hasNext()) {
Integer id = (Integer) iter.next();
ServiceConfiguration serviceConfig = ejb.getServiceSession().getServiceConfiguration(getAdmin(), id.intValue());
String serviceName = ejb.getServiceSession().getServiceName(getAdmin(), id.intValue());
String hidden = "";
if (serviceConfig.isHidden()) {
hidden = "<Hidden, Debug mode>";
}
if (serviceConfig.isActive()) {
availableServices.add(new SortableSelectItem(serviceName, serviceName+ " (" + EjbcaJSFHelper.getBean().getText().get("ACTIVE") + ")" + hidden));
} else {
availableServices.add(new SortableSelectItem(serviceName, serviceName + " (" + EjbcaJSFHelper.getBean().getText().get("INACTIVE") + ")" + hidden));
}
}