Interface Application

All Known Subinterfaces:
LinuxApplication, MacApplication, WinApplication
All Known Implementing Classes:
Application.Stub

public interface Application
A generic application for packaging.
See Also:
API Note:
All paths of startup configurations of application launchers returned by launchers() call must be relative to the path returned by srcDir() call.
  • Method Details

    • name

      String name()
      Gets the name of this application.
      Returns:
      the name of this application
    • description

      String description()
      Gets the description of this application.
      Returns:
      the description of this application
    • version

      String version()
      Gets the version of this application.
      Returns:
      the version of this application
    • vendor

      String vendor()
      Gets the vendor of this application.
      Returns:
      the vendor of this application
    • copyright

      String copyright()
      Gets the copyright of this application.
      Returns:
      the copyright of this application
    • srcDir

      Optional<Path> srcDir()
      Gets the source directory of this application if available or an empty Optional instance.

      Source directory is a directory with the applications's classes and other resources.

      Returns:
      the source directory of this application
    • contentDirs

      List<Path> contentDirs()
      Gets the input content directories of this application.

      Contents of the content directories will be copied as-is into the dedicated location of the application image.

      Returns:
      the input content directories of this application
      See Also:
    • imageLayout

      AppImageLayout imageLayout()
      Gets the unresolved app image layout of this application.
      Returns:
      the unresolved app image layout of this application
    • asApplicationLayout

      default Optional<ApplicationLayout> asApplicationLayout()
      Gets the unresolved app image layout of this application as ApplicationLayout type or an empty Optional instance if the return value of imageLayout() call is not an instance of ApplicationLayout type.

      Returns an empty Optional instance if isRuntime() returns true.

      Returns:
      the unresolved app image layout of this application as ApplicationLayout
      See Also:
    • runtimeBuilder

      Optional<RuntimeBuilder> runtimeBuilder()
      Gets the runtime builder of this application if available or an empty Optional instance.
      Returns:
      the runtime builder of this application
    • appImageDirName

      default Path appImageDirName()
      Gets the name of the root app image directory of this application.
      Returns:
      the name of the root app image directory of this application
    • launchers

      List<Launcher> launchers()
      Gets the application launchers of this application.

      If the returned list is not empty, the first element in the list is the main launcher.

      Returns an empty list if isRuntime() returns true.

      Returns:
      the application launchers of this application
      See Also:
    • mainLauncher

      default Optional<Launcher> mainLauncher()
      Returns the main application launcher of this application or an empty Optional instance if the application doesn't have launchers.

      Returns an empty Optional instance if isRuntime() returns true.

      Returns:
      the main application launcher of this application
      See Also:
    • additionalLaunchers

      default List<Launcher> additionalLaunchers()
      Gets the additional application launchers of this application.

      Returns an empty list if this application doesn't have additional launchers.

      Returns an empty list if isRuntime() returns true.

      Returns:
      the additional application launchers of this application
      See Also:
    • isRuntime

      default boolean isRuntime()
      Returns true if this application is Java runtime.
      Returns:
      true if this application is Java runtime
    • isService

      default boolean isService()
      Returns true if any of application launchers of this application are configured as services.
      Returns:
      true if any of application launchers of this application are configured as services
      See Also:
    • extraAppImageFileData

      Map<String,String> extraAppImageFileData()
      Gets the additional properties of this application for the application entry in the app image (".jpackage") file.
      Returns:
      the additional properties of this application for the application entry in ".jpackage" file
    • fileAssociations

      default Stream<FileAssociation> fileAssociations()
      Gets the file associations of all application launchers of this application.
      Returns:
      the file associations of all application launchers of this application
      See Also: