RegistryModule

The RegistryModule handles registries and the RootRegistry. It depends on the DataPathModule and the ConversionModule.

Registry

A Registry is a type of DataHolder with key-value mappings. Provides methods to ensure data integrity, serialization and de-serialization support and user interaction with registered data.

RootRegistry

The RegistryModule registers a RootRegistry as DataPathRoot within the DataPathModule. The RootRegistry holds references to other registries within the application. Registering a Registry to the RootRegistry allows users to easily reference values within the registry using dot notation (.registry-name.registry-value). Additionally the RootRegistry creates a RegistryValueConverter and registers it to the ConversionModule. This will, whenever the ConversionModule is asked to convert a value to a type for which a Registry exists within the RootRegistry, attempt to convert the object to a key and retrieve the object from the corresponding Registry.

Implementing Registry

Registry can be implemented by subclassing Registry or AbstractRegistry. If the registered values implement Registrable, RegistrableRegistry should be used instead. If the registered value is a PropertyHolder, the PropertyHolderRegistry should be used instead. If you need a Registry for a value type that is stored outside the application you can write a wrapper class that implements the Registry interface and calls the outside data source.