Constructor
new AutoContentProvider()
AutoContentProvider constructor
Classes
Members
numericContent :boolean
This AutoContentProvider manages numeric expressions, so text literals should be
converted to numbers for comparisions, taking in account the
number format of the current locale (dot or comma as decimal separator)
- boolean
(static) CLASSES :object
Contains the current list of classes derived from AutoContentProvider.
This object should be updated by real automation classes at declaration time.
Currently, only two types of "AutoContentProvider" are defined: Arith
and TagReplace.
- object
Methods
generateContent(nRows, nCols, content, useIds) → {boolean}
Builds an ActiveBagContentKit
and generates the automatized content.
Name | Type | Description |
---|---|---|
nRows | number | Number of rows to be processed |
nCols | number | Number of columns to be processed |
content | Array.<module:boxes/ActiveBagContent.ActiveBagContent> | Array with one or more containers of |
useIds | boolean | When |
true
if the process was OK.false
otherwise.
- Type:
- boolean
getAttributes() → {object}
Gets a object with the basic attributes needed to rebuild this instance excluding functions,
parent references, constants and also attributes retaining the default value.
The resulting object is commonly usued to serialize elements in JSON format.
- The resulting object, with minimal attrributes
- Type:
- object
init()
Initializes the content provider
process(_kit) → {boolean}
Generates the automatized content
Name | Type | Description |
---|---|---|
_kit | module:automation/AutoContentProvider. | The objects to be filled with content |
true
if the process was OK.false
otherwise.
- Type:
- boolean
setProperties($xml)
Loads the object settings from a specific jQuery XML element
Name | Type | Description |
---|---|---|
$xml | external:jQuery | The XML element to parse |
(static) factory(data, params) → {module:shapers/Shaper.Shaper}
Builds a new AutoContentProvider, based on the properties specified in a data object
Name | Type | Description |
---|---|---|
data | object | The data object to be parsed |
params | Array.<object> | Optional parameters to be passed to |
(static) getProvider($xml) → {module:automation/AutoContentProvider.AutoContentProvider}
Dynamic constructor that returns a specific type of AutoContentProvider based on the class
attribute declared on an $xml element.
It should be called only from Activity.setProperties
Name | Type | Description |
---|---|---|
$xml | external. | The XML element to parse |
(static) registerClass(providerName, providerClass) → {module:automation/AutoContentProvider.AutoContentProvider}
Registers a new type of AutoContentProvider
Name | Type | Description |
---|---|---|
providerName | string | The name used to identify this AutoContentProvider |
providerClass | function | The activity class, usually extending AutoContentProvider |
- The provider class