Codota Logo
NoSuchRepositoryException
Code IndexAdd Codota 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)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
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

  • Running tasks concurrently on multiple threads
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • setContentView (Activity)
  • ObjectMapper (com.fasterxml.jackson.databind)
    This mapper (or, data binder, or codec) provides functionality for converting between Java objects (
  • Color (java.awt)
    The Color class is used encapsulate colors in the default sRGB color space or colors in arbitrary co
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement.A servlet is a small Java program that runs within
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