Codota Logo
CRepository.getId
Code IndexAdd Codota to your IDE (free)

How to use
getId
method
in
org.sonatype.nexus.configuration.model.CRepository

Best Java code snippets using org.sonatype.nexus.configuration.model.CRepository.getId (Showing top 19 results out of 315)

  • Common ways to obtain CRepository
private void myMethod () {
CRepository c =
  • Codota Iconnew DefaultCRepository()
  • Smart code suggestions by Codota
}
origin: org.sonatype.nexus/nexus-proxy

public String getId()
{
  return getCurrentConfiguration( false ).getId();
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

public CRepository getRepo(String repoId)
  throws IOException
{
 List<CRepository> repos = getNexusConfig().getRepositories();
 for (Iterator<CRepository> iter = repos.iterator(); iter.hasNext(); ) {
  CRepository cRepo = iter.next();
  // check id
  if (cRepo.getId().equals(repoId)) {
   return cRepo;
  }
 }
 return null;
}
origin: org.sonatype.nexus/nexus-test-harness-base

public static CRepository getRepo( String repoId )
  throws IOException
{
  List<CRepository> repos = getNexusConfig().getRepositories();
  for ( Iterator<CRepository> iter = repos.iterator(); iter.hasNext(); )
  {
    CRepository cRepo = iter.next();
    // check id
    if ( cRepo.getId().equals( repoId ) )
    {
      return cRepo;
    }
  }
  return null;
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

public M2LayoutedM1ShadowRepositoryConfiguration getRepoShadow(String repoId)
  throws IOException
{
 List<CRepository> repos = getNexusConfig().getRepositories();
 for (Iterator<CRepository> iter = repos.iterator(); iter.hasNext(); ) {
  CRepository cRepo = iter.next();
  // check id
  if (cRepo.getId().equals(repoId)) {
   M2LayoutedM1ShadowRepositoryConfiguration exRepoConf =
     new M2LayoutedM1ShadowRepositoryConfiguration((Xpp3Dom) cRepo.getExternalConfiguration());
   return exRepoConf;
  }
 }
 return null;
}
origin: org.sonatype.nexus/nexus-app

protected void validateRepository( CRepository settings, boolean create )
  throws ConfigurationException
{
  ApplicationValidationContext ctx = getRepositoryValidationContext();
  if ( !create && !StringUtils.isEmpty( settings.getId() ) )
  {
    // remove "itself" from the list to avoid hitting "duplicate repo" problem
    ctx.getExistingRepositoryIds().remove( settings.getId() );
  }
  ValidationResponse vr = configurationValidator.validateRepository( ctx, settings );
  if ( !vr.isValid() )
  {
    throw new InvalidConfigurationException( vr );
  }
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

 public M2RepositoryConfiguration getM2Repo(String id)
   throws IOException
 {
  List<CRepository> repos = getNexusConfig().getRepositories();

  for (Iterator<CRepository> iter = repos.iterator(); iter.hasNext(); ) {
   CRepository cRepo = iter.next();

   // check id
   if (cRepo.getId().equals(id)) {
    M2RepositoryConfiguration exRepoConf =
      new M2RepositoryConfiguration((Xpp3Dom) cRepo.getExternalConfiguration());

    return exRepoConf;
   }
  }

  return null;
 }
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

public M2GroupRepositoryConfiguration getGroup(String groupId)
  throws IOException
{
 List<CRepository> repos = getNexusConfig().getRepositories();
 for (Iterator<CRepository> iter = repos.iterator(); iter.hasNext(); ) {
  CRepository cRepo = iter.next();
  // check id
  if (cRepo.getId().equals(groupId)) {
   M2GroupRepositoryConfiguration exRepoConf =
     new M2GroupRepositoryConfiguration((Xpp3Dom) cRepo.getExternalConfiguration());
   return exRepoConf;
  }
 }
 return null;
}
origin: org.sonatype.nexus/nexus-app

private void fillValidationContextRepositoryIds( ApplicationValidationContext context )
{
  context.addExistingRepositoryIds();
  List<CRepository> repositories = getConfigurationModel().getRepositories();
  if ( repositories != null )
  {
    for ( CRepository repo : repositories )
    {
      context.getExistingRepositoryIds().add( repo.getId() );
    }
  }
}
origin: org.sonatype.nexus/nexus-configuration

if ( StringUtils.isEmpty( repo.getId() ) )
else if ( !repo.getId().matches( REPOSITORY_ID_PATTERN ) )
    repo.setName( repo.getId() );
    response.addValidationWarning( new ValidationMessage( "id", "Repository with ID='" + repo.getId()
                      + "' has no name, defaulted to it's ID." ) );
      new ValidationMessage( "id", "LocalStatus of repository with ID='" + repo.getId() ) + "' is wrong "
        + repo.getLocalStatus() + "! (Allowed values are: '" + LocalStatus.IN_SERVICE + "' and '"
        + LocalStatus.OUT_OF_SERVICE + "')" );
    if ( context.getExistingRepositoryIds().contains( repo.getId() ) )
      response.addValidationError( new ValidationMessage( "id", "Repository with ID=" + repo.getId() + " already exists!" ) );
    context.getExistingRepositoryIds().add( repo.getId() );
    if ( context.getExistingRepositoryShadowIds().contains( repo.getId() ) )
      response.addValidationError( new ValidationMessage( "id", "Repository " + repo.getId()
        + " conflicts with existing Shadow with same ID='" + repo.getId() + "'!" ) );
    if ( context.getExistingRepositoryGroupIds().contains( repo.getId() ) )
      response.addValidationError( new ValidationMessage( "id", "Repository " + repo.getId()
        + " conflicts with existing Group with same ID='" + repo.getId() + "'!" ) );
origin: org.sonatype.nexus/nexus-app

if ( repo.getId().equals( id ) )
origin: org.sonatype.nexus/nexus-app

String.format(
  "Repository \"%s\" (repoId=%s) corresponding type is not registered in Core, hence it's maxInstace check cannot be performed: Repository type %s:%s is unknown to Nexus Core. It is probably contributed by an old Nexus plugin. Please contact plugin developers to upgrade the plugin, and register the new repository type(s) properly!",
  repositoryModel.getName(), repositoryModel.getId(), repositoryModel.getProviderRole(),
  repositoryModel.getProviderHint() );
"Repository \"" + repositoryModel.getName() + "\" (id=" + repositoryModel.getId()
  + ") cannot be created. It's repository type " + rtd.toString() + " is limited to " + maxCount
  + " instances, and it already has " + String.valueOf( rtd.getInstanceCount() ) + " of them.";
origin: org.sonatype.nexus/nexus-test-harness-base

CRepository cRepo = NexusConfigUtil.getRepo( repo.getId() );
Assert.assertEquals( expected.getId(), cRepo.getId() );
Assert.assertEquals( expected.getChecksumPolicy(), cRepo.getChecksumPolicy() );
Assert.assertEquals( expected.getName(), cRepo.getName() );
origin: org.sonatype.nexus/nexus-configuration

if ( StringUtils.isBlank( cfg.getId() ) )
else if ( !cfg.getId().matches( REPOSITORY_ID_PATTERN ) )
if ( "all".equals( cfg.getId() ) )
  response.addValidationWarning( new ValidationMessage( "id", "Repository with ID='" + cfg.getId()
    + "' has no name, defaulted it's name to it's ID." ) );
  cfg.setName( cfg.getId() );
    + cfg.getId() + "\" has unacceptable value \"" + cfg.getLocalStatus() + "\"! (Allowed values are: \""
    + LocalStatus.IN_SERVICE + "\" and \"" + LocalStatus.OUT_OF_SERVICE + "\")", e ) );
