Interface Packages


  • public interface Packages
    Administration operations of the packages management service.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void delete​(java.lang.String packageName)
      Delete the specified package.
      java.util.concurrent.CompletableFuture<java.lang.Void> deleteAsync​(java.lang.String packageName)
      Delete the specified package asynchronously.
      void download​(java.lang.String packageName, java.lang.String path)
      Download a package from the package management service.
      java.util.concurrent.CompletableFuture<java.lang.Void> downloadAsync​(java.lang.String packageName, java.lang.String path)
      Download a package from the package management service asynchronously.
      PackageMetadata getMetadata​(java.lang.String packageName)
      Get a package metadata information.
      java.util.concurrent.CompletableFuture<PackageMetadata> getMetadataAsync​(java.lang.String packageName)
      Get a package metadata information asynchronously.
      java.util.List<java.lang.String> listPackages​(java.lang.String type, java.lang.String namespace)
      List all the packages with the given type in a namespace.
      java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> listPackagesAsync​(java.lang.String type, java.lang.String namespace)
      List all the packages with the given type in a namespace asynchronously.
      java.util.List<java.lang.String> listPackageVersions​(java.lang.String packageName)
      List all the versions of a package.
      java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> listPackageVersionsAsync​(java.lang.String packageName)
      List all the versions of a package asynchronously.
      void updateMetadata​(java.lang.String packageName, PackageMetadata metadata)
      Update a package metadata information.
      java.util.concurrent.CompletableFuture<java.lang.Void> updateMetadataAsync​(java.lang.String packageName, PackageMetadata metadata)
      Update a package metadata information asynchronously.
      void upload​(PackageMetadata metadata, java.lang.String packageName, java.lang.String path)
      Upload a package to the package management service.
      java.util.concurrent.CompletableFuture<java.lang.Void> uploadAsync​(PackageMetadata metadata, java.lang.String packageName, java.lang.String path)
      Upload a package to the package management service asynchronously.
    • Method Detail

      • getMetadata

        PackageMetadata getMetadata​(java.lang.String packageName)
                             throws PulsarAdminException
        Get a package metadata information.
        Parameters:
        packageName - the package name of the package metadata you want to find
        Returns:
        the package metadata information
        Throws:
        PulsarAdminException
      • getMetadataAsync

        java.util.concurrent.CompletableFuture<PackageMetadata> getMetadataAsync​(java.lang.String packageName)
        Get a package metadata information asynchronously.
        Parameters:
        packageName - the package name of the package metadata you want to find
        Returns:
        the package metadata information
      • updateMetadata

        void updateMetadata​(java.lang.String packageName,
                            PackageMetadata metadata)
                     throws PulsarAdminException
        Update a package metadata information.
        Parameters:
        packageName - the package name of the package metadata you want to update
        metadata - the updated metadata information
        Throws:
        PulsarAdminException
      • updateMetadataAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> updateMetadataAsync​(java.lang.String packageName,
                                                                                   PackageMetadata metadata)
        Update a package metadata information asynchronously.
        Parameters:
        packageName - the package name of the package metadata you want to update
        metadata - the updated metadata information
        Returns:
        nothing
      • upload

        void upload​(PackageMetadata metadata,
                    java.lang.String packageName,
                    java.lang.String path)
             throws PulsarAdminException
        Upload a package to the package management service.
        Parameters:
        packageName - the package name of the upload file
        path - the upload file path
        Throws:
        PulsarAdminException
      • uploadAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> uploadAsync​(PackageMetadata metadata,
                                                                           java.lang.String packageName,
                                                                           java.lang.String path)
        Upload a package to the package management service asynchronously.
        Parameters:
        packageName - the package name you want to upload
        path - the path you want to upload from
        Returns:
        nothing
      • download

        void download​(java.lang.String packageName,
                      java.lang.String path)
               throws PulsarAdminException
        Download a package from the package management service.
        Parameters:
        packageName - the package name you want to download
        path - the path you want to download to
        Throws:
        PulsarAdminException
      • downloadAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> downloadAsync​(java.lang.String packageName,
                                                                             java.lang.String path)
        Download a package from the package management service asynchronously.
        Parameters:
        packageName - the package name you want to download
        path - the path you want to download to
        Returns:
        nothing
      • delete

        void delete​(java.lang.String packageName)
             throws PulsarAdminException
        Delete the specified package.
        Parameters:
        packageName - the package name which you want to delete
        Throws:
        PulsarAdminException
      • deleteAsync

        java.util.concurrent.CompletableFuture<java.lang.Void> deleteAsync​(java.lang.String packageName)
        Delete the specified package asynchronously.
        Parameters:
        packageName - the package name which you want to delete
        Returns:
        nothing
      • listPackageVersions

        java.util.List<java.lang.String> listPackageVersions​(java.lang.String packageName)
                                                      throws PulsarAdminException
        List all the versions of a package.
        Parameters:
        packageName - the package name which you want to get all the versions
        Returns:
        all the versions of the package
        Throws:
        PulsarAdminException
      • listPackageVersionsAsync

        java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> listPackageVersionsAsync​(java.lang.String packageName)
        List all the versions of a package asynchronously.
        Parameters:
        packageName - the package name which you want to get all the versions
        Returns:
        all the versions of the package
      • listPackages

        java.util.List<java.lang.String> listPackages​(java.lang.String type,
                                                      java.lang.String namespace)
                                               throws PulsarAdminException
        List all the packages with the given type in a namespace.
        Parameters:
        type - the type you want to get the packages
        namespace - the namespace you want to get the packages
        Returns:
        all the packages of the given type which in the given namespace
        Throws:
        PulsarAdminException
      • listPackagesAsync

        java.util.concurrent.CompletableFuture<java.util.List<java.lang.String>> listPackagesAsync​(java.lang.String type,
                                                                                                   java.lang.String namespace)
        List all the packages with the given type in a namespace asynchronously.
        Parameters:
        type - the type you want to get the packages
        namespace - the namespace you want to get the packages
        Returns:
        all the packages of the given type which in the given namespace