Updated the upload function for support RIM. The store happened before

the linkage and nothing was being saved.
This commit is contained in:
Cyrus 2022-02-24 09:54:59 -05:00
parent 9d27923d6d
commit 2e0b83f4fe
2 changed files with 18 additions and 0 deletions

View File

@ -257,9 +257,15 @@ public class ReferenceManifestPageController
for (SwidResource swid : bRim.parseResource()) { for (SwidResource swid : bRim.parseResource()) {
if (support.getHexDecHash().equals(swid.getHashValue())) { if (support.getHexDecHash().equals(swid.getHashValue())) {
updateSupportRimInfo(bRim, support); updateSupportRimInfo(bRim, support);
referenceManifestManager.update(support);
} }
} }
if (support.isUpdated()) { if (support.isUpdated()) {
for (ReferenceDigestValue rdv : referenceEventManager
.getValuesByRimId(support)) {
rdv.updateInfo(support);
referenceEventManager.updateRecord(rdv);
}
break; break;
} }
} }

View File

@ -257,6 +257,18 @@ public class ReferenceDigestValue extends ArchivableEntity {
} }
} }
/**
* Helper method to update the attributes of this object.
* @param support the associated RIM.
*/
public void updateInfo(final SupportReferenceManifest support) {
if (support != null && support.getId().equals(getSupportRimId())) {
setBaseRimId(support.getAssociatedRim());
setManufacturer(support.getPlatformManufacturer());
setModel(support.getPlatformModel());
}
}
@Override @Override
public boolean equals(final Object obj) { public boolean equals(final Object obj) {
if (this == obj) { if (this == obj) {