public List<? extends Location> resolveDiscoveryLocations( final DiscoveryConfig config, final URI discoverySource ) throws CartoDataException { List<? extends Location> locations = config.getLocations(); if ( locations == null || locations.isEmpty() ) { locations = sourceManager.createLocations( discoverySource ); config.setLocations( locations ); } return locations; }
public List<? extends Location> resolveDiscoveryLocations( final DiscoveryConfig config, final URI discoverySource ) throws CartoDataException { List<? extends Location> locations = config.getLocations(); if ( locations == null || locations.isEmpty() ) { locations = sourceManager.createLocations( discoverySource ); config.setLocations( locations ); } return locations; }
@Override public ProjectVersionRef resolveSpecificVersion( final ProjectVersionRef ref, final DiscoveryConfig discoveryConfig ) throws CartoDataException { final List<? extends Location> locations = discoveryConfig.getLocations(); try { return artifactManager.resolveVariableVersion( locations, ref ); } catch ( final TransferException e ) { throw new CartoDataException( "Failed to graph variable version for: {}. Reason: {}", e, ref, e.getMessage() ); } }
@Override public ProjectVersionRef resolveSpecificVersion( final ProjectVersionRef ref, final DiscoveryConfig discoveryConfig ) throws CartoDataException { final List<? extends Location> locations = discoveryConfig.getLocations(); try { return artifactManager.resolveVariableVersion( locations, ref ); } catch ( final TransferException e ) { throw new CartoDataException( "Failed to graph variable version for: {}. Reason: {}", e, ref, e.getMessage() ); } }
private void setLocation( final DiscoveryConfig discoveryConfig ) { synchronized ( discoveryConfig ) { if ( discoveryConfig.getLocations() == null ) { final StoreKey key = AproxDepgraphUtils.getDiscoveryStore( discoveryConfig.getDiscoverySource() ); ArtifactStore store = null; try { store = storeManager.getArtifactStore( key ); } catch ( final AproxDataException e ) { logger.error( String.format( "Failed to lookup ArtifactStore for key: {}. Reason: {}", key, e.getMessage() ), e ); } if ( store != null ) { final Location location = LocationUtils.toLocation( store ); discoveryConfig.setLocations( Collections.singletonList( location ) ); } } } }
private void resolveVersionSelections( final AbstractGraphRequest recipe ) throws CartoRequestException { final List<ProjectVersionRef> injectedBOMs = recipe.getInjectedBOMs(); if ( injectedBOMs != null ) { final List<? extends Location> locations = recipe.getDiscoveryConfig() .getLocations(); final Map<ProjectRef, ProjectVersionRef> injectedDepMgmt = recipe.getVersionSelections(); readDepMgmtToVersionMap( injectedBOMs, locations, injectedDepMgmt ); recipe.setVersionSelections( injectedDepMgmt ); } }
private void resolveVersionSelections( final AbstractGraphRequest recipe ) throws CartoRequestException { final List<ProjectVersionRef> injectedBOMs = recipe.getInjectedBOMs(); if ( injectedBOMs != null ) { final List<? extends Location> locations = recipe.getDiscoveryConfig() .getLocations(); final Map<ProjectRef, ProjectVersionRef> injectedDepMgmt = recipe.getVersionSelections(); readDepMgmtToVersionMap( injectedBOMs, locations, injectedDepMgmt ); recipe.setVersionSelections( injectedDepMgmt ); } }
retrieved = artifactManager.retrieveFirst( discoveryConfig.getLocations(), pomRef, new EventMetadata() ); logger.debug( "{} NOT FOUND in:\n {}", pomRef, new JoinString( "\n ", discoveryConfig.getLocations() ) ); return null;
@Override public ProjectVersionRef resolveSpecificVersion( final ProjectVersionRef ref, final DiscoveryConfig discoveryConfig ) throws CartoDataException { setLocation( discoveryConfig ); try { return artifactManager.resolveVariableVersion( discoveryConfig.getLocations(), ref, new EventMetadata() ); } catch ( final TransferException e ) { throw new CartoDataException( "Failed to graph variable version for: {}. Reason: {}", e, ref, e.getMessage() ); } }
public DiscoveryConfig( final DiscoveryConfig discoveryConfig ) { Collection<String> enabledPatchers = discoveryConfig.getEnabledPatchers(); if ( enabledPatchers == null ) { enabledPatchers = new HashSet<String>(); } else { enabledPatchers = new HashSet<String>( enabledPatchers ); } this.patchers = enabledPatchers; this.enabled = discoveryConfig.isEnabled(); this.timeoutMillis = discoveryConfig.getTimeoutMillis(); this.discoverySource = discoveryConfig.getDiscoverySource(); this.discoveryLocations = discoveryConfig.getLocations(); this.storeRelationships = discoveryConfig.isStoreRelationships(); this.includeBuildSection = discoveryConfig.isIncludeBuildSection(); this.includeManagedDependencies = discoveryConfig.isIncludeManagedDependencies(); this.includeManagedPlugins = discoveryConfig.isIncludeManagedPlugins(); }
public DiscoveryConfig( final DiscoveryConfig discoveryConfig ) { Collection<String> enabledPatchers = discoveryConfig.getEnabledPatchers(); if ( enabledPatchers == null ) { enabledPatchers = new HashSet<String>(); } else { enabledPatchers = new HashSet<String>( enabledPatchers ); } this.patchers = enabledPatchers; this.enabled = discoveryConfig.isEnabled(); this.timeoutMillis = discoveryConfig.getTimeoutMillis(); this.discoverySource = discoveryConfig.getDiscoverySource(); this.discoveryLocations = discoveryConfig.getLocations(); this.storeRelationships = discoveryConfig.isStoreRelationships(); this.includeBuildSection = discoveryConfig.isIncludeBuildSection(); this.includeManagedDependencies = discoveryConfig.isIncludeManagedDependencies(); this.includeManagedPlugins = discoveryConfig.isIncludeManagedPlugins(); }
final List<? extends Location> locations = recipe.getDiscoveryConfig().getLocations();
final List<? extends Location> locations = recipe.getDiscoveryConfig().getLocations();
final List<? extends Location> locations = discoveryConfig.getLocations(); final Collection<String> enabledPatchers = discoveryConfig.getEnabledPatchers(); final boolean storeRelationships = discoveryConfig.isStoreRelationships();
throws CartoRequestException List<? extends Location> locations = config.getLocations(); if ( locations == null || locations.isEmpty() )
throws CartoRequestException List<? extends Location> locations = config.getLocations(); if ( locations == null || locations.isEmpty() )
.build(); sourceManager.activateWorkspaceSources( params, discoveryConfig.getLocations() );
.build(); sourceManager.activateWorkspaceSources( params, discoveryConfig.getLocations() );
final List<? extends Location> locations = discoveryConfig.getLocations();
final List<? extends Location> locations = discoveryConfig.getLocations();