Hello
I would like to identify inside my Jira plugin if it was installed in a Jira DC or Jira Standalone
How can I do that?
Didnt find any conclusive answer so far
check this solution
import com.atlassian.jira.bc.license.JiraLicenseService;
import com.atlassian.jira.component.ComponentAccessor;
public boolean isDataCenterLicense() {
Iterable<LicenseDetails> licenseDetailsIterator = ComponentAccessor.getComponent(JiraLicenseService.class).getLicenses();
for (LicenseDetails licenseDetails : licenseDetailsIterator) {
if(licenseDetails.isDataCenter())
return true;
}
return false;
}
Cheers
Adam
2 Likes