Class CoffeePickInventory

    • Method Detail

      • open

        public static CoffeePickInventoryType open​(io.reactivex.rxjava3.subjects.Subject<CoffeePickInventoryEventType> events,
                                                   java.nio.file.Path path)
                                            throws java.io.IOException
        Open an inventory.
        Parameters:
        events - The receiver of events
        path - The path of the inventory
        Returns:
        An inventory
        Throws:
        java.io.IOException - On I/O errors
      • open

        public static CoffeePickInventoryType open​(io.reactivex.rxjava3.subjects.Subject<CoffeePickInventoryEventType> events,
                                                   org.apache.commons.compress.archivers.ArchiveStreamFactory archives,
                                                   org.apache.commons.compress.compressors.CompressorStreamFactory compressors,
                                                   java.nio.file.Path path)
                                            throws java.io.IOException
        Open an inventory.
        Parameters:
        events - The receiver of events
        archives - A factory for archive streams
        compressors - A factory for compressors
        path - The path of the inventory
        Returns:
        An inventory
        Throws:
        java.io.IOException - On I/O errors
      • pathOf

        public java.util.Optional<java.nio.file.Path> pathOf​(java.lang.String id)
                                                      throws java.io.IOException
        Description copied from interface: CoffeePickInventoryType
        Return the path of the given runtime in the inventory if it exists, or nothing if it does not.
        Specified by:
        pathOf in interface CoffeePickInventoryType
        Parameters:
        id - The identifier
        Returns:
        The path to the runtime if it is installed
        Throws:
        java.io.IOException - On I/O errors
      • unpack

        public java.nio.file.Path unpack​(java.lang.String id,
                                         java.nio.file.Path target_path,
                                         CoffeePickIsCancelledType cancelled,
                                         java.util.Set<CoffeePickInventoryType.UnpackOption> options)
                                  throws java.io.IOException
        Description copied from interface: CoffeePickInventoryType
        Unpack the runtime with the given ID to path. The method takes a function cancelled that will be evaluated repeatedly and, if the function returns true at any point, the operation will be cancelled.
        Specified by:
        unpack in interface CoffeePickInventoryType
        Parameters:
        id - The runtime ID
        target_path - The target path
        cancelled - A function that returns true if the operation should be cancelled
        options - The unpacking options
        Returns:
        The path of the unpacked archive
        Throws:
        java.io.IOException - On I/O errors
      • delete

        public void delete​(java.lang.String id)
                    throws java.io.IOException
        Description copied from interface: CoffeePickInventoryType
        Delete the runtime with the given identifier. Does nothing if no runtime has the given identifier.
        Specified by:
        delete in interface CoffeePickInventoryType
        Parameters:
        id - The identifier
        Throws:
        java.io.IOException - On I/O errors
      • verify

        public CoffeePickVerification verify​(java.lang.String id,
                                             CoffeePickIsCancelledType cancelled)
                                      throws java.io.IOException
        Description copied from interface: CoffeePickInventoryType
        Verify the archive of the runtime with the given ID. The method takes a function cancelled that will be evaluated repeatedly and, if the function returns true at any point, the operation will be cancelled.
        Specified by:
        verify in interface CoffeePickInventoryType
        Parameters:
        id - The identifier
        cancelled - A function that returns true if the operation should be cancelled
        Returns:
        The verification results
        Throws:
        java.io.IOException - On I/O errors