@Override
  public Void call() throws Exception {
    if (MapUtils.isEmpty(m_vdfMap)) {
      return null;
    }

    boolean forLatest = (null == m_version);

    StackId stackId = new StackId(m_stack);

    VersionDefinitionXml xml = mergeDefinitions(stackId, m_version, m_vdfMap);

    if (null == xml) {
      return null;
    }

    if (forLatest) {
      xml.setStackDefault(true);
      m_stack.setLatestVersionDefinition(xml);
    } else {
      m_stack.addVersionDefinition(m_version, xml);
    }

    return null;
  }
Encapsulates the work to resolve the latest repo information for a stack.
This class must be used AFTER the stack has created its owned repositories.
ambari-server/src/main/java/org/apache/ambari/server/state/stack/RepoVdfCallable.java