Class AbstractRESTfulVersionReader
java.lang.Object
org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractRESTfulVersionReader
- All Implemented Interfaces:
IVersionReader
- Direct Known Subclasses:
ArtifactorySearchService,MavenMetadataSearchService,Nexus3RestApiAssetGenericService,Nexus3RestApiAssetMavenService,Nexus3RestApiSearchService,NexusLuceneSearchService
Basic Class for perform artifact searches against an RESTful service API,
like Nexus and Artifactory.
- Author:
- stephan.watermeyer, Diebold Nixdorf
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncallService(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier) protected javax.ws.rs.client.WebTargetabstract StringReturn the configured service endpoint in this repository.protected intReturn the configured read timeout in milliseconds.getURL()retrieveVersions(String pRepositoryId, String pGroup, String pName) retrieveVersions(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier) voidsetCredentials(String pUserName, String pUserPassword) voidsetUserName(String mUserName) voidsetUserPassword(String mUserPassword)
-
Field Details
-
PACKAGING_ALL
- See Also:
-
-
Constructor Details
-
AbstractRESTfulVersionReader
-
-
Method Details
-
retrieveVersions
public List<String> retrieveVersions(String pRepositoryId, String pGroup, String pName) throws VersionReaderException - Throws:
VersionReaderException
-
retrieveVersions
public List<String> retrieveVersions(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier) throws VersionReaderException - Specified by:
retrieveVersionsin interfaceIVersionReader- Throws:
VersionReaderException
-
getURL
-
getInstance
protected javax.ws.rs.client.WebTarget getInstance() -
getUserName
-
setUserName
- Specified by:
setUserNamein interfaceIVersionReader
-
setUserPassword
- Specified by:
setUserPasswordin interfaceIVersionReader
-
setCredentials
- Specified by:
setCredentialsin interfaceIVersionReader
-
getTimeout
protected int getTimeout()Return the configured read timeout in milliseconds. Can be overwritten in super classes.- Returns:
- timeout in milliseconds
-
getRESTfulServiceEndpoint
Return the configured service endpoint in this repository.- Returns:
- the service endpoint URI.
-
callService
public abstract Set<String> callService(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier) throws VersionReaderException - Throws:
VersionReaderException
-