public class PackageRequestService extends Object implements IPackageRequest
| Constructor and Description |
|---|
PackageRequestService(OssIndexHttpClient client) |
| Modifier and Type | Method and Description |
|---|---|
OssiPackage |
add(List<PackageCoordinate> path)
Add a new package/version (with dependency information) to search for.
|
OssiPackage |
add(String type,
String namespace,
String artifactId,
String version)
Add a new artifact to search for.
|
void |
addVulnerabilityFilter(IVulnerabilityFilter filter)
Filter the request results using the specified filter(s)
|
boolean |
isDebug() |
Collection<OssiPackage> |
run()
Execute the request.
|
void |
setCacheFile(String path)
Set the file path to be used by the cache.
|
void |
setCacheTimeout(int hours)
Number of hours till the cache expires.
|
void |
setCredentials(String user,
String token)
Set the credentials to be used in the OSS Index query
|
void |
setDebug(boolean debug) |
void |
setMaximumPackagesPerRequest(int count) |
public PackageRequestService(OssIndexHttpClient client)
public void addVulnerabilityFilter(IVulnerabilityFilter filter)
IPackageRequestaddVulnerabilityFilter in interface IPackageRequestpublic void setCacheFile(String path)
IPackageRequestsetCacheFile in interface IPackageRequestpublic void setCredentials(String user, String token)
IPackageRequestsetCredentials in interface IPackageRequestpublic void setMaximumPackagesPerRequest(int count)
setMaximumPackagesPerRequest in interface IPackageRequestpublic void setCacheTimeout(int hours)
IPackageRequestsetCacheTimeout in interface IPackageRequestpublic OssiPackage add(String type, String namespace, String artifactId, String version)
IPackageRequestadd in interface IPackageRequesttype - Name of the package managernamespace - Group ID for the packageartifactId - Artifact ID for the packageversion - Version number for requestpublic OssiPackage add(List<PackageCoordinate> path)
IPackageRequestadd in interface IPackageRequestpath - A path from the root (including) package to the dependency package. The packager being checked
is the last one placed on the list (max index).public Collection<OssiPackage> run() throws IOException
IPackageRequestrun in interface IPackageRequestIOExceptionpublic boolean isDebug()
public void setDebug(boolean debug)
Copyright © 2018. All rights reserved.