@Test public void testOfflineSessionResolveMetadataMissing() { session.setOffline( true ); MetadataRequest request = new MetadataRequest( metadata, repository, "" ); List<MetadataResult> results = resolver.resolveMetadata( session, Arrays.asList( request ) ); assertEquals( 1, results.size() ); MetadataResult result = results.get( 0 ); assertSame( request, result.getRequest() ); assertNotNull( result.getException() ); assertNull( result.getMetadata() ); connector.assertSeenExpected(); }
public List<MetadataResult> resolveMetadata( RepositorySystemSession session, Collection<? extends MetadataRequest> requests ) { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection<Metadata> metadata = new ArrayList<Metadata>( requests.size() ); for ( MetadataRequest request : requests ) { metadata.add( request.getMetadata() ); } syncContext.acquire( null, metadata ); return resolve( session, requests ); } finally { syncContext.release(); } }
DefaultMetadataResolver implements MetadataResolver, Service { public List<MetadataResult> resolveMetadata( RepositorySystemSession session, Collection<? extends MetadataRequest> requests ) { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection<Metadata> metadata = new ArrayList<Metadata>( requests.size() ); for ( MetadataRequest request : requests ) { metadata.add( request.getMetadata() ); } syncContext.acquire( null, metadata ); return resolve( session, requests ); } finally { syncContext.release(); } } }
DefaultMetadataResolver implements MetadataResolver, Service { public List<MetadataResult> resolveMetadata( RepositorySystemSession session, Collection<? extends MetadataRequest> requests ) { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection<Metadata> metadata = new ArrayList<Metadata>( requests.size() ); for ( MetadataRequest request : requests ) { metadata.add( request.getMetadata() ); } syncContext.acquire( null, metadata ); return resolve( session, requests ); } finally { syncContext.release(); } } DefaultMetadataResolver();  DefaultMetadataResolver( Logger logger, RepositoryEventDispatcher repositoryEventDispatcher,
                                    UpdateCheckManager updateCheckManager,
                                    RemoteRepositoryManager remoteRepositoryManager,
                                    SyncContextFactory syncContextFactory ); }
DefaultMetadataResolver implements MetadataResolver, Service { public List<MetadataResult> resolveMetadata( RepositorySystemSession session, Collection<? extends MetadataRequest> requests ) { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection<Metadata> metadata = new ArrayList<Metadata>( requests.size() ); for ( MetadataRequest request : requests ) { metadata.add( request.getMetadata() ); } syncContext.acquire( null, metadata ); return resolve( session, requests ); } finally { syncContext.release(); } } DefaultMetadataResolver();  DefaultMetadataResolver( Logger logger, RepositoryEventDispatcher repositoryEventDispatcher,
                                    UpdateCheckManager updateCheckManager,
                                    RemoteRepositoryManager remoteRepositoryManager,
                                    SyncContextFactory syncContextFactory ); void initService( ServiceLocator locator ); DefaultMetadataResolver setLogger( Logger logger ); DefaultMetadataResolver setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ); DefaultMetadataResolver setUpdateCheckManager( UpdateCheckManager updateCheckManager ); DefaultMetadataResolver setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ); DefaultMetadataResolver setSyncContextFactory( SyncContextFactory syncContextFactory ); List<MetadataResult> resolveMetadata( RepositorySystemSession session,
                                                 Collection<? extends MetadataRequest> requests ); }
DefaultMetadataResolver implements MetadataResolver, Service { public List<MetadataResult> resolveMetadata( RepositorySystemSession session, Collection<? extends MetadataRequest> requests ) { SyncContext syncContext = syncContextFactory.newInstance( session, false ); try { Collection<Metadata> metadata = new ArrayList<Metadata>( requests.size() ); for ( MetadataRequest request : requests ) { metadata.add( request.getMetadata() ); } syncContext.acquire( null, metadata ); return resolve( session, requests ); } finally { syncContext.release(); } } DefaultMetadataResolver();  DefaultMetadataResolver( Logger logger, RepositoryEventDispatcher repositoryEventDispatcher,
                                    UpdateCheckManager updateCheckManager,
                                    RemoteRepositoryManager remoteRepositoryManager,
                                    SyncContextFactory syncContextFactory ); void initService( ServiceLocator locator ); DefaultMetadataResolver setLogger( Logger logger ); DefaultMetadataResolver setRepositoryEventDispatcher( RepositoryEventDispatcher repositoryEventDispatcher ); DefaultMetadataResolver setUpdateCheckManager( UpdateCheckManager updateCheckManager ); DefaultMetadataResolver setRemoteRepositoryManager( RemoteRepositoryManager remoteRepositoryManager ); DefaultMetadataResolver setSyncContextFactory( SyncContextFactory syncContextFactory ); List<MetadataResult> resolveMetadata( RepositorySystemSession session,
                                                 Collection<? extends MetadataRequest> requests );  }