4.3.1 Customizing I/O Plugins
This subsection describes the procedure for customizing I/O Plugins.
To customize a template plugin created as an I/O Plugin:
-
Create the icon of the Plugins palette and Plugin Parts.
-
Edit the I/O plugin XML file.
-
Set tool tips for parameter descriptions.
-
Specify the plugin execution order.
-
Specify whether to display a confirmation dialog box.
-
Specify whether to execute plugins in the preview window.
-
Specify the button type for suppressing execution.
-
Implement processing to be performed by the plugin.
The following describes details about each step.
- Organization of this subsection
(1) Creating the icon of the [Plugins] palette and Plugin Parts
If necessary, change the icon of the Plugins palette and Plugin Parts displayed in the Operational Content Editing Window. The following figure shows the location of the icon of the Plugins palette and Plugin Part.
|
When you execute the template plugin creation command, the icons provided by Navigation Platform by default are displayed in the Plugins palette and Plugin Parts.
To develop multiple plugins, you can create a different icon for each plugin to identify plugins by displayed icons. Store the created icons in the following directory:
Navigation-Platform-for-Developers-installation-directory\pluginSDK\plugin\plugin-ID\images
Create icons in the format shown in the following table.
No. |
Item |
Description |
---|---|---|
1 |
File name |
See (2) Editing I/O plugin XML files, and then specify the file name. Note that the file name of the default icon provided by Navigation Platform is sample_icon.gif. |
2 |
File format |
You can use any format that can be displayed in the Web browser. Note that the file format of the default icon provided by Navigation Platform is GIF format. |
3 |
Size |
Create an icon in 24 x 24 pixels. |
- Note:
-
If a user without Windows administrator roles creates an icon in a directory such as the OS-installation-drive:\Program Files directory (by adding or copying a file), the file might be redirected to a user folder. Therefore, the user that adds the file must have Windows administrator roles.
(2) Editing I/O plugin XML files
The I/O plugin XML file (ioaction.xml) is created when a template plugin is created. Edit the I/O plugin XML file to change the following information:
-
I/O Plugin execution order
-
I/O parameter definition
-
Information displayed in the Plugins palette, for Plugin Parts, and for tool tips in the Operational Content Editing Window
The following figure shows the correspondence between the information specified in the I/O plugin XML file and the information displayed in the Operational Content Editing Window.
|
- Tip
-
If you change the I/O plugin XML file (ioaction.xml) for a plugin associated with Operational Content, you also need to perform tasks such as replacing the plugin by exporting Operational Content. When you design I/O Plugins, make sure that item settings are suitable for operation of Operational Content, so that you do not have to modify the I/O plugin XML file later.
The following describes how to edit the I/O plugin XML file (ioaction.xml). This file is stored in the following directory.
Navigation-Platform-for-Developers-installation-directory\pluginSDK\plugin\plugin-ID\WEB-INF\conf
To edit the I/O plugin XML file, start the editor by selecting Run as administrator.
The following shows an example of editing the I/O plugin XML file (ioaction.xml). Edit the bold text.
<?xml version="1.0" encoding="UTF-8"?> <ioaction xmlns="http://model.xml.ioaction.navi.plugin.ucnp.soft.hitachi.co.jp" id="sample.OutputGuideData" name="OutputGuideData" version="2.0"> <iopart id="io_part_1"> <iotype name="sample.OutputGuideData" /> <iconURL url="/ucnpPlugins/OutputGuideData/images/ogdIcon.gif"/> <priority value="700" /> <execConfirm value="false" /> <execPreview value="true" /> <disableButtonType legacy="false" value="show_next_page" /> <parameters type="title"> <param name="OutputGuideData" description="description-of-OutputGuideData"/> </parameters> <parameters type="input"> <param name="inputItemName1" description="description-of-inputItemName1"/> <param name="inputItemName2" description="description-of-inputItemName2"/> <param name="inputItemName3" description="description-of-inputItemName3"/> </parameters> <parameters type="output"> <param name="outputItemName1" description="description-of-outputItemName1"/> <param name="outputItemName2" description="description-of-outputItemName2"/> <param name="outputItemName3" description="description-of-outputItemName3"/> </parameters> </iopart> </ioaction>
The table below describes how to edit the I/O plugin XML file (ioaction.xml). You need to edit only the parts shown in the table.
No. |
Information to be edited |
Description |
Character strings specifiable for the attribute value, and their meanings |
String length specifiable for the attribute value |
---|---|---|---|---|
1 |
url attribute of the <iconURL> tag (file name part) |
Specify the file name of the icon displayed in the Plugins palette and for Plugin Parts in the Operational Content Editing Window. Change the file name in the url attribute only when you want to change the file name of the icon created in (1) Creating the icon of the [Plugins] palette and Plugin Parts from the default. |
|
Maximum of 1,024 bytes (including /ucnpPlugins/plugin-name/images/) |
2 |
value attribute of the <priority> tag |
Specify the execution order of the I/O Plugin. The default value is 700. 700 is the intermediate value of the execution order of System Plugins and User Plugins. If the priority element is omitted, the default value is assumed. |
The following single-byte numeric values:
|
-- |
3 |
value attribute of the <execConfirm> tag |
If necessary, specify whether to display a confirmation dialog box during execution of the I/O Plugin. Specify true if you want to notify users that processing might require some time. If the execConfirm element is omitted, false is assumed. |
|
-- |
4 |
value attribute of the <execPreview> tag |
If necessary, specify whether to execute the I/O Plugin in the preview window.#1 If the execPreview element is omitted, true is assumed. |
|
-- |
5 |
legacy attribute of the <disableButtonType> tag |
Specify whether to provide compatibility of execution suppression of the I/O Plugin. Specify true to suppress execution of the I/O Plugin in Navigation Platform 10-10 the same way as in earlier versions. If the disableButtonType element is omitted, true is assumed. |
|
-- |
6 |
value attribute of the <disableButtonType> tag |
If necessary, specify whether to suppress execution of the I/O Plugin depending on the button type.#2 Set the legacy attribute to false to suppress the execution depending on whether transition occurs, by clicking the button or by directly selecting a node. To specify multiple values, use a single-byte comma to separate each value. If the disableButtonType element is omitted, an empty character string is assumed. |
|
-- |
7 |
description attribute of the <param> tag |
If necessary, specify the description (tool tip) of the I/O Plugin. |
Any character string#3 |
0 to 64 characters |
8 |
name attribute of the <param> tag under <parameters type="input"> |
Specify the input parameter name. Specify a unique value in the <parameters type="input"> tag. You can specify 0 to 100 <param> tags. Specify the <param> tags for the number of input parameters. |
|
1 to 64 bytes#4 |
9 |
description attribute of the <param> tag under <parameters type="input"> |
If necessary, specify the description (tool tip) of the input parameter. |
Any character string#3 |
0 to 64 characters |
10 |
name attribute of the <param> tag under <parameters type="output"> |
Specify the output parameter name. Specify a unique value in the <parameters type="output"> tag. You can specify 0 to 100 <param> tags. Specify the <param> tags for the number of output parameters. |
|
1 to 64 bytes#4 |
11 |
description attribute of the <param> tag under <parameters type="output"> |
If necessary, specify the description (tool tip) of the output parameter. |
Any character string#3 |
0 to 64 characters |
- Legend:
-
--: Not applicable
- #1
-
Processing that determines whether to execute the I/O Plugin in the preview window can also be implemented by using the value of the ucnp.screen.ispreview key in the inputFromNode and outputToNode methods of the server processing implementation interface (IIoPluginController). However, the setting of the ucnp.screen.ispreview key is used to perform special processing by the server processing implementation interface (IIoPluginController). Therefore, if you want to simply skip the processing, specify the setting in the I/O plugin XML file (ioaction.xml). For details about the server processing implementation interface (IIoPluginController), see 5.2 IIoPluginController (server processing implementation interface).
- #2
-
Processing that determines whether to suppress I/O Plugin execution depending on the button type can also be implemented by using the value of the ucnp.button.type key in the inputFromNode and outputToNode methods of the server processing implementation interface (IIoPluginController). However, the setting of the ucnp.button.type key is used to perform special processing by the server processing implementation interface (IIoPluginController). Therefore, if you want to simply skip processing, specify the setting in the I/O plugin XML file (ioaction.xml). For details about the server processing implementation interface (IIoPluginController), see 5.2 IIoPluginController (server processing implementation interface.
- #3
-
The character string specified for description is used as is for the HTML attribute when the tool tip is displayed. Therefore, if you want to enter a line feed in the character string displayed as the tool tip, specify 
. If a control character other than 
 is specified, the display is unpredictable.
- #4
-
If a long character string is specified, ending characters might not be displayed for a Plugin Part. For the I/O action controller class, the character string specified here is used as is.
- Reference
-
Values specified for the name attribute of the <param> tag under <parameters type="input"> and <parameters type="output"> are used for the param parameter and return values of the inputFromNode and outputToNode methods of the server processing implementation interface (IIoPluginController).
The following shows where the values specified for the name attribute are used.
- param parameter
-
-
Map object name for the value corresponding to the name ucnp.current.params.map in the inputFromNode method
-
Map object name for the value corresponding to the name ucnp.next.params.map in the outputToNode method
-
- Return values
-
-
Map object name for the value corresponding to the name ucnp.current.params.map in the inputFromNode method
-
Map object name for the value corresponding to the name ucnp.next.params.map in the outputToNode method
-
The following figure shows the correspondence between the values specified for the name attribute and the server processing implementation interface (IIoPluginController).
Figure 4‒3: Correspondence between the values specified for the name attribute and the server processing implementation interface (IIoPluginController) For details about the server processing implementation interface (IIoPluginController), see 5.2 IIoPluginController (server processing implementation interface).
(3) Setting tool tips for parameter descriptions
If you set a description text as a tool tip in the I/O plugin XML file (ioaction.xml), the description appears when you point the Plugin Part in the Operational Content Editing Window. You can set the following tool tips:
-
I/O Plugin description
A tool tip displayed in the title of the Plugin Part
-
Input parameter description
A tool tip displayed for input parameters of the Plugin Part
-
Output parameter description
A tool tip displayed for output parameters of the Plugin Part
For details about how to set the tool tips and details about the values, see (2) Editing I/O plugin XML files.
(4) Specifying the plugin execution order
In the I/O plugin XML file (ioaction.xml), you can change the plugin execution order. You can specify the following values for the execution order:
-
100-500
-
600-900
If multiple I/O Plugins are placed in the same node, they are executed in the ascending order specified for the execution order. If the same execution order is specified for multiple I/O Plugins, the execution order will be undefined.
For details about the values, see (2) Editing I/O plugin XML files.
(5) Specifying whether to display a confirmation dialog box
In the I/O plugin XML file (ioaction.xml), you can specify whether to display a confirmation dialog box during execution of the I/O Plugin. You can specify the following values:
-
true
-
false
If true is specified for a plugin placed in the node, a confirmation dialog box for the I/O Plugin appears when the inputFromNode method is executed. Even if true is specified for multiple plugins in the node, a confirmation dialog box appears only once. If Cancel is selected in the confirmation dialog box, the KDCZ00266-Q message is displayed, and then processing of all plugins set in the node is not executed.
For details about the values, see (2) Editing I/O plugin XML files.
(6) Specifying whether to execute plugins in the preview window
In the I/O plugin XML file (ioaction.xml), you can specify whether to execute the I/O Plugin in the preview window. You can specify the following values:
-
true
-
false
If multiple plugins are placed in the node, only the I/O Plugins for which true is specified are executed.
For details about the values, see (2) Editing I/O plugin XML files.
(7) Specifying the button type for suppressing execution
In the I/O plugin XML file (ioaction.xml), you can specify the button type for suppressing execution of I/O Plugins. You can specify the values shown below.
No. |
Compatibility option (value of the "legacy" attribute) |
Setting of the button type for suppressing execution (value of the "value" attribute) |
Operation to suppress execution of the I/O Plugin |
---|---|---|---|
1 |
false |
start |
Switch from the Terminal Node (start) to a Process Node. Alternatively, display the first Process Node not connected to the Terminal Node (start). |
2 |
show_next_page |
Switch to the next node by clicking the button. Note, however, that if you switch to a Process Node for which the transition destination node does not exist and for which the Back button is hidden, show_complete_page is set. |
|
3 |
show_previous_page |
Switch to the previous node by clicking the button. |
|
4 |
show_complete_page |
Switch to a node with the Done button displayed. Alternatively, switch to a Process Node that does not have the transition destination node and for which the Back button is not displayed. |
|
5 |
back_jump |
Switch to the next node by directly selecting the node. |
|
6 |
forward_jump |
Switch to the previous node by directly selecting the node. |
|
7 |
true |
start |
Switch from the Terminal Node (start) to a Process Node. Alternatively, display the first Process Node not connected to the Terminal Node (start). |
8 |
show_next_page |
Switch to a node by clicking the button or directly selecting the node. Note, however, that if you switch to a Process Node for which the transition destination node does not exist and for which the Back button is hidden, show_complete_page is set. |
|
9 |
show_previous_page |
Switch to the previous node by clicking the button or directly selecting the node. |
|
10 |
show_complete_page |
Switch to a node with the Done button displayed. Alternatively, switch to a Process Node for which the transition destination node does not exist and for which the Back button is hidden. |
If multiple I/O Plugins are placed in the node, the I/O Plugins for which execution is suppressed are not executed.
For details about the values, see (2) Editing I/O plugin XML files.
(8) Implementing processing to be performed by the plugin
To implement the server processing in the I/O Plugin, specify the processing in the class whose name is specified by the userplugin.server.controller.ioaction key in the plugin information property file. At this time, specify the processing to be performed during node transition.
If you need to perform processing during plugin initialization or termination, see 4.5 Implementing processing to be performed during plugin initialization or termination.