Tabnine Logo
NoSuchRepositoryException
Code IndexAdd Tabnine to your IDE (free)

How to use
NoSuchRepositoryException
in
org.sonatype.nexus.proxy

Best Java code snippets using org.sonatype.nexus.proxy.NoSuchRepositoryException (Showing top 19 results out of 315)

origin: org.sonatype.nexus/nexus-indexer-lucene-app

public void optimizeRepositoryIndex( String repositoryId )
  throws IOException
{
  try
  {
    optimizeIndex( repositoryRegistry.getRepository( repositoryId ) );
  }
  catch ( NoSuchRepositoryException e )
  {
    // should never happen
    getLogger().error( e.getMessage(), e );
  }
}
origin: org.sonatype.nexus/nexus-proxy

public Repository getRepository( final String repoId )
  throws NoSuchRepositoryException
{
  final Map<String, Repository> repositories = getRepositoriesMap();
  if ( repositories.containsKey( repoId ) )
  {
    return repositories.get( repoId );
  }
  else
  {
    throw new NoSuchRepositoryException( repoId );
  }
}
origin: org.sonatype.nexus/nexus-indexer-lucene-app

public void optimizeGroupIndex( String groupId )
  throws IOException
{
  try
  {
    GroupRepository group = repositoryRegistry.getRepositoryWithFacet( groupId, GroupRepository.class );
    optimizeIndex( group );
  }
  catch ( NoSuchRepositoryException e )
  {
    // should never happen
    getLogger().error( e.getMessage(), e );
  }
}
origin: org.sonatype.nexus/nexus-proxy

public <T> T getRepositoryWithFacet( final String repoId, final Class<T> f )
  throws NoSuchRepositoryException
{
  final Repository r = getRepository( repoId );
  if ( r.getRepositoryKind().isFacetAvailable( f ) )
  {
    return r.adaptToFacet( f );
  }
  else
  {
    throw new NoSuchRepositoryException( repoId );
  }
}
origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin

getLogger().error(e.getMessage(), e);
continue;
getLogger().error(e.getMessage(), e);
origin: org.sonatype.nexus/nexus-app

throw new NoSuchRepositoryException( id );
origin: org.sonatype.nexus/nexus-indexer-lucene-rest-api

getLogger().error( e.getMessage(), e );
continue;
getLogger().error( e.getMessage(), e );
origin: org.sonatype.nexus/nexus-proxy

protected Repository getRepositoryForPathPrefixOrId( String pathPrefixOrId, Class<? extends Repository> kind )
  throws NoSuchRepositoryException
{
  List<? extends Repository> repositories = repositoryRegistry.getRepositoriesWithFacet( kind );
  Repository idMatched = null;
  Repository pathPrefixMatched = null;
  for ( Repository repository : repositories )
  {
    if ( StringUtils.equals( repository.getId(), pathPrefixOrId ) )
    {
      idMatched = repository;
    }
    if ( StringUtils.equals( repository.getPathPrefix(), pathPrefixOrId ) )
    {
      pathPrefixMatched = repository;
    }
  }
  if ( idMatched != null )
  {
    // id wins
    return idMatched;
  }
  if ( pathPrefixMatched != null )
  {
    // if no id found, prefix wins
    return pathPrefixMatched;
  }
  // nothing found
  throw new NoSuchRepositoryException( "pathPrefixOrId: '" + pathPrefixOrId + "'" );
}
origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

protected MavenRepository getMavenRepository(String id)
  throws ResourceException
{
 try {
  Repository repository = getUnprotectedRepositoryRegistry().getRepository(id);
  if (!repository.getRepositoryKind().isFacetAvailable(MavenRepository.class)) {
   throw new ResourceException(Status.CLIENT_ERROR_BAD_REQUEST, "This is not a Maven repository!");
  }
  return repository.adaptToFacet(MavenRepository.class);
 }
 catch (NoSuchRepositoryException e) {
  throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage(), e);
 }
}
origin: org.sonatype.nexus/nexus-rest-api

