@Override protected StorageItem doRetrieveItem( ResourceStoreRequest request ) throws IllegalOperationException, ItemNotFoundException, StorageException { if ( !shouldServeByPolicies( request ) ) { if ( getLogger().isDebugEnabled() ) { getLogger().debug( "The serving of item " + request.toString() + " is forbidden by Maven repository policy." ); } throw new ItemNotFoundException( request, this ); } return super.doRetrieveItem( request ); }
@Override protected StorageItem doRetrieveItem(final ResourceStoreRequest request) throws IllegalOperationException, ItemNotFoundException, StorageException { fixRemoteUrl(request); if (P2Constants.SITE_XML.equals(request.getRequestPath())) { throw new ItemNotFoundException(request, this); } if (AbstractP2MetadataSource.isP2MetadataItem(request.getRequestPath())) { if (!isItemValid(P2Constants.SITE_XML)) { UpdateSiteMirrorTask.submit(scheduler, this, false); } } return super.doRetrieveItem(request); }
@Override protected StorageItem doRetrieveItem(final ResourceStoreRequest request) throws IllegalOperationException, ItemNotFoundException, StorageException { final String requestPath = request.getRequestPath(); log.debug("Repository " + getId() + ": doRetrieveItem:" + requestPath); if (P2Constants.ARTIFACT_MAPPINGS_XML.equals(requestPath)) { if (getLocalStorage() == null) { throw new ItemNotFoundException(request); } final StorageItem item = getLocalStorage().retrieveItem(this, request); return item; } final StorageItem item; try { item = metadataSource.doRetrieveItem(request, this); } catch (IOException e) { throw new StorageException(e); } if (item != null) { return item; } // note this method can potentially go retrieve new mirrors, but it is using locking, so no // need to worry about multiples getting in configureMirrors(request); return super.doRetrieveItem(request); }