Anchor | ||||
---|---|---|---|---|
|
In This Topic
Table of Contents | ||
---|---|---|
|
XperienCentral provides a Configuration Management service. This service is used to store environment specific settings (hostname, for example). The settings of the Configuration Management service can be edited through the Setup Tool (/web/setup
). This topic explains how to add a property to the Configuration Management service and how to retrieve the contents of the properties in the Java code. When creating and reading configuration entries, be sure that you conform to the plugin development guidelines (G046 and G152 in particular). When you follow the steps explained in this topic, your plugin will conform to these guidelines.
In This Topic
Table of Contents | ||
---|---|---|
|
...
Adding Properties to the Configuration Management
...
Code Block | ||
---|---|---|
| ||
ServiceComponentDefinitionImpl serviceDef = new ServiceComponentDefinitionImpl( false ); serviceDef.setId("nl.gx.helloworld.configurationservice"); serviceDef.setName("HelloWorld configuration service."); serviceDef.setDescription( "Service which contains the configuration for this WCBplugin." ); serviceDef.setTypeId( ServiceComponentType.class.getName() ); serviceDef.setProperties( new Hashtable<String, String>() ); serviceDef.setImplementationClassName(HelloWorldConfigurationServiceImpl.class.getName() ); serviceDef.setInterfaceClassNames( new String[] {HelloWorldConfigurationService.class.getName()} ); serviceDef.setWrapperClassNames( new String[] {} ); ComponentDependencyImpl serviceDependency = new ComponentDependencyImpl(); serviceDependency.setServiceName(ConfigurationManagement.class.getName()); serviceDependency.setRequired(true); serviceDef.setDependencies(new ComponentDependency[] { serviceDependency }); |
...
Once the properties are present in the Configuration Management service, the value of the properties can be changed through the /web/setup tool. Log onto the Setup Tool (/web/setup
) and navigate to the General configuration tab. Your configuration set should be present between the default configuration sets (the sets are alphabetically ordered).