This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

The RegistryContext Class

The RegistryContext is a very important class which contains a set of attributes of the Registry which initialize during start up of the registry. All the configuration-related information is stored in this object, which will be used in all over the places in the Registry Core as well as in Management Bundles.

RegistryContext Attribute Description

Attribute Name

A description about the Attribute

resourceMediaTypes

The list of media types defined and available to all resources stored on the registry can be found here.

collectionMediaTypes

The list of media types defined and available to all collections stored on the registry can be found here.

customUIMediaTypes

The list of media types for which custom content can be created are listed in here.

clone

Whether this RegistryContext instance is the base instance of whether it is a clone of the base instance.

realmService

This is an instance of the OSGi RealmService class which users can use to access user permission related things like adding editing deleting users and roles and manage permissions of users in the userRealm.

defaultDataBaseConfiguration

This contains the database configurations which contains username password with data source information and other useful database-related information.

dbConfigs

This is a Map which contains DataBaseConfiguration objects with Configuration Name as the key. So multiple database configurations are loaded in to this Map, which users can examine the current database configurations in the Registry, or if they want to add more, they can always see whether those changes are applied by examining this map.

handlerManager

This is the object which keeps all the handlers in it with a set of Lists for each and every operation of the Registry interface with appropriate names. As an example, which extend put method in Registry interface will be at putHandlerMap, which contains the appropriate Handler object and Filter.

customEditManager

This contains the information about the Custom Editing. For certain resources, the Registry allow users have its own Custom UI to edit that resource instead of standard view. During the initialization, all the custom editing information will be loaded into this Object at RegistryConfigurationProcessor class.

queryProcessors

This is again a list which keeps QueryProcessorConfiguration objects in it. There can be a set of QueryProcessorConfiguration in the registry.xml, and all the configurations are loaded into a set of QueryProcessorConfiguration objects and simply added to this list.

queryProcessorManager

This is the QueryProcessorManager instance, which is responsible for managing the query processors that are used to execute various types of queries.

repository

The user can get a Repository instance from the RegistryContext object, which a user can use to call some of the methods like when a user wants to skip handlers and put certain resources in to Registry.

versionRepository

This is the instance of the repository that deals with versioned resources and collections.

aspects

RegistryContext provides a set of methods to deal with Aspects like adding aspects get and remove aspects. This is a map which contains all set of aspects available in the current registry instance.

dataSource

This is the data source object in for the current registry instance which is a javax.sql.DataSource object.

embeddedRegistryService

A user can always get an EmbeddedRegistryService through the RegistryContext object and can perform certain actions with the EmbeddedRegistryService. This is again one of the easy ways to have access to the registry by having a RegistryContext object.

remoteInstances

This is a List which contains objects of RemoteConfiguration. RemoteConfiguration object contains information about remote user information if available. This object contains fields like id and url with username and password.

mounts

This is a List which contains objects of Mount. Mount object contains information about a mount created using a remote configuration. This object contains fields like path, instanceId, targetPath, and about overwrite status.

versionOnChange

This is a variable directly from registry.xml and an appropriate element name is versionResourceOnChange and if it is not set in registry.xml, this boolean is set to false.

profilesPath

This is the path at which user profiles are stored.

servicePath

This is the path at which services are stored. Services can be added and managed via the Metadata menus and also as a part of the WS-Discovery proxy which has been integrated into the Governance Registry.

readOnly

This specifies whether the Registry instance backed by this RegistryContext is read-only.

registryRoot

This defines the root of the Registry instance backed by this RegistryContext.

jdbcDir

This defines JDBC Directory used by the associated Registry instance. This is used in indexing supported by Apache Lucene, which is useful for content search capabilities.

logWriter

This gives a reference to the LogWriter instance used to generate activity logs. Activity logs are stored on the registry for most operations, which can later be browsed via the corresponding log feeds and activity search results.