As a developer, you can also create your own server properties, assign default values to them, and use those values in a class or a service method implementation.
First create the custom server property. Then associate it with a server.
To create a new server property:
1. | Choose View, Objects List from the menu, and open the "Property Names" window or tab. |
2. | Create a new record for the new custom property by filling out the fields as appropriate. |
To connect the new server property to a server:
1. | Choose Define, Servers from the menu. |
2. | The Servers window or tab opens. |
3. | Click the Properties tab. |
4. | Choose your newly added server property from the dropdown box in the 'Property name' column. In the 'Property value' column, specify a value for the property. |
You can now use the property in a class or a service method implementation. Use the following java functions:
URestConfig.getConfigString(propertyName)
URestConfig.getConfigInt(propertyName)
Examples
String queueName = URestConfig.getConfigString(QUEUE_NAME);
int timeout = URestConfig.getConfigInt(WAIT_TIMEOUT);
|