public class ProGetApi
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
ProGetApi(JenkinsLogWriter listener) |
ProGetApi(ProGetConfig config,
JenkinsLogWriter logWriter) |
Modifier and Type | Method and Description |
---|---|
void |
canConnect()
Check that can connect to ProGet, and check the apiKey if configured.
|
java.io.File |
downloadPackage(java.lang.String feedName,
java.lang.String groupName,
java.lang.String packageName,
java.lang.String version,
java.lang.String toFolder,
DownloadFormat downloadFormat) |
Feed |
getFeed(java.lang.String feedName)
Gets the details of a feed by its name
|
Feed[] |
getFeeds()
Get all active feeds
|
java.lang.String |
getJsonString() |
ProGetPackage[] |
getPackages(java.lang.String feedId)
Gets the packages in a ProGet feed
|
ProGetPackage[] |
getPackages(java.lang.String feedId,
java.lang.String groupName)
Gets the packages in a ProGet feed
|
PackageVersion[] |
getPackageVersions(java.lang.String feedId,
java.lang.String groupName,
java.lang.String packageName)
Gets the package versions in a ProGet feed
|
java.lang.String |
getVersion() |
void |
ping()
Ensure can ping an endpointGet.
|
void |
setRecordJson(boolean record) |
void |
uploadPackage(java.lang.String feedName,
java.io.File progetPackage) |
public ProGetApi(JenkinsLogWriter listener)
public ProGetApi(ProGetConfig config, JenkinsLogWriter logWriter)
public void setRecordJson(boolean record)
public java.lang.String getJsonString()
public void canConnect() throws java.io.IOException
java.io.IOException
- If cannot connectpublic void ping() throws java.io.IOException
java.io.IOException
- If cannot connectpublic java.lang.String getVersion() throws java.io.IOException
java.io.IOException
public Feed[] getFeeds() throws java.io.IOException
java.io.IOException
public Feed getFeed(java.lang.String feedName) throws java.io.IOException
java.io.IOException
public ProGetPackage[] getPackages(java.lang.String feedId) throws java.io.IOException
java.io.IOException
public ProGetPackage[] getPackages(java.lang.String feedId, java.lang.String groupName) throws java.io.IOException
java.io.IOException
public PackageVersion[] getPackageVersions(java.lang.String feedId, java.lang.String groupName, java.lang.String packageName) throws java.io.IOException
java.io.IOException
public java.io.File downloadPackage(java.lang.String feedName, java.lang.String groupName, java.lang.String packageName, java.lang.String version, java.lang.String toFolder, DownloadFormat downloadFormat) throws java.io.IOException
feedName
- RequiredgroupName
- RequiredpackageName
- Requiredversion
- Optional - empty string returns latest versiontoFolder
- Folder to save file todownloadFormat
- java.io.IOException
public void uploadPackage(java.lang.String feedName, java.io.File progetPackage) throws java.io.IOException
java.io.IOException