public Collection<StackInfo> getStacks(String stackName) throws AmbariException {
    Collection<StackInfo> stacks = stackManager.getStacks(stackName);

    if (stacks.isEmpty()) {
      throw new StackAccessException("stackName=" + stackName);
    }

    return stacks;
  }
Gets the module information for given mpack.
@param mpackId
@return List of Modules.
ambari-server/src/main/java/org/apache/ambari/server/api/services/AmbariMetaInfo.java