use of org.olat.course.certificate.model.CertificateLightPack in project OpenOLAT by OpenOLAT.
the class DownloadCertificateCellRenderer method render.
@Override
public void render(Renderer renderer, StringOutput target, Object cellValue, int row, FlexiTableComponent source, URLBuilder ubu, Translator translator) {
if (renderer == null) {
if (cellValue instanceof CertificateLight) {
renderExcel(target, (CertificateLight) cellValue);
} else if (cellValue instanceof CertificateLightPack) {
CertificateLightPack pack = (CertificateLightPack) cellValue;
renderExcel(target, pack.getCertificate());
}
} else if (cellValue instanceof CertificateLight) {
CertificateLight certificate = (CertificateLight) cellValue;
if (assessedIdentity == null) {
IdentityRef idRef = new IdentityRefImpl(certificate.getIdentityKey());
render(target, certificate, idRef, translator.getLocale());
} else {
render(target, certificate, assessedIdentity, translator.getLocale());
}
} else if (cellValue instanceof CertificateLightPack) {
CertificateLightPack pack = (CertificateLightPack) cellValue;
render(target, pack.getCertificate(), pack.getIdentity(), translator.getLocale());
}
}
use of org.olat.course.certificate.model.CertificateLightPack in project openolat by klemens.
the class DownloadCertificateCellRenderer method render.
@Override
public void render(Renderer renderer, StringOutput target, Object cellValue, int row, FlexiTableComponent source, URLBuilder ubu, Translator translator) {
if (renderer == null) {
if (cellValue instanceof CertificateLight) {
renderExcel(target, (CertificateLight) cellValue);
} else if (cellValue instanceof CertificateLightPack) {
CertificateLightPack pack = (CertificateLightPack) cellValue;
renderExcel(target, pack.getCertificate());
}
} else if (cellValue instanceof CertificateLight) {
CertificateLight certificate = (CertificateLight) cellValue;
if (assessedIdentity == null) {
IdentityRef idRef = new IdentityRefImpl(certificate.getIdentityKey());
render(target, certificate, idRef, translator.getLocale());
} else {
render(target, certificate, assessedIdentity, translator.getLocale());
}
} else if (cellValue instanceof CertificateLightPack) {
CertificateLightPack pack = (CertificateLightPack) cellValue;
render(target, pack.getCertificate(), pack.getIdentity(), translator.getLocale());
}
}
Aggregations