public List<DependencyInfo> getComponentDependencies(String stackName, String version,
                                                       String service, String component)
                                                       throws AmbariException {
    ComponentInfo componentInfo;
    try {
      componentInfo = getComponent(stackName, version, service, component);
    } catch (StackAccessException e) {
      throw new ParentObjectNotFoundException("Parent Component resource doesn't exist", e);
    }
    return componentInfo.getDependencies();
  }
Get all dependencies for a component.

@param stackName  stack name
@param version    stack version
@param service    service name
@param component  component name

@return List of dependencies for the given component
@throws AmbariException if unable to obtain the dependencies for the component
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java