Compare commits

...

1 Commits

Author SHA1 Message Date
Taylor McKinnon 2f7f3d5fb3 ft(ZENKO-1617): Update ObjectMDLocations for Azure Blob Api 2019-03-28 11:02:19 -07:00
1 changed files with 8 additions and 0 deletions

View File

@ -16,6 +16,8 @@ class ObjectMDLocation {
* data part
* @param {string} [locationObj.dataStoreVersionId] - versionId,
* needed for cloud backends
* @param {string} [locationObj.dataStoreBlockId] - BlockId,
* needed for Azure Blob compatability
*/
constructor(locationObj) {
this._data = {
@ -25,6 +27,7 @@ class ObjectMDLocation {
dataStoreName: locationObj.dataStoreName,
dataStoreETag: locationObj.dataStoreETag,
dataStoreVersionId: locationObj.dataStoreVersionId,
dataStoreBlockId: locationObj.dataStoreBlockId,
};
}
@ -40,6 +43,7 @@ class ObjectMDLocation {
this._data.key = location.key;
this._data.dataStoreName = location.dataStoreName;
this._data.dataStoreVersionId = location.dataStoreVersionId;
this._data.dataStoreBlockId = location.dataStoreBlockId;
return this;
}
@ -51,6 +55,10 @@ class ObjectMDLocation {
return this._data.dataStoreVersionId;
}
getDataStoreBlockId() {
return this._data.dataStoreBlockId;
}
getPartNumber() {
return Number.parseInt(this._data.dataStoreETag.split(':')[0], 10);
}