[Legacy Persistence Adapter] readObject to handle possibility of two arguments ()

* check for two arguments to catch cases where key and namespace are sent in separately

* method will always receive two arguments, updated to reflect that

* removing object utils, no longer used
This commit is contained in:
Jamie V 2020-09-22 16:41:46 -07:00 committed by GitHub
parent 7879752f47
commit de614ff606
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -20,8 +20,6 @@
* at runtime from the About dialog for additional information.
*****************************************************************************/
import objectUtils from 'objectUtils';
export default class LegacyPersistenceAdapter {
constructor(openmct) {
this.openmct = openmct;
@ -39,8 +37,11 @@ export default class LegacyPersistenceAdapter {
return this.openmct.objects.save(legacyDomainObject.useCapability('adapter'));
}
readObject(keystring) {
let identifier = objectUtils.parseKeyString(keystring);
readObject(space, key) {
const identifier = {
namespace: space,
key: key
};
return this.openmct.legacyObject(this.openmct.objects.get(identifier));
}