Show TOC Start of Content Area

Procedure documentation Defining Config Classes Locate the document in its SAP Library structure

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.

Caution

The <class_name>is the ConfigClass name you specify at the beginning of the XML file as shown in the example below. If the name includes uppercase letters, you must precede the letters with underscores in the file name.  For a ConfigClass with the name  myRm, the file name must be my_rm.cc.xml. Underscores in the name of the ConfigClass are escaped with two underscores.

       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 nameand 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>

 

End of Content Area