use of org.olat.core.commons.modules.bc.FolderLicenseHandler in project OpenOLAT by OpenOLAT.
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.modules.bc.FolderLicenseHandler 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));
}
}
Aggregations