Search in sources :

Example 1 with IdentityResourceKey

use of org.olat.modules.coach.model.IdentityResourceKey in project OpenOLAT by OpenOLAT.

the class EfficiencyStatementEntryTableDataModel method putCertificate.

public void putCertificate(CertificateLight certificate) {
    if (certificateMap != null && certificate != null) {
        IdentityResourceKey key = new IdentityResourceKey(certificate.getIdentityKey(), certificate.getOlatResourceKey());
        certificateMap.put(key, certificate);
    }
}
Also used : IdentityResourceKey(org.olat.modules.coach.model.IdentityResourceKey)

Example 2 with IdentityResourceKey

use of org.olat.modules.coach.model.IdentityResourceKey in project OpenOLAT by OpenOLAT.

the class GroupController method event.

@Override
public void event(Event event) {
    if (event instanceof CertificateEvent) {
        CertificateEvent ce = (CertificateEvent) event;
        IdentityResourceKey key = new IdentityResourceKey(ce.getOwnerKey(), ce.getResourceKey());
        if (model.contains(key)) {
            updateCertificate(ce.getCertificateKey());
        }
    }
}
Also used : CertificateEvent(org.olat.course.certificate.CertificateEvent) IdentityResourceKey(org.olat.modules.coach.model.IdentityResourceKey)

Example 3 with IdentityResourceKey

use of org.olat.modules.coach.model.IdentityResourceKey in project OpenOLAT by OpenOLAT.

the class GroupController method loadModel.

private List<EfficiencyStatementEntry> loadModel() {
    List<EfficiencyStatementEntry> allGroup = coachingService.getGroup(group, userPropertyHandlers, getLocale());
    List<CertificateLight> certificates = certificatesManager.getLastCertificates(group);
    ConcurrentMap<IdentityResourceKey, CertificateLight> certificateMap = new ConcurrentHashMap<>();
    for (CertificateLight certificate : certificates) {
        IdentityResourceKey key = new IdentityResourceKey(certificate.getIdentityKey(), certificate.getOlatResourceKey());
        certificateMap.put(key, certificate);
    }
    model.setObjects(allGroup, certificateMap);
    tableEl.reloadData();
    tableEl.reset();
    return allGroup;
}
Also used : EfficiencyStatementEntry(org.olat.modules.coach.model.EfficiencyStatementEntry) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) CertificateLight(org.olat.course.certificate.CertificateLight) IdentityResourceKey(org.olat.modules.coach.model.IdentityResourceKey)

Example 4 with IdentityResourceKey

use of org.olat.modules.coach.model.IdentityResourceKey in project openolat by klemens.

the class EfficiencyStatementEntryTableDataModel method putCertificate.

public void putCertificate(CertificateLight certificate) {
    if (certificateMap != null && certificate != null) {
        IdentityResourceKey key = new IdentityResourceKey(certificate.getIdentityKey(), certificate.getOlatResourceKey());
        certificateMap.put(key, certificate);
    }
}
Also used : IdentityResourceKey(org.olat.modules.coach.model.IdentityResourceKey)

Example 5 with IdentityResourceKey

use of org.olat.modules.coach.model.IdentityResourceKey in project openolat by klemens.

the class GroupController method loadModel.

private List<EfficiencyStatementEntry> loadModel() {
    List<EfficiencyStatementEntry> allGroup = coachingService.getGroup(group, userPropertyHandlers, getLocale());
    List<CertificateLight> certificates = certificatesManager.getLastCertificates(group);
    ConcurrentMap<IdentityResourceKey, CertificateLight> certificateMap = new ConcurrentHashMap<>();
    for (CertificateLight certificate : certificates) {
        IdentityResourceKey key = new IdentityResourceKey(certificate.getIdentityKey(), certificate.getOlatResourceKey());
        certificateMap.put(key, certificate);
    }
    model.setObjects(allGroup, certificateMap);
    tableEl.reloadData();
    tableEl.reset();
    return allGroup;
}
Also used : EfficiencyStatementEntry(org.olat.modules.coach.model.EfficiencyStatementEntry) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) CertificateLight(org.olat.course.certificate.CertificateLight) IdentityResourceKey(org.olat.modules.coach.model.IdentityResourceKey)

Aggregations

IdentityResourceKey (org.olat.modules.coach.model.IdentityResourceKey)10 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)6 CertificateLight (org.olat.course.certificate.CertificateLight)6 EfficiencyStatementEntry (org.olat.modules.coach.model.EfficiencyStatementEntry)6 CertificateEvent (org.olat.course.certificate.CertificateEvent)2 IdentityRepositoryEntryKey (org.olat.modules.coach.model.IdentityRepositoryEntryKey)2 LectureBlockStatistics (org.olat.modules.lecture.model.LectureBlockStatistics)2 RepositoryEntry (org.olat.repository.RepositoryEntry)2