'use strict'; /** * Licensed Materials - Property of IBM * IBM Cognos Products: Dashboard * (C) Copyright IBM Corp. 2018, 2019 * US Government Users Restricted Rights - Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM Corp. */ define(['../../lib/@waca/dashboard-common/dist/core/Model'], function (Model) { /** * Model which represents a drill through definition entry */ var DrillThroughDefinitionEntry = Model.extend({ whitelistAttrs: ['id', 'name', 'type', 'assetId', 'assetSearchPath', 'scope', 'modelRefs', 'mappings', 'ownerId', 'perspective'], init: function init(attrs) { DrillThroughDefinitionEntry.inherited('init', this, arguments); this.targetName = attrs.targetName; this.api = { getId: this._getId.bind(this), getName: this._getName.bind(this), getTargetName: this._getTargetName.bind(this), setTargetName: this._setTargetName.bind(this), getType: this._getType.bind(this), getAssetId: this._getAssetId.bind(this), setAssetId: this._setAssetId.bind(this), getAssetSearchPath: this._getAssetSearchPath.bind(this), setAssetSearchPath: this._setAssetSearchPath.bind(this), getPerspective: this._getPerspective.bind(this), setPerspective: this._setPerspective.bind(this), getScope: this._getScope.bind(this), getModelRefs: this._getModelRefs.bind(this), getMappings: this._getMappings.bind(this), update: this._update.bind(this), removeModelRef: this._removeModelRef.bind(this), getOwnerId: this._getOwnerId.bind(this) }; }, /** * @returns the public api to the drill through model that is accessible to clients. */ getAPI: function getAPI() { return this.api; }, _getId: function _getId() { return this.id; }, _getName: function _getName() { return this.name; }, _getType: function _getType() { return this.type; }, _getAssetId: function _getAssetId() { return this.assetId; }, _setAssetId: function _setAssetId(assetId) { this.assetId = assetId; }, _getPerspective: function _getPerspective() { return this.perspective || 'authoring'; }, _setPerspective: function _setPerspective(perspective) { this.perspective = perspective; }, _getAssetSearchPath: function _getAssetSearchPath() { return this.assetSearchPath; }, _setAssetSearchPath: function _setAssetSearchPath(assetSearchPath) { this.assetSearchPath = assetSearchPath; }, _getTargetName: function _getTargetName() { return this.targetName; }, _setTargetName: function _setTargetName(targetName) { this.targetName = targetName; }, _getScope: function _getScope() { return this.scope; }, _getModelRefs: function _getModelRefs() { return this.modelRefs; }, _getMappings: function _getMappings() { return this.mappings; }, _update: function _update(context, options) { this.set(context, options); }, _removeModelRef: function _removeModelRef() /* modelRef */{}, _getOwnerId: function _getOwnerId() { return this.ownerId; } }); return DrillThroughDefinitionEntry; }); //# sourceMappingURL=DrillThroughDefinitionEntry.js.map