com.serotonin.m2m2.module
Interface LicenseDefinition


public interface LicenseDefinition

A license definition allows the module to check the validity of its license, take action as necessary. It also provides a means to present messages to users about license conditions, either as errors or warnings.

Author:
Matthew Lohbihler

Method Summary
 void addLicenseErrors(java.util.List<com.serotonin.m2m2.i18n.TranslatableMessage> errors)
          Allows the license definition to provide error messages to the user regarding the module's license.
 void addLicenseWarnings(java.util.List<com.serotonin.m2m2.i18n.TranslatableMessage> warnings)
          Allows the license definition to provide warning messages to the user regarding the module's license.
 void licenseCheck(boolean initialization)
          Provides the module an opportunity to check it's license.
 

Method Detail

addLicenseErrors

void addLicenseErrors(java.util.List<com.serotonin.m2m2.i18n.TranslatableMessage> errors)
Allows the license definition to provide error messages to the user regarding the module's license.

Parameters:
errors - a list of translatable messages that can be appended to

addLicenseWarnings

void addLicenseWarnings(java.util.List<com.serotonin.m2m2.i18n.TranslatableMessage> warnings)
Allows the license definition to provide warning messages to the user regarding the module's license.

Parameters:
warnings - a list of translatable messages that can be appended to

licenseCheck

void licenseCheck(boolean initialization)
Provides the module an opportunity to check it's license. All license values are available in the Common.license License instance. This method is called once upon instantiation, and thereafter regularly during the lifetime of the instance. Exceptions should not be thrown. Instead, the module should take the opportunity to change settings as necessary that change the behavior or the module.

Parameters:
initialization - whether the method is being called at system startup (true), or during a scheduled re-check (false).