Examples of ObrRepositoryConfiguration


Examples of org.sonatype.nexus.obr.proxy.ObrRepositoryConfiguration

    repo.getRemoteStorage().setUrl("http://some-remote-repository/repo-root/obr.xml");

    final Xpp3Dom ex = new Xpp3Dom(DefaultCRepository.EXTERNAL_CONFIGURATION_NODE_NAME);
    repo.setExternalConfiguration(ex);

    final ObrRepositoryConfiguration exConf = new ObrRepositoryConfiguration(ex);

    repo.externalConfigurationImple = exConf;

    repo.setWritePolicy(RepositoryWritePolicy.READ_ONLY.name());
    repo.setNotFoundCacheActive(true);
    repo.setNotFoundCacheTTL(1440);

    final CRepositoryCoreConfiguration result =
        new CRepositoryCoreConfiguration(getTemplateProvider().getApplicationConfiguration(), repo,
            new CRepositoryExternalConfigurationHolderFactory<ObrRepositoryConfiguration>()
            {
              public ObrRepositoryConfiguration createExternalConfigurationHolder(final CRepository config) {
                return new ObrRepositoryConfiguration((Xpp3Dom) config.getExternalConfiguration());
              }
            });

    return result;
  }
View Full Code Here

Examples of org.sonatype.nexus.obr.proxy.ObrRepositoryConfiguration

    repo.setProviderHint(ObrRepository.ROLE_HINT);

    final Xpp3Dom ex = new Xpp3Dom(DefaultCRepository.EXTERNAL_CONFIGURATION_NODE_NAME);
    repo.setExternalConfiguration(ex);

    final ObrRepositoryConfiguration exConf = new ObrRepositoryConfiguration(ex);

    repo.externalConfigurationImple = exConf;

    repo.setWritePolicy(RepositoryWritePolicy.ALLOW_WRITE_ONCE.name());
    repo.setNotFoundCacheTTL(1440);

    final CRepositoryCoreConfiguration result =
        new CRepositoryCoreConfiguration(
            getTemplateProvider().getApplicationConfiguration(),
            repo,
            new CRepositoryExternalConfigurationHolderFactory<ObrRepositoryConfiguration>()
            {
              public ObrRepositoryConfiguration createExternalConfigurationHolder(final CRepository config) {
                return new ObrRepositoryConfiguration(
                    (Xpp3Dom) config.getExternalConfiguration());
              }
            });

    return result;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.