origin: org.sonatype.nexus/nexus-proxy

File defaultStorageFile = new File( new File( configuration.getWorkingDirectory(), "storage" ), repo.getId() );
LocalRepositoryStorage ls = getLocalRepositoryStorage( repo.getId(), repo.getLocalStorage().getProvider() );
origin: org.sonatype.nexus/nexus-app

  public ManuallyConfiguredRepositoryTemplate createManuallyTemplate( CRepositoryCoreConfiguration configuration )
    throws ConfigurationException
  {
    final CRepository repoConfig = configuration.getConfiguration( false );

    RepositoryTypeDescriptor rtd =
      repositoryTypeRegistry.getRepositoryTypeDescriptor( repoConfig.getProviderRole(),
        repoConfig.getProviderHint() );

    if ( rtd == null )
    {
      final String msg =
        String.format(
          "Repository being created \"%s\" (repoId=%s) has corresponding type that is not registered in Core: Repository type %s:%s is unknown to Nexus Core. It is probably contributed by an old Nexus plugin. Please contact plugin developers to upgrade the plugin, and register the new repository type(s) properly!",
          repoConfig.getName(), repoConfig.getId(), repoConfig.getProviderRole(),
          repoConfig.getProviderHint() );

      throw new ConfigurationException( msg );
    }

    ContentClass contentClass = repositoryTypeRegistry.getRepositoryContentClass( rtd.getRole(), rtd.getHint() );

    return new ManuallyConfiguredRepositoryTemplate( this, "manual", "Manually created template", contentClass,
      null, configuration );
  }
}
origin: org.sonatype.nexus/nexus-test-harness-launcher

