The WSO2 Governance Registry can be extended in several ways. Handlers are pluggable components, that contain custom processing logic for handling resources. All handlers extend an abstract class named
Handler, which provides default implementations for resource handling methods as well as a few utilities useful for concrete handler implementations. Each handler is associated with a filter. Filters provide criteria for engaging handlers. Registry always evaluates the associated filter before invoking a handler. If the filter evaluates to true, it will invoke its associated handler.
Handlers can be engaged to the WSO2 Governance Registry either programmatically, or by defining them in the
registry.xml. Most built-in handlers are engaged by default, whereas optional and user-defined handlers should be configured by defining them in the
registry.xml file. The
registry.xml file includes several optional handlers that can be enabled or disabled according to your requirement.
Service Metadata Handlers
The WSO2 Governance Registry is optimized to support Design-time and Run-time governance for Web Services. There exists handlers that can process WSDL files, schemas and policies. These handlers are even capable of managing related resources such as imported WSDLs and schemas. The service metadata handlers accept several configuration options which allows you to define the associated media type and storage location. For an instance given below is the configuration for
Apart from the
WSDLMediaTypeHandler which processes uploaded WSDLs, there are other handlers as well which are configured in the
registry.xml to support governance of web services. Given below are the other handlers.
ZipWSDLMediaTypeHandler- WSDLs and associated schemas can also be uploaded as .zip files or as .gar files. This handler is used to process such WSDL s and schemas.
ServiceMediaTypeHandler- Handler to process the services being added to the registry.
DeleteServiceHandler- This handler provides the ability to remove the entire heirarchy for a given service while deleting the service.
PolicyMediaTypeHandler- This handler processes the policy files being added to the registry.
XSDMediaTypeHandler- This handler processes the schema types being added to the registry.
EndpointMediaTypeHandler- This handler processes service end-points defined in the WSDL files being uploaded to the registry.
All these handlers other than
EndpointMediaTypeHandler contains a property called
disableSymlinkCreation which holds
true by default. This would avoid creating Symbolic Links for resources by default.
External Link Handler
The WSO2 Governance Registry allows you to store external links as a part of the repository tree structure. Clicking on such a resource would take you to the external link. This makes it easy for an organization to manage physically separated resources as a part of a single hierarchical tree structure. Given below is the configuration for
You can similarly include your own handlers on the
registry.xml. The handler sample included with the WSO2 Governance Registry distribution explains to how you could create your own handler and include it in the
URI Media Type Handler
The WSO2 Governance Registry allows you to add resources to the registry as URL references. In such case the resource would exist on a different file system and the registry would only hold a URL reference to that resource. To process and find dependencies like Services, WSDLs, Endpoints, Schemas and Policy files of URL referenced resources we use the
UriMediaTypeHandler.Given below is the configuration for
Extensions Symbolic Link Handler
The main purpose of this handler is to properly remove a symbolic link added to a resource. Given below is the configuration for
This handler implements Resource Retention Locking. It checks retention lock conditions before performing the operation. If resource is locked by another user and operation cannot be performed, RegistryException will be thrown with an appropriate message. Given below is the configuration for
See also Handlers.