public final List<StageWrapper> build(UpgradeContext upgradeContext) {
    List<StageWrapper> stageWrappers = beforeBuild(upgradeContext);
    stageWrappers = build(upgradeContext, stageWrappers);
    stageWrappers = afterBuild(upgradeContext, stageWrappers);
    return stageWrappers;
  }
Builds the stage wrappers, including any pre- and post-procesing that needs
to be performed.

@param upgradeContext
         the upgrade context (not {@code null}).
@return a list of stages, never {@code null}
ambari-server/src/main/java/org/apache/ambari/server/stack/upgrade/orchestrate/StageWrapperBuilder.java