Find Questions…

Close ×
First time here? Check out the FAQ!

Is there a way to tell that JIRA runs on an academic license?

Igor Sereda asked this question · 4,292 karma ·

We'd like to match Atlassian academic discount with the same discount for our plugin, but we'll need to check whether JIRA runs on an academic license from Atlassian. Looking at com.atlassian.jira.license.LicenseDetails class, I don't see any method like isAcademic().

Is it possible to tell whether JIRA runs on an academic license?


One Answer:

Andy Brook [The Plugin People] · 15,313 karma ·

Just looking at this now, from what I can see, the LicenseDetails class does implement isAcademicLicense() however, its private for some reason unlike all the others. Given the LicenseDetails class also doesn't expose the underlying JiraLicense object it's not possible to directly re-implement the method which would be 'easy'.

What I think may work, is testing for isUnlimitedNumberOfUsers() and verifying that all other known license types are not matches (ie not Commercial, not Open Source (sigh)), going to give that a spin myself. Anyone have a better idea?

Igor Sereda · 4,292 karma ·

Yeah, thanks - I think going through reflection for isAcademicLicense is the best way, but IF it would really return true in the case of an academic license. This needs to be verified - since it is not part of the public API, our assumption based on the sources may be wrong. For example if academic license is actually a 50% discount for a normal commercial license.

(Checking for isUnlimitedNumberOfUsers, as you suggest, does not make sense to me - can't academic license be less than unlimited?)

Andy Brook [The Plugin People] · 15,313 karma ·

Yea quite right, best way is reflection, for anyone passing:

boolean isAcademic=false;
  Method method = jiraLicense.getClass().getDeclaredMethod("isAcademicLicense");
  Object result = method.invoke(jiraLicense);
catch (Exception e)
  //do something

Looking for something else?

Find Questions…

or Browse other questions tagged:

or Ask a Question