Search in sources :

Example 6 with LicenseTypeImpl

use of org.olat.core.commons.services.license.model.LicenseTypeImpl in project OpenOLAT by OpenOLAT.

the class DefaultModuleValues method createAndPersistPredefined.

private void createAndPersistPredefined(String name, String cssClass, String text) {
    if (!licenseTypeDao.exists(name)) {
        LicenseTypeImpl licenseType = (LicenseTypeImpl) licenseTypeDao.create(name);
        licenseType.setCssClass(cssClass);
        licenseType.setText(text);
        licenseType.setPredefined(true);
        licenseTypeDao.save(licenseType);
    }
}
Also used : LicenseTypeImpl(org.olat.core.commons.services.license.model.LicenseTypeImpl)

Aggregations

LicenseTypeImpl (org.olat.core.commons.services.license.model.LicenseTypeImpl)6 Date (java.util.Date)2 Test (org.junit.Test)2 License (org.olat.core.commons.services.license.License)2 LicenseImpl (org.olat.core.commons.services.license.model.LicenseImpl)2