Page 1 of 1

SDK using individual license

Posted: Sun Oct 18, 2015 10:09 pm
by sderrick
We are using the SDK Editor and a license server.

The SDK allows the use of an individual's user license if the license server has run out.

Is there a way to have the editor use the individual's user license first, and if none given, then request a license from the server?

thanks,

Scott

Re: SDK using individual license

Posted: Sun Oct 18, 2015 10:19 pm
by sderrick
this is how I'm getting the license

Code: Select all

factory.init(frameworkZips, optionsZipURL, codeBase, appletID,
// //The servlet URL
"http://website/oxygenLicenseServlet/license-servlet",
// //The HTTP credentials user name
"oxygenLicense",
// //The HTTP credentials password
"xxxxxxxx");

Re: SDK using individual license

Posted: Mon Oct 19, 2015 9:58 am
by Radu
Hi Scott,

Maybe you could try this:

First of all, before calling factory.init you could ask the end user with a small dialog if he wants to use an user based license.
If he does, he can paste it in your custom dialog and you can use the license key to call the API with a fixed license key:

Code: Select all

		String licenseKey = "obtained from user";
factory.init(frameworkZips, optionsZipURL, codeBase, appletID,
// The license key if it is a fixed license
licenseKey);
If the user rejects the offer, you can call the current init() which tries to call a servlet.

But it's annoying asking the user the same thing each time he starts the applet so you would need to persist the end user choice and the fixed license key he gave in a custom configuration file somewhere on disk (in the user home for example, there is a system property called "user.home" which you can read for this).

Regards,
Radu

Re: SDK using individual license

Posted: Tue Nov 17, 2015 1:46 am
by sderrick
Radu,

I am trying to implement the scenario we discussed earlier about having some of our users use their personal desktop license instead of grabbing one of the floating licenses available on our license server.

I have a dialog that allows the user to paste in their key, which I store in a local file on their machine. If I then detect that file I extract the key , a String, and try to init the editor with
factory.init(frameworkZips, optionsZipURL, codeBase, appletID, loc.getLicense());
But the editor throws an exception because it only allows trial keys or a key served from a license servlet?

Scott

Re: SDK using individual license

Posted: Tue Nov 17, 2015 12:54 pm
by Dan
Indeed, you cannot use a user-based license as an argument, it accepts only site or evaluation type.
I think the best is to let the user paste the license in the oXygen licensing dialog, or enter the license server details. For this dialog to pop-up, leave the licensing arguments set to null.

Re: SDK using individual license

Posted: Tue Nov 17, 2015 5:29 pm
by sderrick
But this requires the user to paste in their license key in every time?

We have users who have paid for valid professional license keys, and the author component allows the use of a personal license.

There must be a solution that is user friendly?

Scott

Re: SDK using individual license

Posted: Tue Nov 17, 2015 5:41 pm
by sderrick
I've reread the docs about licensing the author component. Maybe I miss understood it?

Use of this
AuthorComponentFactory.getInstance().init(
frameworkZips, optionsZipURL, codeBase, appletID,
//Null license key, will ask the user.
null);
Will cause this behavoir
Display the license registration dialog box. This is the default behavior if a null license key is set using the API, this transfers the licensing responsibility to the end-user. The user can license an Author Component using standard Oxygen XML Editor license keys. The license key will be saved to the local user's disk and on subsequent runs the user will not be asked anymore.
My question is: Does this mean once I enter my license, a call to the
AuthorComponentFactory.getInstance().init(
frameworkZips, optionsZipURL, codeBase, appletID,
//Null license key, will ask the user.
null);
Will not ask for my license and will automatically use it?

thanks,

Scott

Re: SDK using individual license

Posted: Wed Nov 18, 2015 12:37 am
by Radu
Dear Scott,

My initial remark:
If he does, he can paste it in your custom dialog and you can use the license key to call the API with a fixed license key
was incorrect and I apologize for this. You cannot use the API to inject a fixed license key via the API. If this were allowed, integrators could register a fixed license key via the API and let the applet be used by as many end users as possible.

About your last question:
Does this mean once I enter my license, a call to the

AuthorComponentFactory.getInstance().init(
frameworkZips, optionsZipURL, codeBase, appletID,
//Null license key, will ask the user.
null);

Will not ask for my license and will automatically use it?
If you always call the API using the null license key, the end user will be asked for the license the first time. He can paste a fixed license. The second time the applet is launched, it should use that initial pasted license which it keeps in its own persistent offline options storage without asking the user again.

Regards,
Radu

Re: SDK using individual license

Posted: Wed Nov 18, 2015 1:01 am
by sderrick
radu,

thanks, I tried that and its working perfectly! Thanks..

Scott