Home
Project
Code Support/Bugs
Download

This tutorial will grow in time. Impatients can investigate the code found in the ORANETTED_PLUGIN schema.

Basically you need a PL/SQL function taking this mandatory arguments: x_data_obj in out nocopy content_t, i_script clob := null. And  - if you want to - you can add after this two mandatory arguments as many optional arguments as you like [my_parameter_1, ..n optional varchar2 agruments]. Now you should be ready to use the plugin with this XML tags:

<your_package_name.your_function_name your_optional_parameter="hello">
  This Text will be passed to your function in the i_script parameter
</your_package_name.your_function_name that you can use your Plugin>

Note: there ist a table called PLUGIN in the oranetted schema. This table as no functionallity but information character. So someone should be able to detect if a plugin is installed or not. So the more clean way is to use a PL/SQL Package for your plugin additionally holding a install / uninstall procedure and a test function.

See the scoach package in oranetted_plugin schema for example:
  -- this is a productive sample plugin
  -- the plugin must provide the following procedures and functions
  --   install
  --   unistall
  --   test return 1 if plugin works properly, else 0
  --
  -- Installation:
  --   create this plugin package in the ORANETTED_PLUGIN schema
  --   exec plugin#.install_plugin('scoach');
  --
  -- Uninstall:
  --   exec plugin#.uninstall_plugin('scoach');

More detailed information will be found in the wiki.