public ServiceInfo getService(String stackName, String version, String serviceName) throws AmbariException {
    ServiceInfo service = getStack(stackName, version).getService(serviceName);

    if (service == null) {
      throw new StackAccessException("stackName=" + stackName + ", stackVersion=" +
                                     version + ", serviceName=" + serviceName);
    }

    return service;
  }
Convenience method to use stack id instead of separate name and version.
@param service
           the service business object
@return  the service info instance defined from the stack for the business object
@throws AmbariException
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java