WSO2 Governance Registry - Developer Guide [ Documentation Index ]

WSO2 Governance Registry - Developer User Guide

Overview

Registry Context is a very important class which contains 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
userRealm

This is an instance of UserRealm 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 datasource information and other useful database related information.

dbConfigs

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

handlerConfigurations

This is a very important one if users are dealing with extending registry behaviour using handlers. This object contains all the successfully registered handlers in the current registry instance. This is a List which contains set of HandlerConfiguration objects. HandlerConfiguration objects are simply an object which is having handler and it's filter in that object.

handlerManager

This is the object which keeps all the handlers in it with 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 Registry allow users have it's own Custom UI to edit that resource instead of standard view. During the initialization all the custom Editing information will be load in to this Object at RegistryConfigurationProcessor class.

mediaTypeHandlers

Since Registry is providing different type of handlers based on the way we filter those handlers. Some handlers are filtering according to their mediaType. List of MediaType Handlers are stored in this List.

urlHandlers

Likewise MediaType Handlers all the URL based filtering handlers are in this urlHandlers List.

queryProcessors

This is again a list which keeps QueryProcessorConfiguration objects in it. There can be set of QueryProcessorConfiguration in the registry.xml and all the configurations are loading in to set of QueryProcessorConfiguration objects and simply add them to this list.

repository

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

aspects

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

dataSource

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

embeddedRegistry

User can always get an EmbeddedRegistry through RegistryContext object and perform certain actions with the EmbeddedRegistry. This is again one of the easy way to have an access to 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, url with username and password.

versionOnchange

This is a variable directly get from registry.xml and appropriate elemenent name is versionResourceOnChange and if it's not set in registry.xml this boolean is set to false.