@Override public ApplicationLicenseInfo getLicenseInfo() { ProductLicense license = AppConfig.getsConfig().getLicense().getFisheyeLicense(); return new ProductLicenseInfo(license); }
private <T> T applyToLicense(ProductLicenseFn<T> fn) { LicenseInfo licenseInfo = fisheyeAccessor.getLicenseInfo(); ProductLicense fishEyeLicense = licenseInfo.getFisheyeLicense(); ProductLicense crucibleLicense = licenseInfo.getCrucibleLicense(); if (fishEyeLicense != null) { return fn.call(fishEyeLicense); } else if (crucibleLicense != null) { return fn.call(crucibleLicense); } else { return null; } }
@Override public String getApplicationServerID() { LicenseInfo productLicense = AppConfig.getsConfig().getLicense(); if (productLicense.isFishEye()) { return productLicense.getFisheyeLicense().getServerId(); } else { return productLicense.getCrucibleLicense().getServerId(); } }
@Override public String getApplicationSEN() { LicenseInfo productLicense = AppConfig.getsConfig().getLicense(); if (productLicense.isFishEye()) { return productLicense.getFisheyeLicense().getSupportEntitlementNumber(); } else { return productLicense.getCrucibleLicense().getSupportEntitlementNumber(); } }
licenseProps.setValue(LICENSE_SEN, productLicense.getFisheyeLicense().getSupportEntitlementNumber()); licenseProps.setValue(LICENSE_SERVER_ID, productLicense.getFisheyeLicense().getServerId()); licenseProps.setValue(LICENSE_EXPIRES, productLicense.getSoftExpiryValue().toString()); String upgradesMaintenence = ""; if (productLicense.getFisheyeLicense() != null) String maxFEUsers = productLicense.getFisheyeLicense().isUnlimitedNumberOfUsers() ? LICENSE_UNLIMITED_USERS : "" + productLicense.getFisheyeLicense().getMaximumNumberOfUsers(); licenseProps.setValue(MAX_FE_USERS, maxFEUsers);