private void validateService(Service service, UpgradeCheckResult result,
                               List<String> errorMessages) throws AmbariException {
    Map<String, ServiceComponent> serviceComponents = service.getServiceComponents();
    for (ServiceComponent serviceComponent : serviceComponents.values()) {
      validateServiceComponent(serviceComponent, result, errorMessages);
    }
  }
Iterates over all service components belonging to a service and validates them.
@param service
@param result
@param errorMessages
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/checks/VersionMismatchCheck.java