Class NexusV3Search
- java.lang.Object
- 
- org.owasp.dependencycheck.data.nexus.NexusV3Search
 
- 
- All Implemented Interfaces:
- NexusSearch
 
 @ThreadSafe public class NexusV3Search extends java.lang.Object implements NexusSearch Class of methods to search Nexus v3 repositories.- Author:
- Hans Aikema
 
- 
- 
Constructor SummaryConstructors Constructor Description NexusV3Search(Settings settings, boolean useProxy)Creates a NexusV3Search for the given repository URL.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanpreflightRequest()Do a preflight request to see if the repository is actually working.MavenArtifactsearchSha1(java.lang.String sha1)Searches the configured Nexus repository for the given sha1 hash.
 
- 
- 
- 
Constructor Detail- 
NexusV3Searchpublic NexusV3Search(Settings settings, boolean useProxy) throws java.net.MalformedURLException Creates a NexusV3Search for the given repository URL.- Parameters:
- settings- the configured settings
- useProxy- flag indicating if the proxy settings should be used
- Throws:
- java.net.MalformedURLException- thrown if the configured URL is invalid
 
 
- 
 - 
Method Detail- 
searchSha1public MavenArtifact searchSha1(java.lang.String sha1) throws java.io.IOException Description copied from interface:NexusSearchSearches the configured Nexus repository for the given sha1 hash. If the artifact is found, aMavenArtifactis populated with the coordinate information.- Specified by:
- searchSha1in interface- NexusSearch
- Parameters:
- sha1- The SHA-1 hash string for which to search
- Returns:
- the populated Maven coordinates
- Throws:
- java.io.IOException- if it's unable to connect to the specified repository or if the specified artifact is not found.
 
 - 
preflightRequestpublic boolean preflightRequest() Description copied from interface:NexusSearchDo a preflight request to see if the repository is actually working.- Specified by:
- preflightRequestin interface- NexusSearch
- Returns:
- whether the repository is listening and returns the expected status response
 
 
- 
 
-