Defining Config Classes

Procedure

  1. Create an XML file to define all the configuration parameters and their metadata that are required for the new component.

    Structure the XML file as shown in the DTD for config classes .  For more information about the attributes in the DTD, see Attributes of the XML Element Attribute and Attributes of the XML Element ConfigClass .

    Attributes cannot be combined arbitrarily. For more information about permitted combinations of attributes, see Valid Combinations of  Attributes .

  2. Save the XML file with the name <class_name>.cc.xml .
  3. Store the file in your project in the SAP NetWeaver Developer Studio under: \meta\expanded\cm\<component_name>\bundles\classes

Example

The XML sample shows a config class file that defines parameters for a new repository manager. Each new parameter is defined as an attribute. For each attribute, the specification of a name and type is mandatory.

 

<ConfigClass name="myRm" extends="NewRepositoryManager" hotReload="false" hotLoad="false" hotUnload="false"> <attribute name="name" type="string"/> <attribute name="prefix" type="string" default="/myRm"/> <attribute name="class" type="class" constant="com.sap.sample.repmgr.myRepMgr"/> <attribute name="class" type="class" value="com.sample.rm.myRm" /> <attribute name="namespacemgr.class" type="class" value="com.sample.rm.myRmName" /> <attribute name="contentmgr.class" type="class" value="com.sample.rm.myRmContent" /> <attribute name="propertymgr.class" type="class" value="com.sample.rm.myRmProperty" /> <attribute name="host" type="string"/> </ConfigClass>