protected MavenRepository getMavenRepository( String id )
  throws ResourceException
{
  try
  {
    Repository repository = getUnprotectedRepositoryRegistry().getRepository( id );
    if ( !repository.getRepositoryKind().isFacetAvailable( MavenRepository.class ) )
    {
      throw new ResourceException( Status.CLIENT_ERROR_BAD_REQUEST, "This is not a Maven repository!" );
    }
    return repository.adaptToFacet( MavenRepository.class );
  }
  catch ( NoSuchRepositoryException e )
  {
    throw new ResourceException( Status.CLIENT_ERROR_NOT_FOUND, e.getMessage(), e );
  }
}
origin: org.sonatype.nexus/nexus-rest-api

throw new ResourceException( Status.CLIENT_ERROR_NOT_FOUND, e.getMessage() );
origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage());
origin: org.sonatype.nexus/nexus-indexer-lucene-rest-api

getLogger().error( e.getMessage(), e );
origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin

getLogger().error(e.getMessage(), e);
origin: org.sonatype.nexus/nexus-proxy

new ValidationMessage( "shadowOf", e.getMessage(), "The source nexus repository is not existing." );
origin: org.sonatype.nexus.plugins/nexus-indexer-lucene-plugin

public void handleDelete(NexusTask<?> task, Request request)
  throws ResourceException
{
 try {
  // check reposes
  if (getRepositoryGroupId(request) != null) {
   getRepositoryRegistry().getRepositoryWithFacet(getRepositoryGroupId(request), GroupRepository.class);
  }
  else if (getRepositoryId(request) != null) {
   try {
    getRepositoryRegistry().getRepository(getRepositoryId(request));
   }
   catch (NoSuchRepositoryException e) {
    getRepositoryRegistry().getRepositoryWithFacet(getRepositoryId(request), ShadowRepository.class);
   }
  }
  getNexusScheduler().submit("Internal", task);
  throw new ResourceException(Status.SUCCESS_NO_CONTENT);
 }
 catch (RejectedExecutionException e) {
  throw new ResourceException(Status.CLIENT_ERROR_CONFLICT, e.getMessage());
 }
 catch (NoSuchRepositoryException e) {
  throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage());
 }
}
origin: org.sonatype.nexus.plugins/nexus-restlet1x-plugin

public void handleDelete(NexusTask<?> task, Request request)
  throws ResourceException
{
 try {
  // check reposes
  if (getRepositoryGroupId(request) != null) {
   getRepositoryRegistry().getRepositoryWithFacet(getRepositoryGroupId(request), GroupRepository.class);
  }
  else if (getRepositoryId(request) != null) {
   try {
    getRepositoryRegistry().getRepository(getRepositoryId(request));
   }
   catch (NoSuchRepositoryException e) {
    getRepositoryRegistry().getRepositoryWithFacet(getRepositoryId(request), ShadowRepository.class);
   }
  }
  getNexusScheduler().submit("Internal", task);
  throw new ResourceException(Status.SUCCESS_NO_CONTENT);
 }
 catch (RejectedExecutionException e) {
  throw new ResourceException(Status.CLIENT_ERROR_CONFLICT, e.getMessage());
 }
 catch (NoSuchRepositoryException e) {
  throw new ResourceException(Status.CLIENT_ERROR_NOT_FOUND, e.getMessage());
 }
}
origin: org.sonatype.nexus/nexus-rest-api

throw new ResourceException( Status.CLIENT_ERROR_NOT_FOUND, e.getMessage() );
origin: org.sonatype.nexus/nexus-indexer-lucene-rest-api

throw new ResourceException( Status.CLIENT_ERROR_NOT_FOUND, e.getMessage() );
org.sonatype.nexus.proxyNoSuchRepositoryException

Javadoc

Thrown if the specifically requested Repository does not exists.

Most used methods

  • getMessage
  • <init>
    Constructs a new exception with the specified detail message and cause. Usable in cases where reposi

Popular in Java

  • Updating database using SQL prepared statement
  • setScale (BigDecimal)
  • compareTo (BigDecimal)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Menu (java.awt)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • UnknownHostException (java.net)
    Thrown when a hostname can not be resolved.
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • ReentrantLock (java.util.concurrent.locks)
    A reentrant mutual exclusion Lock with the same basic behavior and semantics as the implicit monitor
  • JPanel (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now