Package org.sonatype.nexus.proxy

Examples of org.sonatype.nexus.proxy.LocalStorageException


              toRoute.getTargetedRepository().storeItem(to, ((StorageFileItem) item).getInputStream(),
                  item.getRepositoryItemAttributes().asMap());
            }
            catch (IOException e) {
              // XXX: this is nonsense, to box IOException into subclass of IOException!
              throw new LocalStorageException(e);
            }
          }
          else if (item instanceof StorageCollectionItem) {
            toRoute.getTargetedRepository().createCollection(to,
                item.getRepositoryItemAttributes().asMap());
View Full Code Here


    try(final InputStreamReader isr = new InputStreamReader(item.getInputStream(), "UTF-8")) {
      velocityEngineProvider.get().evaluate(vctx, sw, item.getRepositoryItemUid().toString(), isr);
      return new StringContentLocator(sw.toString());
    }
    catch (Exception e) {
      throw new LocalStorageException("Could not expand the template: " + item.getRepositoryItemUid().toString(), e);
    }
  }
View Full Code Here

    public Collection<File> listItems(final Repository repository, final File repositoryBaseDir,
                                      final ResourceStoreRequest request, final File target)
        throws ItemNotFoundException, LocalStorageException
    {
      if (minedPaths.contains(request.getRequestPath())) {
        throw new LocalStorageException(MINE_MESSAGE);
      }
      return super.listItems(repository, repositoryBaseDir, request, target);
    }
View Full Code Here

    if (isNewSite(nextMetadataUrl)) {
      try {
        pushReferral(nextMetadataUrl, new DefaultObrParser(site, depth, relative));
      }
      catch (final XmlPullParserException e) {
        throw new LocalStorageException("Error parsing OBR header", e);
      }
    }
  }
View Full Code Here

      }

      return parser.parseResource();
    }
    catch (final XmlPullParserException e) {
      throw new LocalStorageException("Error parsing OBR resource", e);
    }
  }
View Full Code Here

      if (breadcrumbs.size() < parser.getMaxDepth()) {
        visit(new ReferencedObrSite(new URL(parser.getMetadataUrl(), url)), calculateMaxDepth(depth));
      }
    }
    catch (final XmlPullParserException e) {
      throw new LocalStorageException("Error parsing OBR referral", e);
    }
  }
View Full Code Here

    try {
      parser.nextToken();
    }
    catch (final XmlPullParserException e) {
      throw new LocalStorageException("Error parsing XML token", e);
    }

    final int n = cb.length();
    cb.append(parser.getText());
    return cb.length() - n;
View Full Code Here

  {
    try {
      return new ResourceImpl(obr, this);
    }
    catch (final XmlPullParserException e) {
      throw new LocalStorageException("Error parsing OBR resource", e);
    }
  }
View Full Code Here

        return null;
      }
      paths = artifactMapping.getArtifactsPath();
    }
    catch (StorageException e) {
      throw new LocalStorageException(e);
    }
    catch (final IllegalOperationException e) {
      log.error("Unable to open artifactsMapping.xml", e);
      return null;
    }
View Full Code Here

      "amazon persist failure;" + //
          " repo=" + repository.getId() + //
          " path=" + path //
      ;

      throw new LocalStorageException(message);

    } catch (final Exception e) {

      reporter.amazonFailedFileCount.inc();

      throw new LocalStorageException(e);

    }

  }
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.LocalStorageException

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.