use of org.olat.core.commons.services.license.License in project openolat by klemens.
the class VFSResourceRoot method addLicense.
private void addLicense(MetaInfo meta, Identity identity) {
LicenseService licenseService = CoreSpringFactory.getImpl(LicenseService.class);
LicenseModule licenseModule = CoreSpringFactory.getImpl(LicenseModule.class);
FolderLicenseHandler licenseHandler = CoreSpringFactory.getImpl(FolderLicenseHandler.class);
if (licenseModule.isEnabled(licenseHandler)) {
License license = licenseService.createDefaultLicense(licenseHandler, identity);
meta.setLicenseTypeKey(String.valueOf(license.getLicenseType().getKey()));
meta.setLicenseTypeName(license.getLicenseType().getName());
meta.setLicensor(license.getLicensor());
meta.setLicenseText(LicenseUIFactory.getLicenseText(license));
}
}
use of org.olat.core.commons.services.license.License in project openolat by klemens.
the class LicenseServiceImpl method createDefaultLicense.
@Override
public License createDefaultLicense(LicenseHandler handler, Identity licensor) {
LicenseType defautlLicenseType = getDefaultLicenseType(handler);
String licensorName = licensorFactory.create(handler, licensor);
License license = new LicenseImpl();
license.setLicenseType(defautlLicenseType);
license.setLicensor(licensorName);
return license;
}
use of org.olat.core.commons.services.license.License in project openolat by klemens.
the class LicenseServiceImpl method createLicense.
@Override
public License createLicense(LicenseType licenseType) {
License license = new LicenseImpl();
license.setLicenseType(licenseType);
return license;
}
Aggregations