4.1.1 Editing the plugin information property file
A plugin information property file is a property file that defines the information required for creating template plugins. When you execute the template plugin creation command, files and folders are created based on the information defined in the plugin information property file.
Create a plugin information property file by editing the following sample file:
Navigation-Platform-for-Developers-installation-directory\pluginSDK\plugin.properties.sam
The file name after editing must be any-character-string.properties.
- Organization of this subsection
(1) Notes on creating a property file
The following describes the notes on creating a plugin information property file by editing the sample file:
-
Characters in a property file are encoded in ISO 8859-1 (Latin1). Characters other than those of ISO 8859-1 cannot be used.
-
You cannot use Windows reserved device names (CON, AUX, COMn (n: 1-9), LPTn (n: 1-9), PRN, NUL, and CLOCK$).
-
A line that begins with a hash mark (#) or exclamation mark (!) is assumed to be a comment.
-
Empty characters (single-byte spaces, tabs, or line feeds) at the beginning of a line are ignored.
(2) Property file description format
The following shows an example of property file description format. In the description below, empty character indicates a single-byte space, tab, or line feed.
property-key=value
-
Enter a colon (:) or equal sign (=) between the property key and the value. Empty characters entered between the property key, colon (or equal sign), and value are ignored.
-
If the property key is followed by : or = (excluding empty characters), the string from the character (excluding empty characters) just after : or = to the end of the line is assumed to be the value.
-
If the property key is followed by a character (excluding empty characters) other than: or =, the string from that character to the end of the line is assumed to be the value.
-
Empty characters added to the end of the value are assumed to be part of the value.
-
Colons (:), equal signs (=), hash marks (#), and exclamation marks (!) contained in the value are assumed to be part of the value.
(3) Details about the property keys used with all plugins
The following describes details about the property keys (specified in the plugin information property file) that are required for all plugins.
- userplugin.id
-
Specify a plugin ID. Make sure that the plugin ID is unique within the system. For a Suspend/Resume Plugin, you must always specify the fixed value ucnp.plugin.suspend.
- Characters that can be used
-
Single-byte alphanumeric characters
Single-byte periods (.)
Single-byte underscores (_)
- Important
-
The following describes the restrictions on the combination of characters that can be used:
-
Only one Suspend/Resume Plugin can be specified within the system. Therefore, you must always specify the fixed value ucnp.plugin.suspend.
-
For I/O Plugins and Custom Window Plugins, you cannot specify a value ending with a period or beginning with ucnp. In addition, because plugin IDs are not case sensitive, you cannot specify UCNP or uCnp.
-
- String length that can be specified
-
1 to 64 bytes
- Specification example
-
userplugin
- userplugin.name
-
Specify a plugin name. Make sure that the plugin name is unique within the system.
- Characters that can be used
-
Single-byte alphanumeric characters
- Prohibited plugin names
-
Plugin names beginning with ucnp (not case sensitive)
env
AppName
- String length that can be specified
-
1 to 31 bytes
- Specification example
-
userplugin
- userplugin.type
-
Specify the plugin type.
- Characters that can be used
-
For I/O Plugins: TYPE_IO
For Suspend/Resume Plugin: TYPE_SUSPEND
For Custom Window Plugins: TYPE_WINDOW
- userplugin.version
-
Specify the plugin version.
- Characters that can be used
-
Single-byte alphanumeric characters
Single-byte periods (.)
Single-byte underscores (_)
Single-byte hyphens (-)
- String length that can be specified
-
1 to 32 bytes
- Specification example
-
00.01
- userplugin.java.package
-
Specify a Java package name.
- Characters that can be used
-
Single-byte alphanumeric characters
Single-byte periods (.)
Character strings that are valid as Java package names
Character string not used for creating a directory that has the same name as a Windows reserved device name
- Prohibited package names
-
Package names beginning with jp.co.hitachi.soft.ucnp
- String length that can be specified
-
1 or more bytes
However, make sure that the sum of the values specified for Java-package-name, plugin-ID, and I/O-action-controller-class-name, or Java-package-name, plugin-ID, and suspend/resume-action-controller-class-name is no more than 128 bytes.
- Specification example
-
sample.userplugin
(4) Details about the property keys used with I/O Plugins
The following describes the property keys that must be set if you specify TYPE_IO for the userplugin.type property key.
- userplugin.server.controller.ioaction
-
Specify the I/O action controller class name. In 4.1.2 Executing the template plugin creation command, a controller class is created based on this class name.
- Characters that can be used
-
Single-byte alphanumeric characters
Single-byte underscores (_)
Character strings that are valid as Java class names
Character strings that do not contain Windows reserved device names
Character strings that contain a unique value combined with a Java package name
- String length that can be specified
-
1 or more bytes
However, make sure that the sum of the values specified for Java-package-name, plugin-ID, and I/O-action-controller-class-name is no more than 128 bytes.
- Specification example
-
IoPluginController
- userplugin.server.controller.ioaction.type
-
Specify the character string that identifies the I/O action controller class. Specify a unique value within the system. In 4.1.2 Executing the template plugin creation command, the I/O plugin XML file (ioaction.xml) is created based on this character string. Note that the I/O plugin XML file defines the information displayed in the Plugins palette and Plugin Parts in the Operational Content Editing Window. Generally, specify the same value as the ID of the template plugin to be created. However, you can specify a different value.
- Characters that can be used
-
Single-byte alphanumeric characters
Single-byte periods (.)
Single-byte underscores (_)
Single-byte hyphens (-)
- String length that can be specified
-
1 to 64 bytes
- Specification example
-
userplugin
(5) Details about the property key used with Suspend/Resume Plugins
The following describes the property key that must be set if you specify TYPE_SUSPEND for the userplugin.type property key.
- userplugin.server.controller.suspend
-
Specify the suspend/resume action controller class name.
- Characters that can be used
-
Single-byte alphanumeric characters
Single-byte underscores (_)
Character strings that are valid as Java class names
Character strings that do not contain Windows reserved device names
Character string containing a unique value combined with a Java package name
- String length that can be specified
-
1 or more bytes
However, make sure that the sum of the values specified for Java-package-name, plugin-ID, and suspend/resume-action-controller-class-name is no more than 128 bytes.
- Specification example
-
SuspendActionController
(6) Property file coding example
The following shows examples of coding plugin information property files.
For an I/O Plugin
userplugin.id = example.inputdata userplugin.name = InputData userplugin.type = TYPE_IO userplugin.version = 01.00 userplugin.java.package = com.example.inputdata userplugin.server.controller.ioaction = InputDataController userplugin.server.controller.ioaction.type = example.inputdata
For a Suspend/Resume Plugin
userplugin.id = ucnp.plugin.suspend userplugin.name = Suspend userplugin.type = TYPE_SUSPEND userplugin.version = 01.00 userplugin.java.package = com.example.suspend userplugin.server.controller.suspend = SuspendActionController
For a Custom Window Plugin
userplugin.id = example.contentslist userplugin.name = ContentsList userplugin.type = TYPE_WINDOW userplugin.version = 01.00 userplugin.java.package = com.example.customwindow