Package org.apache.ambari.server.state.stack

Examples of org.apache.ambari.server.state.stack.RepositoryXml$Os


  private List<RepositoryInfo> getRepository(File repositoryFile, StackInfo stack,
      List<LatestRepoCallable> lookupList)
      throws JAXBException {
   
    RepositoryXml rxml = StackExtensionHelper.unmarshal(RepositoryXml.class, repositoryFile);

    List<RepositoryInfo> list = new ArrayList<RepositoryInfo>();

    for (Os o : rxml.getOses()) {
      for (String os : o.getType().split(",")) {
        for (Repo r : o.getRepos()) {
          RepositoryInfo ri = new RepositoryInfo();
          ri.setBaseUrl(r.getBaseUrl());
          ri.setDefaultBaseUrl(r.getBaseUrl());
          ri.setMirrorsList(r.getMirrorsList());
          ri.setOsType(os.trim());
          ri.setRepoId(r.getRepoId());
          ri.setRepoName(r.getRepoName());
          ri.setLatestBaseUrl(r.getBaseUrl());
         
          if (null != metainfoDAO) {
            LOG.debug("Checking for override for base_url");
            String key = generateRepoMetaKey(r.getRepoName(), stack.getVersion(),
                o.getType(), r.getRepoId(), REPOSITORY_XML_PROPERTY_BASEURL);
            MetainfoEntity entity = metainfoDAO.findByKey(key);
            if (null != entity) {
              ri.setBaseUrl(entity.getMetainfoValue());
            }
          }

          if (LOG.isDebugEnabled()) {
            LOG.debug("Adding repo to stack"
                + ", repoInfo=" + ri.toString());
          }

          list.add(ri);
        }
      }
    }
   
    if (null != rxml.getLatestURI() && list.size() > 0) {
      lookupList.add(new LatestRepoCallable(rxml.getLatestURI(),
          repositoryFile.getParentFile(), stack));
    }

    return list;
View Full Code Here


  }

  private List<RepositoryInfo> getRepository(File repositoryFile, String stackVersion)
      throws JAXBException {

    RepositoryXml rxml = StackExtensionHelper.unmarshal(RepositoryXml.class, repositoryFile);

    List<RepositoryInfo> list = new ArrayList<RepositoryInfo>();

    for (Os o : rxml.getOses()) {
      for (String os : o.getType().split(",")) {
        for (Repo r : o.getRepos()) {
          RepositoryInfo ri = new RepositoryInfo();
          ri.setBaseUrl(r.getBaseUrl());
          ri.setDefaultBaseUrl(r.getBaseUrl());
View Full Code Here

  private List<RepositoryInfo> getRepository(File repositoryFile, StackInfo stack,
      List<LatestRepoCallable> lookupList)
      throws JAXBException {

    RepositoryXml rxml = StackExtensionHelper.unmarshal(RepositoryXml.class, repositoryFile);

    List<RepositoryInfo> list = new ArrayList<RepositoryInfo>();

    for (Os o : rxml.getOses()) {
      for (String os : o.getType().split(",")) {
        for (Repo r : o.getRepos()) {
          RepositoryInfo ri = new RepositoryInfo();
          ri.setBaseUrl(r.getBaseUrl());
          ri.setDefaultBaseUrl(r.getBaseUrl());
          ri.setMirrorsList(r.getMirrorsList());
          ri.setOsType(os.trim());
          ri.setRepoId(r.getRepoId());
          ri.setRepoName(r.getRepoName());
          ri.setLatestBaseUrl(r.getBaseUrl());

          if (null != metainfoDAO) {
            LOG.debug("Checking for override for base_url");
            String key = generateRepoMetaKey(r.getRepoName(), stack.getVersion(),
                o.getType(), r.getRepoId(), REPOSITORY_XML_PROPERTY_BASEURL);
            MetainfoEntity entity = metainfoDAO.findByKey(key);
            if (null != entity) {
              ri.setBaseUrl(entity.getMetainfoValue());
            }
          }

          if (LOG.isDebugEnabled()) {
            LOG.debug("Adding repo to stack"
                + ", repoInfo=" + ri.toString());
          }

          list.add(ri);
        }
      }
    }

    if (null != rxml.getLatestURI() && list.size() > 0) {
      lookupList.add(new LatestRepoCallable(rxml.getLatestURI(),
          repositoryFile.getParentFile(), stack));
    }

    return list;
View Full Code Here

  private List<RepositoryInfo> getRepository(File repositoryFile, StackInfo stack,
      List<LatestRepoCallable> lookupList)
      throws JAXBException {

    RepositoryXml rxml = StackExtensionHelper.unmarshal(RepositoryXml.class, repositoryFile);

    List<RepositoryInfo> list = new ArrayList<RepositoryInfo>();

    for (Os o : rxml.getOses()) {
      for (String os : o.getType().split(",")) {
        for (Repo r : o.getRepos()) {
          RepositoryInfo ri = new RepositoryInfo();
          ri.setBaseUrl(r.getBaseUrl());
          ri.setDefaultBaseUrl(r.getBaseUrl());
          ri.setMirrorsList(r.getMirrorsList());
          ri.setOsType(os.trim());
          ri.setRepoId(r.getRepoId());
          ri.setRepoName(r.getRepoName());
          ri.setLatestBaseUrl(r.getBaseUrl());

          if (null != metainfoDAO) {
            LOG.debug("Checking for override for base_url");
            String key = generateRepoMetaKey(r.getRepoName(), stack.getVersion(),
                o.getType(), r.getRepoId(), REPOSITORY_XML_PROPERTY_BASEURL);
            MetainfoEntity entity = metainfoDAO.findByKey(key);
            if (null != entity) {
              ri.setBaseUrl(entity.getMetainfoValue());
            }
          }

          if (LOG.isDebugEnabled()) {
            LOG.debug("Adding repo to stack"
                + ", repoInfo=" + ri.toString());
          }

          list.add(ri);
        }
      }
    }

    if (null != rxml.getLatestURI() && list.size() > 0) {
      lookupList.add(new LatestRepoCallable(rxml.getLatestURI(),
          repositoryFile.getParentFile(), stack));
    }

    return list;
View Full Code Here

  }

  private List<RepositoryInfo> getRepository(File repositoryFile, String stackVersion)
      throws JAXBException {

    RepositoryXml rxml = StackExtensionHelper.unmarshal(RepositoryXml.class, repositoryFile);

    List<RepositoryInfo> list = new ArrayList<RepositoryInfo>();

    for (Os o : rxml.getOses()) {
      for (String os : o.getType().split(",")) {
        for (Repo r : o.getRepos()) {
          RepositoryInfo ri = new RepositoryInfo();
          ri.setBaseUrl(r.getBaseUrl());
          ri.setDefaultBaseUrl(r.getBaseUrl());
View Full Code Here

  }

  private List<RepositoryInfo> getRepository(File repositoryFile, String stackVersion)
      throws JAXBException {

    RepositoryXml rxml = StackExtensionHelper.unmarshal(RepositoryXml.class, repositoryFile);

    List<RepositoryInfo> list = new ArrayList<RepositoryInfo>();

    for (Os o : rxml.getOses()) {
      for (String os : o.getType().split(",")) {
        for (Repo r : o.getRepos()) {
          RepositoryInfo ri = new RepositoryInfo();
          ri.setBaseUrl(r.getBaseUrl());
          ri.setDefaultBaseUrl(r.getBaseUrl());
View Full Code Here

TOP

Related Classes of org.apache.ambari.server.state.stack.RepositoryXml$Os

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.