private boolean isProxy() { return repository.getRemoteUrl() != null; }
@Override public URL getAbsoluteUrlFromBase( final ProxyRepository repository, final ResourceStoreRequest request ) throws RemoteStorageException { return getAbsoluteUrlFromBase( repository.getRemoteUrl(), request.getRequestPath() ); }
String baseRemoteUrl = proxyRepository.getRemoteUrl();
final String repositoryUrl = repository.getRemoteUrl(); return processMetadata( repository,
sb.append(" as proxy repository for URL "); sb.append(repository.adaptToFacet(ProxyRepository.class).getRemoteUrl());
private DefaultStorageFileItem doRetriveRemoteChecksumItem( ProxyRepository proxy, ResourceStoreRequest request ) throws ItemNotFoundException { try { return (DefaultStorageFileItem) proxy.getRemoteStorage().retrieveItem( proxy, request, proxy.getRemoteUrl() ); } catch ( RemoteAccessException e ) { throw new ItemNotFoundException( request, proxy, e ); } catch ( RemoteStorageException e ) { throw new ItemNotFoundException( request, proxy, e ); } } }
String baseUrl = ""; if (proxyRepository != null) { baseUrl = proxyRepository.getRemoteUrl();
sb.append( revt.getRepository().getRemoteUrl() );
(StorageFileItem) proxy.getRemoteStorage().retrieveItem( proxy, req, proxy.getRemoteUrl() );
public InputStream retrieve(String name) throws IOException { TaskUtil.checkInterruption(); ResourceStoreRequest req = new ResourceStoreRequest(PUBLISHING_PATH_PREFIX + "/" + name); try { StorageFileItem item = null; // XXX: ensure it goes to remote only and throws FileNotFoundException if nothing found on remote // kinda turn off transparent proxying for this method // We need to use ProxyRepository and get it's RemoteStorage stuff to completely // avoid "transparent" proxying, and even the slightest possibility to return // some stale file from cache to the updater. if (ISPROXY(repository) && REMOTEACCESSALLOWED(repository)) { item = (StorageFileItem) repository.getRemoteStorage() .retrieveItem(repository, req, repository.getRemoteUrl()); } else { throw new ItemNotFoundException(req, repository); } return item.getInputStream(); } catch (ItemNotFoundException ex) { final FileNotFoundException fne = new FileNotFoundException(name + " (remote item not found)"); fne.initCause(ex); throw fne; } } });
resource.getRemoteStorage().setRemoteStorageUrl(repository.getRemoteUrl());
resource.getRemoteStorage().setRemoteStorageUrl( repository.getRemoteUrl() );
repositoryUrl = mrepository.adaptToFacet( ProxyRepository.class ).getRemoteUrl();
repoRes.setRemoteUri(repository.adaptToFacet(ProxyRepository.class).getRemoteUrl());
repoRes.setRemoteUri( repository.adaptToFacet( ProxyRepository.class ).getRemoteUrl() );