1 /*global $k*/ 2 3 /** 4 * @class Configuration of a topic editor 5 * @extends $k.AbstractEditorConfiguration 6 **/ 7 $k.ViewConfiguration = function() { }; 8 9 /** 10 * Render the element as a literal object 11 * 12 * @function 13 * @param {$k.SemanticElement} semanticElement 14 * @param {object} [keyFilter] A filter that defines which property names that are included. 15 * <pre class="code">{"exclude": ["key1", ...]}</pre> includes all but the listed properties, while <pre class="code">{"include": ["key1", ...]}</pre> or <pre class="code">["key1", ...]</pre> includes only the listed properties. 16 * <br/>Non-optional properties are always included 17 * @returns {object} The rendered object 18 * @see $k.ViewConfiguration#synchronize 19 **/ 20 $k.ViewConfiguration.prototype.render = function(semanticElement, keyFilter) { }; 21 22 /** 23 * Render the element as a JavaScript object 24 * 25 * @function 26 * @deprecated Use <code>render(semanticElement, {"exclude": excludedKeys})</code> instead 27 * @param {$k.SemanticElement} semanticElement 28 * @param {string[]} [excludeKeys] Collection of property names that are excluded 29 * @returns {object} The rendered JSON object 30 **/ 31 $k.ViewConfiguration.prototype.renderJSON = function(semanticElement, excludeKeys) { }; 32 33 /** 34 * Returns the configuration for the semantic element 35 * 36 * @function 37 * @param {$k.SemanticElement} semanticElement 38 * @param {$k.SemanticElement} [context] Context of the configuration 39 * @returns {object} The rendered JSON object 40 **/ 41 $k.ViewConfiguration.forElement = function(semanticElement, context) { }; 42 43 /** 44 * Returns the confguration defined by the element 45 * 46 * @function 47 * @param {$k.SemanticElement} configurationElement The configuration element 48 * @returns {$k.ViewConfiguration} 49 **/ 50 $k.ViewConfiguration.from = function(configurationElement) { }; 51 52 /** 53 * Update the semantic element from the JSON string / literal object 54 * 55 * @function 56 * @param {object} object JSON string or literal object 57 * @returns {$k.ViewConfiguration} 58 * @throws {$k.exception.SchemaError} Got an synchronisation error 59 * @see $k.ViewConfiguration#render 60 **/ 61 $k.ViewConfiguration.synchronize = function(object) { }; 62 63 /** 64 * Update the semantic element from the JSON string / literal object 65 * 66 * @function 67 * @deprecated Use <code>synchronize(jsonObject)</code> 68 * @param {object} jsonObject JSON string or literal object 69 * @returns {$k.ViewConfiguration} 70 * @throws {$k.exception.SchemaError} Got an synchronisation error 71 **/ 72 $k.ViewConfiguration.synchronizeJSON = function(jsonObject) { }; 73 74