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 String
PACKAGING_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.WebTarget
getInstance()
abstract String
getRESTfulServiceEndpoint()
Return the configured service endpoint in this repository.protected int
getTimeout()
Return the configured read timeout in milliseconds.String
getURL()
String
getUserName()
List<String>
retrieveVersions(String pRepositoryId, String pGroupId, String pArtifactId, String pPackaging, ValidAndInvalidClassifier pClassifier)
void
setCredentials(String pUserName, String pUserPassword)
void
setUserName(String mUserName)
void
setUserPassword(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:
retrieveVersions
in 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:
setUserName
in interfaceIVersionReader
-
setUserPassword
public void setUserPassword(String mUserPassword)
- Specified by:
setUserPassword
in interfaceIVersionReader
-
setCredentials
public void setCredentials(String pUserName, String pUserPassword)
- Specified by:
setCredentials
in 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
-
-