private Collection<String> getAllStackComponents(Stack stack) {
    Collection<String> allComponents = new HashSet<>();
    for (Collection<String> components: stack.getComponents().values()) {
      allComponents.addAll(components);
    }
    // currently ambari server is no a recognized component
    allComponents.add(RootComponent.AMBARI_SERVER.name());

    return allComponents;
  }
Obtain all component names for the specified stack.

@return collection of component names for the specified stack
@throws IllegalArgumentException if the specified stack doesn't exist
ambari-server/src/main/java/org/apache/ambari/server/topology/BlueprintFactory.java