Skip to content

Commit

Permalink
fix(FEC-6841): change getters called 'name' to 'id' (#24)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv authored and OrenMe committed Aug 23, 2017
1 parent 695d849 commit e2f9b8b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/k-provider/ovp/loaders/data-loader-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default class DataLoaderManager {
add(loader: Function, params: Object): void {
let execution_loader = new loader(params);
if (execution_loader.isValid()) {
this._loaders.set(loader.name, execution_loader);
this._loaders.set(loader.id, execution_loader);
//Get the start index from the multiReqeust before adding current execution_loader requests
let startIndex = this._multiRequest.requests.length;
//Get the requests
Expand All @@ -65,7 +65,7 @@ export default class DataLoaderManager {
//Create range array of current execution_loader requests
let executionLoaderResponseMap = Array.from(new Array(requests.length), (val, index) => index + startIndex);
//Add to map
DataLoaderManager._loadersResponseMap.set(loader.name, executionLoaderResponseMap);
DataLoaderManager._loadersResponseMap.set(loader.id, executionLoaderResponseMap);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/k-provider/ovp/loaders/media-entry-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const config = Configuration.get();
* @classdesc
*/
export default class MediaEntryLoader implements ILoader {
static get name(): string {
static get id(): string {
return "media";
}

Expand Down
2 changes: 1 addition & 1 deletion src/k-provider/ovp/loaders/session-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const config = Configuration.get();
* @classdesc
*/
export default class SessionLoader implements ILoader {
static get name(): string {
static get id(): string {
return "session";
}

Expand Down
2 changes: 1 addition & 1 deletion src/k-provider/ovp/loaders/ui-config-loader.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import RequestBuilder from '../../request-builder'
const config = Configuration.get();

export default class UiConfigLoader implements ILoader {
static get name(): string {
static get id(): string {
return "uiConf";
}

Expand Down
12 changes: 6 additions & 6 deletions src/k-provider/ovp/ovp-provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,23 +128,23 @@ export class OvpProvider {
plugins: {}
};
if (data != null) {
if (data.has(SessionLoader.name)) {
let sessionLoader = data.get(SessionLoader.name);
if (data.has(SessionLoader.id)) {
let sessionLoader = data.get(SessionLoader.id);
if (sessionLoader != null && sessionLoader.response != null) {
this.ks = sessionLoader.response;
config.session.ks = this.ks;
}
}
if (data.has(UiConfigLoader.name)) {
let uiConfLoader = data.get(UiConfigLoader.name);
if (data.has(UiConfigLoader.id)) {
let uiConfLoader = data.get(UiConfigLoader.id);
let pluginsJson: Object = {};
if (uiConfLoader != null) {
pluginsJson = uiConfLoader.response;
}
config.plugins = pluginsJson;
}
if (data.has(MediaEntryLoader.name)) {
let mediaLoader = data.get(MediaEntryLoader.name);
if (data.has(MediaEntryLoader.id)) {
let mediaLoader = data.get(MediaEntryLoader.id);
if (mediaLoader != null && mediaLoader.response != null) {
let mediaEntry: MediaEntry = ProviderParser.getMediaEntry(this._isAnonymous ? "" : this.ks, this.partnerID, this._uiConfId, mediaLoader.response);
config.id = mediaEntry.id;
Expand Down

0 comments on commit e2f9b8b

Please sign in to comment.