public List < String > getServicesIDByCategory ( String category ) { Set < String > servicesID = services . keySet ( ) ; Iterator < String > it = servicesID . iterator ( ) ; List < String > ids = new ArrayList < String > ( ) ; if ( category == null ) { return ids ; } String key ; while ( it . hasNext ( ) ) { key = it . next ( ) ; DescribeService service = services . get ( key ) ; if ( service . containsCategory ( category ) ) { ids . add ( key ) ; } } return ids ; }
Iterates the list of registered services and for those that support the category passed as a parameter return their ID