Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Org.eclipse.higgins.configuration.xml

Revision as of 13:27, 23 May 2007 by Gbyrd.ncsu.edu (Talk | contribs) (New page: This project implements a configuration handler that processes an XML file. Each setting is represented by name, type, and value. A list of SettingHandlers is provided, which maps type n...)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This project implements a configuration handler that processes an XML file. Each setting is represented by name, type, and value. A list of SettingHandlers is provided, which maps type names to the classes that know how to process that value type.

A list of types and the setting handler classes that support them:

  • boolean -- BooleanHandler
  • context factory -- ContextFactoryHandler
  • file -- FileHandler
  • IdAS -- IdentityAttributeServiceHandler
  • instance of IConfigurableComponent -- InstanceHandler
  • keystore -- KeyStoreHandler
  • list -- ListHandler
  • map -- MapHandler
  • private key -- PrivateKeyHandler
  • singleton instance of IConfigurableComponent -- SingletonHandler
  • string -- StringHandler
  • uri -- URIHandler
  • X.509 certificate -- CertificateHandler

The structure of the configuration file is as follows:

<Configuration ...>
  <SettingHandlers> ... </SettingHandlers>
  <Setting Name="..." Type="htf:map"> ... </Setting>
</Configuration>

The outer element can be anything you like.

There must be a "SettingHandlers" element, which is a list of SettingHandler elements. Each SettingHandler element has three attributes: type, class, and handler. The class name indicates what kind of object that will be created when an setting with the given type string is processed. The handler class tells the class that is responsible for reading the setting element value and creating the corresponding object.

<SettingHandlers>
  <SettingHandler Type="htf:map" Class="java.util.Map" Handler="org.eclipse.higgins.configuration.xml.MapHandler">
  <SettingHandler Type="xsd:string" Class="java.lang.String" Handler="org.eclipse.higgins.configuration.xml.StringHandler">
  ...
</SettingHandlers>

Each setting must specify its name and type attributes. The value of the element depends on the type. For example, a map or list will have multiple setting elements as its value. A string, on the other hand, will simply contain a string as its value.


Links

Back to the top