Class ExtensionService

java.lang.Object
com.kosdev.kos.core.service.ext.ExtensionService

public class ExtensionService extends Object
Service that loads extensions at startup. An extension is an optional part of KOS that can be included and loaded as part of the core before any applications are loaded. All extensions will be loaded into a shared classloader which will then be the parent classloader of the system app.

Extensions have access to the root KOS bean context and can add beans as needed. Any controllers defined in an extension will be in the /kos/ext/<extension> namespace.

Since:
1
Version:
9
  • Method Details

    • isInstalled

      public boolean isInstalled(String extensionName)
      Return true if the named extension has been installed.
      Parameters:
      extensionName - the name of the extension to check
      Since:
      9
    • hasExtension

      @Deprecated public boolean hasExtension(String extensionName)
      Deprecated.
      use isInstalled() instead
      Return true if the named extension has been installed.
      Parameters:
      extensionName - the name of the extension to check
      Since:
      1
    • getExtensionNames

      public Collection<String> getExtensionNames()
      Return a list of extensions that are installed.
      Since:
      1
    • getApiVersion

      public int getApiVersion(String extensionName)
      Return the api version for the specified extension name. Returns -1 if the extension is not found.
      Parameters:
      extensionName - the name of the extension
      Since:
      9