Check Add-in Application License
Check Add-in Application License
EventHandlerBase.checkAddInLicense(.
String applicationName,
String applicationSecurityKey)
For instance:
checkAddInLicense(“MyArchibusAddIn”, “k1ndl33secure!my$add-in”);
Third-party applications call this license check at key places in their workflow rules, such us at the beginning of the public methods. Third-party applications do not ship the source to the workflow rule that makes this call so as to hide their application security key. Third-parties may wish to obfuscate their Java code so as to make it harder to decompile and see their security key or to modify their classes.
Web Central loads all files with extension “bin” from the
WEB-INF\config\add-ins
folder on start up, verifies that they contain valid licenses, and caches them. If a .bin file contains invalid license, Web Central reports an error to the log file and continues start up.
On start up, Web Central adds the extension applications to the list of application licenses loaded from the stock license file. This enables the program to handle consistently the application license counts as well as the Program Information and License Usage form.
The method checks that:
- The customer name in the add-in license file is the same as "Licensed To" property in the stock Archibus license file.
-
The
applicationSecurityKey
matchessecurityKey
in the add-in license file.
If either of these tests fail, the program displays the message: Third-party add-in application MyArchibusAddIn is disabled because the add-in license file is missing or is not registered to this site.
This test will work even if the
applicationName
is one that does not ship with the stock Archibus schema. There is no need for this test to check concurrent users – the standard application licensing check does this, since the program manages add-in and stock applications from the same list.
The result is that no site without a license can execute the workflow rule of a third-party application unless they have the appropriate license.