Modifying the validation plug-in properties file
You enable your own validators by modifying the default validation plug-in properties file.
The default validation plug-in properties file installed with the registry is as follows:
# begin_generated_IBM_copyright_prolog
#
# Licensed Materials - Property of IBM
# 5724-N72 5655-R41
# (c) Copyright IBM Corp. 2006, 2007 All Rights Reserved
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with
# IBM Corp.
#
# end_generated_IBM_copyright_prolog
#
# Validator classes called by the default service registry validation functions
#
# These validators are called for all document types
validators=com.ibm.sr.api.SRTemplateValidator,com.ibm.sr.api.SRBusinessModelValidator,
com.ibm.sr.uddi.validator.UDDIImgValidator
# These validators are called for governed objects only
governanceValidators=com.ibm.sr.governance.api.SRGovernanceValidator
- the SRTemplateValidator that supports templating operations
- the SRBusinessModelValidator that supports the extended business modelling functions
- the UDDIImgValidator that supports UDDI synchronization
- the SRGovernanceValidator that supports governance lifecycle operations
Additional validators can be added by editing the properties file and updating the content stored in the registry. For example, to add a new "SampleValidator" the properties file might be updated to contain:
validators=com.ibm.sr.api.SRTemplateValidator,com.ibm.sr.api.SRBusinessModelValidator,
com.ibm.sr.uddi.validator.UDDIImgValidator,com.sample.SampleValidator
governanceValidators=com.ibm.sr.governance.api.SRGovernanceValidator
The properties files are in the format of standard Java™ properties files. Lines beginning with a # character are comments and are ignored, other lines are of the form <key> = <values>.
The <values> are a comma-separated list of class names of the required validator classes. Any classes listed must be available on the class path of the application server and must implement the appropriate ServiceRegistryValidator interface.
The following <keys> can be used:
| Key | Description |
|---|---|
| validators | These validators are invoked for all object types |
| governanceValidators | These validators are invoked only if the object is part of a governed lifecycle. These validator must implement the ServiceRegistryGovernanceValidator interface. |
| validators.<objectType> | These validators are invoked only if the object is of the specified <objectType>. Currently supported <objectTypes> include: WSDLDocument, XSDDocument, PolicyDocument, XMLDocument, GenericObject. |
| validators.classification.<classification> | These validators are invoked only if the object is classified by the <classification> URI. Because of limitations in Java properties files this key cannot contain any ‘:' (colon) characters. These can be omitted from any classification URI specified. |
- If you are configuring a governance validator, and the governance validator class has provided implementation code for any of the create(), update() or delete() methods (see the Related link "Developing plug-ins using the System Programming Interfaces" for more details concerning plug-in development), then these methods will not be invoked unless you configure it to be both a governance validator and a standard validator. To do this, add the plug-in class name to both the governanceValidators key and the validators key in the plug-in properties file.
- The same validator class can be listed against more than one key, but it will only ever be invoked once for any given object operation.