With a user configuration, you can extend a plug-in by
storing your own configuration information in WSRR rather than coding
it in the plug-in.
The following example discusses a user-written SMS notification
plug-in. The SMS server address to which notifications are sent is
stored in a user configuration. The notification plug-in obtains the
address from the user configuration at runtime. The example is summarized
in the following diagram:
The numbered event sequence in the diagram is as follows:
- The notification plug-in receives a "document created" notification
event from WSRR.
- The notification plug-in retrieves the user configuration by using
a retrieveConfiguration( “USER_CONFIGURATION”, “mySMSplugin”
); method call on the WSRR MBean.
- The user configuration is returned in a byte array. The address
is held in a property called "Sms_server_ip".
- The plug-in sends a notification to the SMS server at the address
obtained from the user configuration.
Your user configuration information is contained in a text file
that you create and then load into WSRR. You can load a new user configuration
in either of the following ways:
You can replace an existing user configuration in either of the
following ways:
You can modify the user configuration directly by using the Web
UI. Perform the following actions:
- Switch to the Configuration perspective if necessary,
by selecting Configuration in the Perspective list.
- Click .
- Click the name of the user configuration you want to modify and
select the Content tab.
- Make the required modifications to the user configuration file
content.
- Click OK to save your changes.
You can access a user configuration programmatically
by using the WSRR MBean. See the Related link for further information.