Package org.sonatype.nexus.proxy.storage.remote

Examples of org.sonatype.nexus.proxy.storage.remote.RemoteRepositoryStorage


    ProxyMode oldProxyMode = getProxyMode();

    // Detect do we deal with S3 remote peer, those are not managed/autoblocked, since we have no
    // proper means using HTTP only to detect the issue.
    {
      RemoteRepositoryStorage remoteStorage = getRemoteStorage();

      /**
       * Special case here to handle Amazon S3 storage. Problem is that if we do a request against a folder, a 403
       * will always be returned, as S3 doesn't support that. So we simple check if its s3 and if so, we ignore
       * the fact that 403 was returned (only in regards to auto-blocking, rest of system will still handle 403
View Full Code Here


      // still does not know that is should be a proxy repo!
      ProxyRepository prepository = (ProxyRepository) repository;

      try {
        if (repo.getRemoteStorage() != null) {
          RemoteRepositoryStorage oldRemoteStorage = prepository.getRemoteStorage();

          RemoteRepositoryStorage configRemoteStorage =
              getRemoteRepositoryStorage(repo.getId(), repo.getRemoteStorage().getUrl(),
                  repo.getRemoteStorage().getProvider());

          // detect do we really need to set remote storage
          if (oldRemoteStorage == null || oldRemoteStorage != configRemoteStorage) {
            // validate the remoteUrl with new remote storage
            configRemoteStorage.validateStorageUrl(repo.getRemoteStorage().getUrl());

            // set the chosen remote storage
            prepository.setRemoteStorage(configRemoteStorage);
            // mark remote storage context dirty, if applicable
            final RemoteStorageContext ctx = prepository.getRemoteStorageContext();
View Full Code Here

                                                               final String provider)
      throws InvalidConfigurationException
  {
    try {
      final String mungledHint = remoteProviderHintFactory.getRoleHint(remoteUrl, provider);
      final RemoteRepositoryStorage result = remoteRepositoryStorages.get(mungledHint);
      if (result != null) {
        return result;
      }
      throw new InvalidConfigurationException("Repository " + repoId
          + " have remote storage with unsupported provider: " + provider);
View Full Code Here

    final Repository repository = uid.getRepository();
    final ResourceStoreRequest request = new ResourceStoreRequest(uid.getPath());

    if (repository.getRepositoryKind().isFacetAvailable(ProxyRepository.class)) {
      final ProxyRepository proxyRepository = repository.adaptToFacet(ProxyRepository.class);
      final RemoteRepositoryStorage storage = proxyRepository.getRemoteStorage();
      if (storage != null) {
        return storage.getAbsoluteUrlFromBase(proxyRepository, request);
      }
      // locally hosted proxy repository, so drop through...
    }

    return repository.getLocalStorage().getAbsoluteUrlFromBase(repository, request);
View Full Code Here

TOP

Related Classes of org.sonatype.nexus.proxy.storage.remote.RemoteRepositoryStorage

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.