Interface LicenseStorage


  • public interface LicenseStorage
    The interface to store license usage data.
    Author:
    Vaadin Ltd
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void addUserEntry​(java.lang.String licenseKey, java.time.YearMonth month, java.lang.String payload)
      Adds a user entry for the specified month.
      java.util.Map<java.lang.String,​java.time.LocalDate> getLatestLicenseEvents​(java.lang.String licenseKey)
      Gets a map of license event names with the date of their last occurrence.
      java.util.List<java.lang.String> getUserEntries​(java.lang.String licenseKey, java.time.YearMonth month)
      Gets a list of entries for users seen in the specified month.
      void setLicenseEvent​(java.lang.String licenseKey, java.lang.String eventName, java.time.LocalDate latestOccurrence)
      Sets the date of the latest occurrence of the specified license event.
    • Method Detail

      • getUserEntries

        java.util.List<java.lang.String> getUserEntries​(java.lang.String licenseKey,
                                                        java.time.YearMonth month)
        Gets a list of entries for users seen in the specified month.
        Parameters:
        licenseKey - the license key
        month - the month
        Returns:
        the list of users
      • addUserEntry

        void addUserEntry​(java.lang.String licenseKey,
                          java.time.YearMonth month,
                          java.lang.String payload)
        Adds a user entry for the specified month.
        Parameters:
        licenseKey - the license key
        month - the month
        payload - the user entry
      • getLatestLicenseEvents

        java.util.Map<java.lang.String,​java.time.LocalDate> getLatestLicenseEvents​(java.lang.String licenseKey)
        Gets a map of license event names with the date of their last occurrence.
        Parameters:
        licenseKey - the license key
        Returns:
        the mapping of events and their last occurrence
      • setLicenseEvent

        void setLicenseEvent​(java.lang.String licenseKey,
                             java.lang.String eventName,
                             java.time.LocalDate latestOccurrence)
        Sets the date of the latest occurrence of the specified license event.
        Parameters:
        licenseKey - the license key
        eventName - the event name
        latestOccurrence - the date of the latest occurrence