1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- 'use strict';
- /*
- *+------------------------------------------------------------------------+
- *| Licensed Materials - Property of IBM
- *| IBM Cognos Products: Dashboard
- *| (C) Copyright IBM Corp. 2018
- *|
- *| US Government Users Restricted Rights - Use, duplication or disclosure
- *| restricted by GSA ADP Schedule Contract with IBM Corp.
- *+------------------------------------------------------------------------+
- */
- define(['../../../lib/@waca/core-client/js/core-client/ui/core/Class'], function (Class) {
- 'use strict';
- var BaseTask = Class.extend({
- init: function init(options) {
- BaseTask.inherited('init', this, arguments);
- this.id = options.id;
- this.owner = options.owner;
- this.ownerWidget = options.ownerWidget;
- this.logger = options.logger;
- this.visAPI = options.visAPI;
- this.dashboardApi = options.dashboardApi;
- this.content = options.content;
- this._initializeStep = this.owner._initializeStep.bind(this.owner);
- this._isStepComplete = this.owner._isStepComplete.bind(this.owner);
- this._completeStep = this.owner._completeStep.bind(this.owner);
- this._logRenderContext = this.owner._logRenderContext.bind(this.owner);
- if (this.id) {
- this._initializeStep(this.id);
- }
- },
- getId: function getId() {
- return this.id;
- },
- getRenderState: function getRenderState() {
- return this.owner._renderState;
- },
- clearError: function clearError() {
- var state = this.content.getFeature('state.internal');
- if (state) {
- state.clearError();
- }
- },
- /**
- * does nothing: the error is shown in VisRenderSequence
- */
- showError: function showError() {},
- /**
- * Process the task
- * @param renderContext - the render context
- * @returns a promise
- */
- process: function process() /*renderContext*/{
- return Promise.reject(new Error('BaseTask.process needs to be overridden!'));
- }
- });
- return BaseTask;
- });
- //# sourceMappingURL=BaseTask.js.map
|