Class LicenseTemplate
java.lang.Object
me.hsgamer.hscore.license.template.LicenseTemplate
A template to fetch messages based on the
LicenseStatus-
Constructor Summary
ConstructorsConstructorDescriptionLicenseTemplate(List<LicenseChecker> checkers) Create a new templateLicenseTemplate(LicenseChecker... checker) Create a new template -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDefaultMessage(String name) Add the default messagevoidaddMessage(LicenseStatus status, String... message) Add the messagevoidaddMessage(LicenseStatus status, Function<List<LicenseResult>, List<String>> message) Add the messagevoidaddMessage(LicenseStatus status, List<String> message) Add the messageCheck the license and get the messageGet the result of the license checker
-
Constructor Details
-
LicenseTemplate
Create a new template- Parameters:
checkers- the license checkers
-
LicenseTemplate
Create a new template- Parameters:
checker- the license checker
-
-
Method Details
-
addMessage
Add the message- Parameters:
status- the statusmessage- the message
-
addMessage
Add the message- Parameters:
status- the statusmessage- the message
-
addMessage
Add the message- Parameters:
status- the statusmessage- the message
-
addDefaultMessage
Add the default message- Parameters:
name- the name of the product
-
getResult
Get the result of the license checker- Returns:
- the result
-
getMessage
Check the license and get the message- Returns:
- the message
-