private void validateRepoInNexusConfig(RepositoryGroupResource group)
  throws IOException
{
 CRepository cGroup = getTest().getNexusConfigUtil().getRepo(group.getId());
 Assert.assertEquals(cGroup.getId(), group.getId());
 Assert.assertEquals(cGroup.getName(), group.getName());
 List<RepositoryGroupMemberRepository> expectedRepos = group.getRepositories();
 List<String> actualRepos = getTest().getNexusConfigUtil().getGroup(group.getId()).getMemberRepositoryIds();
 this.validateRepoLists(expectedRepos, actualRepos);
}
origin: org.sonatype.nexus/nexus-configuration-model

if ( cRepository.getId() != null )
  serializer.startTag( NAMESPACE, "id" ).text( cRepository.getId() ).endTag( NAMESPACE, "id" );
origin: org.sonatype.nexus/nexus-test-harness-launcher

Assert.assertEquals(cRepo.getId(), expected.getId());
Assert.assertEquals(cRepo.getName(), expected.getName());
CRepository cRepo = getTest().getNexusConfigUtil().getRepo(repo.getId());
Assert.assertEquals(expected.getId(), cRepo.getId());
origin: org.sonatype.nexus/nexus-proxy

getRemoteRepositoryStorage( repo.getId(), repo.getRemoteStorage().getUrl(),
  repo.getRemoteStorage().getProvider() );
org.sonatype.nexus.configuration.modelCRepositorygetId

Javadoc

Get repository ID. It should uniquely identify this repository across Nexus.

Popular methods of CRepository

  • getExternalConfiguration
    Get repository implementation's own configuration.
  • getRemoteStorage
    Get the remote storage definition of repository.
  • setExternalConfiguration
    Set repository implementation's own configuration.
  • setId
    Set repository ID. It should uniquely identify this repository across Nexus.
  • setIndexable
    Set if true, repository will get indexed. If false, the files and artifacts from repository will NOT
  • setName
    Set human readable Repository name.
  • setNotFoundCacheTTL
    Set notFoundCache, the neg-cache records time to live in minutes. How long will misses be cached.
  • setRemoteStorage
    Set the remote storage definition of repository.
  • setWritePolicy
    Set the policy of the repositories write capability, i.e. (ALLOW_WRITE, ALLOW_WRITE_ONCE, READ_ONLY)
  • setNotFoundCacheActive
    Set if true, NFC will be used. If false, no miss caching will happen.
  • setProviderHint
    Set the implementation of repository.
  • setProviderRole
    Set the type of repository.
  • setProviderHint,
  • setProviderRole,
  • getLocalStorage,
  • getName,
  • setSearchable,
  • getLocalStatus,
  • getProviderHint,
  • getNotFoundCacheTTL,
  • setBrowseable

Popular in Java

  • Reading from database using SQL prepared statement
  • getSystemService (Context)
  • getContentResolver (Context)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now