Data Action plugin.xml File Extensions Section - tns:extension
For each data action you want your extension to provide, you must register a
data action extension using a <tns:extension>
element similar to
this:
<tns:extension id="oracle.bi.tech.currencyconversiondataaction" point-id="oracle.bi.tech.plugin.dataaction" version="1.0.0">
<tns:configuration>
{
"host": { "module": "obitech-currencyconversion/currencyconversion" },
"resourceBundle": "obitech-currencyconversion/nls/messages",
"properties":
{
"className": "obitech-currencyconversion/currencyconversion.CurrencyConversionDataAction",
"displayName": { "key" : "CURRENCY_CONVERSION", "default" : "Currency Conversion" },
"order": 100
}
}
</tns:configuration>
</tns:extension>
Where:
- id is the unique ID you give to your data action.
- point-id is the type of extension you want to register. For
data action extensions, this must be set to
oracle.bi.tech.plugin.dataaction
. - version is the extension API version that your extension definition uses (leave this set to 1.0.0).
The <tns:configuration>
element contains a JSON
string that defines:
- host.module - This is the fully qualified name of the module
containing your data action. This fully qualified module name is formulated as
%PluginID%/%ModuleName%
, where:%PluginID%
must be replaced with the extension ID you specified in the id attribute of the<tns:obiplugin>
element.%ModuleName%
must be replaced with the resource ID you specified in the id attribute of the<tns:resource>
element for the JavaScript file containing your data action.
- resourceBundle - This is the Native Language Support path to
the resource file that contains this data action's localized resources. If your
resource files are named messages.js and stored correctly in the prescribed
nls
directory structure, then set this property to%PluginID%/nls/messages
(where%PluginID%
must be replaced with the extension ID you specified in the id attribute of the<tns:obiplugin>
element at the top of theplugin.xml
file). - properties.className - This is the fully qualified class name
given to the data action you're registering. This fully qualified class name is
formulated as
%PluginID%/%ModuleName%.%ClassName%
, where:%PluginID%
must be replaced with the extension ID you specified in the id attribute of the<tns:obiplugin>
element.%ModuleName%
must be replaced with the resource ID you specified in the id attribute of the<tns:resource>
element for the JavaScript file containing your data action.%ClassName%
must be replaced with the name you gave to the data action class in your JavaScript file.
- properties.displayName - This property contains an object
and two further properties:
- key is the Native Language Support message key that
can be used to lookup the data action's localized display name from
within the specified
resourceBundle
. - default is the default display name to use if for some reason the localized version of the display name can't be found.
- key is the Native Language Support message key that
can be used to lookup the data action's localized display name from
within the specified
- properties.order - This property enables you to provide a hint that's used to determine the position that this data action should appear when shown in a list of data actions. Data actions with lower numbers in their order property appear before data actions with higher numbers. When there's a tie, the data actions are displayed in the order they're loaded by the system.