Class LocalOfflineKey

java.lang.Object
com.vaadin.pro.licensechecker.LocalOfflineKey

public class LocalOfflineKey extends Object
Fetches an offline key from either the home directory (~/.vaadin/offlineKey) or from a system property (vaadin.offlineKey) if available. Also capable of writing an offline key but this should not be used except for testing. Offline keys are always downloaded and stored manually.
  • Constructor Details

    • LocalOfflineKey

      public LocalOfflineKey()
  • Method Details

    • getLocations

      public static File[] getLocations()
      Returns all file locations where offline keys are searched, in priority order.
      Returns:
      array of files that can contain offline keys
    • get

      public static OfflineKey get()
      Finds an offline key, either from a system property or from the home directory.
      Returns:
      an offline key or null if no key was found
    • getAll

      public static List<OfflineKey> getAll()
      Returns all offline keys found in the file system, in priority order. This allows callers to implement custom selection logic.
      Returns:
      list of OfflineKey objects found in files, in priority order
    • fromString

      public static Optional<OfflineKey> fromString(String key)
      Creates a new OfflineKey based on the given string representation.
      Parameters:
      key - The string representation of the offline key.
      Returns:
      an OfflineKey, or an empty Optional if the given string does not represent a valid offline key.