1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- 'use strict';
- function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
- /**
- * Licensed Materials - Property of IBM
- * IBM Business Analytics (C) Copyright IBM Corp. 2019
- * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
- */
- /**
- * @class VisRenderSequenceInfo
- * @hideconstructor
- * @classdesc Store the latest render sequence info and render task info
- */
- define(['underscore', './RenderTaskExecInfo'], function (_, RenderTaskExecInfo) {
- var RenderSequenceInfo = function () {
- function RenderSequenceInfo(options) {
- _classCallCheck(this, RenderSequenceInfo);
- this._id = options.id;
- this._allTaskInfo = {};
- }
- RenderSequenceInfo.prototype.getId = function getId() {
- return this._id;
- };
- RenderSequenceInfo.prototype.addTaskInfo = function addTaskInfo(taskInfo) {
- var taskExecInfo = new RenderTaskExecInfo({ id: taskInfo.taskId });
- this._allTaskInfo[taskInfo.taskId] = taskExecInfo;
- return taskExecInfo;
- };
- RenderSequenceInfo.prototype.getTaskInfo = function getTaskInfo(taskId) {
- return this._allTaskInfo[taskId];
- };
- RenderSequenceInfo.prototype.toJSON = function toJSON() {
- return {
- 'id': this._id,
- 'tasks': _.values(this._allTaskInfo).map(function (value) {
- return value.toJSON();
- })
- };
- };
- return RenderSequenceInfo;
- }();
- return RenderSequenceInfo;
- });
- //# sourceMappingURL=RenderSequenceInfo.js.map
|