Class AbstractRESTfulVersionReader
- java.lang.Object
-
- org.jenkinsci.plugins.maven_artifact_choicelistprovider.AbstractRESTfulVersionReader
-
- All Implemented Interfaces:
IVersionReader
- Direct Known Subclasses:
ArtifactorySearchService,MavenMetadataSearchService,Nexus3RestApiAssetForGenericArtifactsService,Nexus3RestApiAssetService,NexusLuceneSearchService
public abstract class AbstractRESTfulVersionReader extends Object implements IVersionReader
Basic Class for perform artifact searches against an RESTful service API, like Nexus and Artifactory.- Author:
- stephan.watermeyer, Diebold Nixdorf
-
-
Field Summary
Fields Modifier and Type Field Description protected static StringPACKAGING_ALL
-
Constructor Summary
Constructors Constructor Description AbstractRESTfulVersionReader(String pURL)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Set<String>callService(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier)protected javax.ws.rs.client.WebTargetgetInstance()abstract StringgetRESTfulServiceEndpoint()Return the configured service endpoint in this repository.protected intgetTimeout()Return the configured read timeout in milliseconds.StringgetURL()StringgetUserName()List<String>retrieveVersions(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier)voidsetCredentials(String pUserName, String pUserPassword)voidsetUserName(String mUserName)voidsetUserPassword(String mUserPassword)
-
-
-
Field Detail
-
PACKAGING_ALL
protected static final String PACKAGING_ALL
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractRESTfulVersionReader
public AbstractRESTfulVersionReader(String pURL)
-
-
Method Detail
-
retrieveVersions
public List<String> retrieveVersions(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier) throws VersionReaderException
- Specified by:
retrieveVersionsin interfaceIVersionReader- Throws:
VersionReaderException
-
getURL
public String getURL()
-
getInstance
protected javax.ws.rs.client.WebTarget getInstance()
-
getUserName
public String getUserName()
-
setUserName
public void setUserName(String mUserName)
- Specified by:
setUserNamein interfaceIVersionReader
-
setUserPassword
public void setUserPassword(String mUserPassword)
- Specified by:
setUserPasswordin interfaceIVersionReader
-
setCredentials
public void setCredentials(String pUserName, String pUserPassword)
- 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
public abstract String 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
-
-