List selectedServices = SEPSelector.select(services, type, mediaType,
path, flags);
if (selectedServices == null || selectedServices.size() == 0)
return new ArrayList();
PrioritizedList list = new PrioritizedList();
for (int i = 0; i < selectedServices.size(); i++) {
Service s = (Service) selectedServices.get(i);
String priority = (s.getPriority() == null) ? PrioritizedList.PRIORITY_NULL
: s.getPriority().toString();
list.addObject(priority, s);
}
return list.getList();
}