Defining Configurables

Use

In the same way as objects are instances of Java classes, configurables are instances of config classes. Configurables are XML files that assign values to the parameters defined in the config class. When they are deployed together with a component, they determine the initial configuration of the component. 

You can define a configurable in different ways. You can:

  • Define the XML file for the configurable as described in the procedure below.
  • Deploy the new component with its config class in the portal and then enter values for the parameters using the configuration iView of Knowledge Management.
  •  

Procedure

  1. Define an XML file for the configurable as specified in the DTD for configurables .

    At the beginning of the XML file you name the ConfigClass for which you are defining parameters. In the example below, the configurable references the ConfigClass myRm: :

    <Configurable configclass="myRm">

  2. Save the XML file in your project in the SAP NetWeaver Developer Studio with the name <configurable_name>.co.xml under:

    src.config/install/data/cm/<component>

Example

The XML file defines values for the parameters of a sample repository manager called myRm . The properties specify the parameter names and their values.

<?xml version="1.0"  encoding="UTF-8" ?>

<Configurable configclass="myRm">

<property name="name" value="myRm" />

<property name="description" />

<property name="prefix" value="/myRm" />

<property name="active" value="true" />

<property name="sendevents" value="true" />

<property name="ignorerootdisplayname" value="false" />

<property name="services" />

<property name="class" value="com.sample.rm.myRm" />

<property name="namespacemgr.class" value="com.sample.rm.myRmName" />

<property name="contentmgr.class" value="com.sample.rm.myRmContent" />

<property name="propertymgr.class" value=" com.sample.rm.myRmProperty" />

<property name="propertysearchmgr.class" />

<property name="idmappermgr.class"/>

<property name="lockmgr.class"/>

<property name="securitymgr.class" />

<property name="securitymgr.ref" />

<property name="securitymgr.w2kcfg.systemid" />

<property name="securitymgr.aclcfg" />

<property name="securitymgr.aclcacheid" />

<property name="typemgr.class" />

<property name="versioningmgr.class" />

<property name="host" value="localhost" />

</Configurable>