Creation of an XML for the Configuration
When you implement a new filter, the filter requires configuration
data. To provide configuration data you need to:
- Define the configuration parameters in a configuration class XML
file (*.cc.xml)
- Deploy the XML file together with the new filter and filter
manager class
Defining the Configuration Data
To define the configuration parameters, you must create an XML with a
special structure. The XML must define a ConfigClass
element that has the same name as the class of the filter. The
attributes of the element
must specify the configuration parameters, the name of the filter class
and the name of the filter manager class. In addition, the ConfigClass
element must extend the RepositoryFilter ConfigClass
class. This is a predefined XML class in the KM system that specifies
the configuration data that is most commonly required for filters. The
XML you create inherits all the attributes already defined in the RepositoryFilter ConfigClass
class.
When you have created the XML, save it with the name <config_class_name>.cc.xml
The example shows an XML that defines parameters for a DisplayNamePropertyFilter.
<?xml
version="1.0" encoding="UTF8" ?>
<file
generated by configuration framework May 20, 2003 6:29:10 PM>
<ConfigClass
name="DisplayNamePropertyFilter" hotReload="false"
extends="RepositoryFilter" hotUnload="false" hotLoad="false" >
<attribute name="propertyname" mandatory="false" type="string" />
<attribute name="class" type="class"
constant="com.sapportals.wcm.service.xmlforms.DisplayNamePropertyFilterManager"
/>
</ConfigClass>
The example shows the XML that defines the RepositoryFilter ConfigClass.
The attributes of the ConfigClass
are inherited by all configuration XMLs that extend this class.
<?xml
version="1.0" encoding="UTF8" ?>
<!-- file
generated by configuration framework May 20, 2003 6:29:10 PM -->
<ConfigClass
name="RepositoryFilter" hotReload="false" id="name"
configurable="com.sapportals.config.plugin.default_fs.Configurable"
type="abstract" hotUnload="false" hotLoad="false" >
<attribute
name="name" mandatory="true" type="string" />
<attribute
name="path" mandatory="false" type="string" />
<attribute
name="managers" mandatory="false" type="list"
refType="/cm/repository_managers/RepositoryManager" separator=", "
listType="ref" />
<attribute
name="resourcetype" mandatory="false" type="string" />
<attribute
name="extensions" mandatory="false" type="string" />
<attribute
name="priority" min="1" mandatory="false" type="int" max="99"
unit="_range" />
<attribute
name="active" mandatory="true" type="boolean" />
<attribute
name="mimetypes" mandatory="false" type="string" />
<attribute
name="class" mandatory="true" type="class" />
</ConfigClass>
Deploying the XML file
Once you have created the XML, you deploy it on the portal server
together with the filter and filter manager classes. After the
deployment, the parameters defined in the XML and the RepositoryFilter
XML will be available as entry fields on the user interface of the KM
configuration framework.
For
information on how to create the jar files for the deployment and the
deployment procedure, see the Portal
Development Kit.