Package org.azd.upack

Class UPackApi

All Implemented Interfaces:
UpackDetails

public class UPackApi extends AzDAsyncApi<UPackApi> implements UpackDetails
UpackApi class to manage Universal Package artifact package api
  • Constructor Details

    • UPackApi

      public UPackApi(Connection connection)
      Pass the connection object to work with Universal Package Api
      Parameters:
      connection - Connection object
  • Method Details

    • getPackageVersion

      public Package getPackageVersion(String feedId, String packageName, String version) throws AzDException
      Show information about a package version.
      Specified by:
      getPackageVersion in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0".
      Returns:
      Package Package
      Throws:
      AzDException - Default Api Exception handler.
    • getPackageVersion

      public Package getPackageVersion(String feedId, String packageName, String version, boolean showDeleted) throws AzDException
      Show information about a package version.
      Specified by:
      getPackageVersion in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0".
      showDeleted - True to show information for deleted versions
      Returns:
      Package Package
      Throws:
      AzDException - Default Api Exception handler.
    • getPackageVersionFromRecycleBin

      public UPackPackageVersionDeletionState getPackageVersionFromRecycleBin(String feedId, String packageName, String version) throws AzDException
      Get information about a package version in the recycle bin.
      Specified by:
      getPackageVersionFromRecycleBin in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0".
      Returns:
      UPackPackageVersionDeletionState UPackPackageVersionDeletionState
      Throws:
      AzDException - Default Api Exception handler.
    • deletePackageVersion

      public void deletePackageVersion(String feedId, String packageName, String version) throws AzDException
      Delete a package version from the feed and move it to the feed's recycle bin.
      Specified by:
      deletePackageVersion in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0".
      Throws:
      AzDException - Default Api Exception handler.
    • deletePackageVersionFromRecycleBin

      public void deletePackageVersionFromRecycleBin(String feedId, String packageName, String version) throws AzDException
      Permanently delete a package from a feed's recycle bin.
      Specified by:
      deletePackageVersionFromRecycleBin in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0".
      Throws:
      AzDException - Default Api Exception handler.
    • updatePackageVersion

      public void updatePackageVersion(String feedId, String packageName, String version, PackagePromote promote) throws AzDException
      Update information for a package version. (eg. prelease, release)
      Specified by:
      updatePackageVersion in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0"
      promote - State of the package. Example: "prelease". PackagePromote
      Throws:
      AzDException - Default Api Exception handler.
    • updatePackageVersion

      public void updatePackageVersion(String feedId, String packageName, String version, String promote) throws AzDException
      Update information for a package version. (eg. prelease, release)
      Specified by:
      updatePackageVersion in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0"
      promote - State of the package. Example: "prelease".
      Throws:
      AzDException - Default Api Exception handler.
    • updatePackageVersions

      public void updatePackageVersions(String feedId, String viewId, PackagesBatchOperation operation, List<Map<String,Object>> packages) throws AzDException
      Update several packages from a single feed in a single request. The updates to the packages do not happen atomically.
      Specified by:
      updatePackageVersions in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      viewId - Name of ID the view, packages need to be promoted to.
      operation - Type of operation that needs to be performed on packages. supports only PROMOTE or DELETE. PackagesBatchOperation.
      packages - Identifies a particular Universal package version.
      Throws:
      AzDException - Default Api Exception handler.
    • restorePackageVersionFromRecycleBin

      public void restorePackageVersionFromRecycleBin(String feedId, String packageName, String version) throws AzDException
      Restore a package version from the recycle bin to its associated feed.
      Specified by:
      restorePackageVersionFromRecycleBin in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "ufeed".
      packageName - Name of the package. Example: "upackage".
      version - Version of the package. Example: "1.0.0"
      Throws:
      AzDException - Default Api Exception handler.
    • updateRecycleBinPackages

      public void updateRecycleBinPackages(String feedId, PackagesBatchOperation operation, List<Map<String,Object>> packages) throws AzDException
      Delete or restore several package versions from the recycle bin.
      Specified by:
      updateRecycleBinPackages in interface UpackDetails
      Parameters:
      feedId - Name or ID of the feed. Example: "upack".
      operation - Type of operation that needs to be performed on packages. Recycle Bin supports only PERMANENTDELETE or RESTORETOFEED. PackagesBatchOperation
      packages - Identifies a particular Universal package versions
      Throws:
      AzDException - Default Api Exception handler.