UNPKG

@openui5/sap.m

Version:

OpenUI5 UI Library sap.m

147 lines (115 loc) 4.18 kB
/* * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2022 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ // Provides TablePersoProvider sap.ui.define(['sap/ui/base/ManagedObject', "sap/base/Log"], function(ManagedObject, Log) { "use strict"; /** * This is an abstract TablePersoProvider, describing the interface for a real * TablePersoProvider. * * @public * * @class Table Personalization Provider * @extends sap.ui.base.ManagedObject * @abstract * @author SAP * @version 1.60.39 * @alias sap.m.TablePersoProvider */ var TablePersoProvider = ManagedObject.extend("sap.m.TablePersoProvider", /** @lends sap.m.TablePersoProvider */ { constructor: function(sId, mSettings) { ManagedObject.apply(this, arguments); }, metadata: { "abstract": true, library: "sap.m" } }); /** * Initializes the TablePersoProvider instance after creation. * * @protected */ TablePersoProvider.prototype.init = function() { Log.warning("This is the abstract base class for a TablePersoProvider. Do not create instances of this class, but use a concrete sub class instead."); Log.debug("TablePersoProvider init"); }; /** * Retrieves the personalization bundle. * This must return a jQuery promise (see http://api.jquery.com/promise/) * @public */ TablePersoProvider.prototype.getPersData = function() { Log.debug("TablePersoProvider getPersData"); }; /** * Stores the personalization bundle, overwriting any * previous bundle completely * This must return a jQuery promise (see http://api.jquery.com/promise/) * @param {object} oBundle * @public */ TablePersoProvider.prototype.setPersData = function(oBundle) { Log.debug("TablePersoProvider setPersData"); }; /** * Removes the personalization bundle * This must return a jQuery promise (see http://api.jquery.com/promise/) * @public */ TablePersoProvider.prototype.delPersData = function() { Log.debug("TablePersoProvider delPersData"); }; /** * Callback function which can be used to determine the title of a given column * within the TablePersoDialog. As a default, the column header controls are * asked for their 'text' or 'title' property. This works in most cases, for example * if the header control is an sap.m.Label (has 'text' property) or an sap.m.ObjectListItem * (has 'title' property). * * If the header control used in a column has neither 'text' nor 'title' property, or if you would like to * display a modified column name for a certain column, this callback function can be used. * * If the callback delivers null for a column (which is the default implementation), the default * texts described above are displayed for that column in the TablePersoDialog. * * In case neither the callback delivers null and neither 'text' nor ' title' property are at hand, * the TablePersoDialog will display the column id and a warning message is logged. * * @param {sap.m.Column} oColumn column whose caption shall be determined * @public */ TablePersoProvider.prototype.getCaption = function(oColumn) { return null; }; /** * Callback function which can be used to determine the group of a given column * within the TablePersoDialog. As a default, the columns are not assigned to a group. * * This information is used to group the columns within the TablePersoDialog if the TablePersoController's * 'group' flag is set, otherwise, the groups are ignored. * * @param {sap.m.Column} oColumn column whose group shall be determined * @public */ TablePersoProvider.prototype.getGroup = function(oColumn) { return null; }; /** * Resets user’s personalization for a given table so that ‘getPersData’ will * deliver its initial state. If no table is specified, all personalizations * of the currently logged on user are reset. * * This must return a jQuery promise (see http://api.jquery.com/promise/) * @public */ TablePersoProvider.prototype.resetPersData = function() { Log.debug("TablePersoProvider resetPersData"); }; return TablePersoProvider; });