Using the ModuleManager


I’m using the module manager to install our modules from another Gateway scope module.

My code looks like the following:
ModuleManager mm = context.getModuleManager();
mm.installModule(“javaFxPanel-signed_78.modl”, data);

That works just fine.

But when I try on an external module that require a license to be accepted the module is not installed and I get:
ModuleManager 11Oct2016 14:35:15 Moving module javaFxPanel to quarantine because license not yet accepted.

Is it possible to automatically accept the license and allow the installation of Modules that have a license?


We store a CRC32 of licenses that have been previously accepted by the user and check the new module’s license against the stored CRCs. So if module A is installing module B and their licenses are character-for-character the same, you shouldn’t get that error with module B. If there’s even one character different, we assume the user needs to see and accept the license.

I don’t see a good way around it. Anything hacky you try with writing subclasses and overriding methods is unlikely to work at startup or after upgrades. :\

[edit] Looks like we aren’t checking against all previous CRCs, just looking for a stored CRC for that particular module and checking against what we’re loading. So even having a previously accepted license for another module won’t do it for you. :frowning:

Thank you Kathy for the explanation.
That answers my question.