use of com.intel.mtwilson.datatypes.ManifestData in project OpenAttestation by OpenAttestation.
the class MleBO method createMleDataFromDatabaseRecord.
/**
*
* @param tblMle
* @param addManifest
* @return
*/
public MleData createMleDataFromDatabaseRecord(TblMle tblMle, boolean addManifest) {
List<ManifestData> manifestList = null;
if (addManifest) {
manifestList = new ArrayList<ManifestData>();
for (TblPcrManifest pcrManifest : tblMle.getTblPcrManifestCollection()) {
manifestList.add(new ManifestData(pcrManifest.getName(), pcrManifest.getValue()));
}
}
String osName = (tblMle.getOsId() == null) ? null : tblMle.getOsId().getName();
String osVersion = (tblMle.getOsId() == null) ? null : tblMle.getOsId().getVersion();
String oemName = (tblMle.getOemId() == null) ? null : tblMle.getOemId().getName();
MleData s = new MleData(tblMle.getName(), tblMle.getVersion(), MleData.MleType.valueOf(tblMle.getMLEType()), MleData.AttestationType.valueOf(tblMle.getAttestationType()), manifestList, tblMle.getDescription(), osName, osVersion, oemName);
return s;
}
Aggregations