use of org.ovirt.engine.api.model.Certificate in project ovirt-engine by oVirt.
the class BackendVmResource method setCertificateInfo.
public void setCertificateInfo(Vm model) {
QueryReturnValue result = runQuery(QueryType.GetVdsCertificateSubjectByVmId, new IdQueryParameters(asGuid(model.getId())));
if (result != null && result.getSucceeded() && result.getReturnValue() != null) {
if (!model.isSetDisplay()) {
model.setDisplay(new Display());
}
model.getDisplay().setCertificate(new Certificate());
model.getDisplay().getCertificate().setSubject(result.getReturnValue().toString());
}
}
use of org.ovirt.engine.api.model.Certificate in project ovirt-engine by oVirt.
the class CertificateMapper method map.
@Mapping(from = CertificateInfo.class, to = Certificate.class)
public static Certificate map(CertificateInfo entity, Certificate template) {
Certificate model = template != null ? template : new Certificate();
model.setContent(entity.getPayload());
model.setSubject(entity.getSubject());
return model;
}
Aggregations