Class MavenRequestBuilder
java.lang.Object
org.azd.abstractions.BaseRequestBuilder
org.azd.artifactspackagetypes.maven.MavenRequestBuilder
Provides functionality to work with Azure DevOps Graph Api.
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Represents the Path values for Maven Api.Nested classes/interfaces inherited from class org.azd.abstractions.BaseRequestBuilder
BaseRequestBuilder.ProjectExcludeParameter
-
Field Summary
Fields inherited from class org.azd.abstractions.BaseRequestBuilder
accessTokenCredential, apiVersion, area, locationId, organizationUrl, serializer
-
Constructor Summary
ConstructorDescriptionMavenRequestBuilder
(String organizationUrl, AccessTokenCredential accessTokenCredential) Instantiates a new RequestBuilder instance and sets the default values. -
Method Summary
Modifier and TypeMethodDescriptiondelete
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) Delete a package version from the feed and move it to the feed's recycle bin.deleteAsync
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) Delete a package version from the feed and move it to the feed's recycle bin.download
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) Fulfills Maven package file download requests by either returning the URL of the requested package file or, in the case of Azure DevOps Server (OnPrem), returning the content as a stream.downloadAsync
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) Fulfills Maven package file download requests by either returning the URL of the requested package file or, in the case of Azure DevOps Server (OnPrem), returning the content as a stream.get
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) Get information about a package version.get
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, Predicate<ArtifactsPackageTypesRequestBuilder.DeletedPackagePredicate> showDeleted) Get information about a package version.getAsync
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) Get information about a package version.getAsync
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, Predicate<ArtifactsPackageTypesRequestBuilder.DeletedPackagePredicate> showDeleted) Get information about a package version.Provides functionality to manage Package version from recycle bin Api.update
(String feedId, MavenPackagesBatchRequest batchRequest) Update several packages from a single feed in a single request.update
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, PackageVersionDetails packageVersionDetails) Update state for a package version.updateAsync
(String feedId, MavenPackagesBatchRequest batchRequest) Update several packages from a single feed in a single request.updateAsync
(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, PackageVersionDetails packageVersionDetails) Update state for a package version.Provides functionality to manage Package version from upstreaming behaviour Api.Methods inherited from class org.azd.abstractions.BaseRequestBuilder
builder
-
Constructor Details
-
MavenRequestBuilder
Instantiates a new RequestBuilder instance and sets the default values.- Parameters:
organizationUrl
- Represents organization location request url.accessTokenCredential
- Access token credential object.
-
-
Method Details
-
recycleBin
Provides functionality to manage Package version from recycle bin Api.- Returns:
- PackageFromRecycleBinRequestBuilder
PackageFromRecycleBinRequestBuilder
-
upstreamingBehavior
Provides functionality to manage Package version from upstreaming behaviour Api.- Returns:
- UpstreamingBehaviorRequestBuilder
UpstreamingBehaviorRequestBuilder
-
downloadAsync
public CompletableFuture<InputStream> downloadAsync(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) throws AzDException Fulfills Maven package file download requests by either returning the URL of the requested package file or, in the case of Azure DevOps Server (OnPrem), returning the content as a stream.- Parameters:
pathParameters
- Represents the path parameters to download artifact.- Returns:
- Input stream of the artifact. Use
StreamHelper
and download(filename, inputStream) to download the artifact. - Throws:
AzDException
- Default Api Exception handler.
-
deleteAsync
public CompletableFuture<Void> deleteAsync(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) throws AzDException Delete a package version from the feed and move it to the feed's recycle bin.- Parameters:
pathParameters
- Represents the path parameters to delete artifact.- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<Package> getAsync(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) throws AzDException Get information about a package version.- Parameters:
pathParameters
- Represents the path parameters to get artifact.- Returns:
- Package object
Package
- Throws:
AzDException
- Default Api Exception handler.
-
getAsync
public CompletableFuture<Package> getAsync(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, Predicate<ArtifactsPackageTypesRequestBuilder.DeletedPackagePredicate> showDeleted) throws AzDException Get information about a package version.- Parameters:
pathParameters
- Represents the path parameters to get artifact.showDeleted
- Specify to include the deleted packages.
Example:client.artifactsPackageTypes().maven().getAsync(r -> { r.artifactId = "MyPackage"; r.groupId = "org.example.com"; r.feedId = "ID of the feed"; r.version = "1.0.0"; }, x -> x.showDeleted).join());
- Returns:
- Package object
Package
- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<Void> updateAsync(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, PackageVersionDetails packageVersionDetails) throws AzDException Update state for a package version.- Parameters:
pathParameters
- Represents the path parameters to update artifact.packageVersionDetails
- package version details to update.- Throws:
AzDException
- Default Api Exception handler.
-
updateAsync
public CompletableFuture<Void> updateAsync(String feedId, MavenPackagesBatchRequest batchRequest) throws AzDException Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.- Parameters:
feedId
- Feed which contains the packages to update.batchRequest
- Maven batch request with package details to update the packages.- Throws:
AzDException
- Default Api Exception handler.
-
download
public InputStream download(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) throws AzDException Fulfills Maven package file download requests by either returning the URL of the requested package file or, in the case of Azure DevOps Server (OnPrem), returning the content as a stream.- Parameters:
pathParameters
- Represents the path parameters to download artifact.- Returns:
- Input stream of the artifact. Use
StreamHelper
and download(filename, inputStream) to download the artifact. - Throws:
AzDException
- Default Api Exception handler.
-
delete
public Void delete(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) throws AzDException Delete a package version from the feed and move it to the feed's recycle bin.- Parameters:
pathParameters
- Represents the path parameters to delete artifact.- Throws:
AzDException
- Default Api Exception handler.
-
get
public Package get(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters) throws AzDException Get information about a package version.- Parameters:
pathParameters
- Represents the path parameters to get artifact.- Returns:
- Package object
Package
- Throws:
AzDException
- Default Api Exception handler.
-
get
public Package get(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, Predicate<ArtifactsPackageTypesRequestBuilder.DeletedPackagePredicate> showDeleted) throws AzDException Get information about a package version.- Parameters:
pathParameters
- Represents the path parameters to get artifact.showDeleted
- Specify to include the deleted packages.
Example:client.artifactsPackageTypes().maven().get(r -> { r.artifactId = "MyPackage"; r.groupId = "org.example.com"; r.feedId = "ID of the feed"; r.version = "1.0.0"; }, x -> x.showDeleted).join());
- Returns:
- Package object
Package
- Throws:
AzDException
- Default Api Exception handler.
-
update
public Void update(Consumer<MavenRequestBuilder.MavenPathParameters> pathParameters, PackageVersionDetails packageVersionDetails) throws AzDException Update state for a package version.- Parameters:
pathParameters
- Represents the path parameters to update artifact.packageVersionDetails
- package version details to update.- Throws:
AzDException
- Default Api Exception handler.
-
update
Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.- Parameters:
feedId
- Feed which contains the packages to update.batchRequest
- Maven batch request with package details to update the packages.- Throws:
AzDException
- Default Api Exception handler.
-