mirror of
https://github.com/nasa/openmct.git
synced 2025-02-21 01:42:31 +00:00
Add missing APIs to legacy persistence adapter (#3433)
* Sends new style object to the object API for save when calling it from legacy persistence adapter * Adds createObject and deleteObject methods to LegacyPersistenceAdapter
This commit is contained in:
parent
a192d46c2b
commit
631876cab3
@ -35,6 +35,24 @@ export default class LegacyPersistenceAdapter {
|
||||
return Promise.resolve(Object.keys(this.openmct.objects.providers));
|
||||
}
|
||||
|
||||
createObject(space, key, legacyDomainObject) {
|
||||
let object = utils.toNewFormat(legacyDomainObject, {
|
||||
namespace: space,
|
||||
key: key
|
||||
});
|
||||
|
||||
return this.openmct.objects.save(object);
|
||||
}
|
||||
|
||||
deleteObject(space, key) {
|
||||
const identifier = {
|
||||
namespace: space,
|
||||
key: key
|
||||
};
|
||||
|
||||
return this.openmct.objects.delete(identifier);
|
||||
}
|
||||
|
||||
updateObject(space, key, legacyDomainObject) {
|
||||
let object = utils.toNewFormat(legacyDomainObject, {
|
||||
namespace: space,
|
||||
|
Loading…
x
Reference in New Issue
Block a user