Class LicenseTemplate

java.lang.Object
me.hsgamer.hscore.license.template.LicenseTemplate

public class LicenseTemplate extends Object
A template to fetch messages based on the LicenseStatus
  • Constructor Details

    • LicenseTemplate

      public LicenseTemplate(List<LicenseChecker> checkers)
      Create a new template
      Parameters:
      checkers - the license checkers
    • LicenseTemplate

      public LicenseTemplate(LicenseChecker... checker)
      Create a new template
      Parameters:
      checker - the license checker
  • Method Details

    • addMessage

      public void addMessage(LicenseStatus status, Function<List<LicenseResult>,List<String>> message)
      Add the message
      Parameters:
      status - the status
      message - the message
    • addMessage

      public void addMessage(LicenseStatus status, List<String> message)
      Add the message
      Parameters:
      status - the status
      message - the message
    • addMessage

      public void addMessage(LicenseStatus status, String... message)
      Add the message
      Parameters:
      status - the status
      message - the message
    • addDefaultMessage

      public void addDefaultMessage(String name)
      Add the default message
      Parameters:
      name - the name of the product
    • getResult

      public Map.Entry<LicenseStatus,List<String>> getResult()
      Get the result of the license checker
      Returns:
      the result
    • getMessage

      public List<String> getMessage()
      Check the license and get the message
      Returns:
      the message