public abstract class AbstractMavenArtifactChoiceListProvider
extends jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProvider
implements hudson.ExtensionPoint
ChoiceListProvider that can display information from an artifact repository, like
NexusChoiceListProvider, MavenCentralChoiceListProvider and ArtifactoryChoiceListProvider| Constructor and Description |
|---|
AbstractMavenArtifactChoiceListProvider(String artifactId)
Initializes the choicelist with at the artifactId.
|
| Modifier and Type | Method and Description |
|---|---|
abstract IVersionReader |
createServiceInstance()
Different implementation will return different
IVersionReader instances. |
String |
getArtifactId() |
List<String> |
getChoiceList() |
String |
getClassifier() |
static com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl |
getCredentials(String pCredentialId)
Returns the
UsernamePasswordCredentialsImpl for the given CredentialId |
String |
getGroupId() |
String |
getPackaging() |
boolean |
getReverseOrder() |
static Map<String,String> |
readURL(IVersionReader pInstance,
String pGroupId,
String pArtifactId,
String pPackaging,
String pClassifier,
boolean pReverseOrder)
Retrieves the versions from the given source.
|
void |
setArtifactId(String artifactId) |
void |
setClassifier(String classifier) |
void |
setGroupId(String groupId) |
void |
setPackaging(String packaging) |
void |
setReverseOrder(boolean reverseOrder) |
static Map<String,String> |
toMap(List<String> pChoices)
Cuts of the first parts of the URL and only returns a smaller set of items.
|
public AbstractMavenArtifactChoiceListProvider(String artifactId)
artifactId - the artifactId is the minimum required information.public List<String> getChoiceList()
getChoiceList in class jp.ikedam.jenkins.plugins.extensible_choice_parameter.ChoiceListProviderpublic abstract IVersionReader createServiceInstance()
IVersionReader instances.public static com.cloudbees.plugins.credentials.impl.UsernamePasswordCredentialsImpl getCredentials(String pCredentialId)
UsernamePasswordCredentialsImpl for the given CredentialIdpCredentialId - the internal jenkins id for the credentialspublic static Map<String,String> readURL(IVersionReader pInstance, String pGroupId, String pArtifactId, String pPackaging, String pClassifier, boolean pReverseOrder)
pInstance - the artifact repository service.pGroupId - the groupId of the artifactpArtifactId - the artifactIdpPackaging - the packagingpClassifier - the classifierpReverseOrder - true if the result should be reversed.public static Map<String,String> toMap(List<String> pChoices)
pChoices - the list which is transformed to a map@DataBoundSetter public void setGroupId(String groupId)
@DataBoundSetter public void setArtifactId(String artifactId)
@DataBoundSetter public void setPackaging(String packaging)
@DataBoundSetter public void setClassifier(String classifier)
@DataBoundSetter public void setReverseOrder(boolean reverseOrder)
public String getGroupId()
public String getArtifactId()
public String getPackaging()
public String getClassifier()
public boolean getReverseOrder()
Copyright © 2016–2017. All rights reserved.