Ruddi™ UDDI Client API
1.0

inspireit.uddi.util.validators
Class ValidatorFactory

java.lang.Object
  |
  +--inspireit.uddi.util.validators.ValidatorFactory

public class ValidatorFactory
extends java.lang.Object

ValidatorFactory creates validators to validate a BusinessEntity, an Address, etc. Only official UDDI structures that require validation have their createXXX method. UDDI recommandations are considered as validation rules.

Use the parameter less createXXX methods to get a validator suitable to the individual elements of a UDDI structure and the other types of createXXX methods to get a validator suitable to the overall validation of a UDDI structure (what includes validation of individual structure elements). The throwOnFirst flag allows instructing the validator to throw an exception as soon as a validation rule is not met or after the last validation rule has been checked. In the later case, the exception lists all validation rules that haven't pass the tests.

Author:
Bertrand Fontaine, INSPIRE IT $Revision: 1.2 $

Field Summary
protected  ValidatorFactory factory
          The actual ValidatorFactory instance to use to create the validators.
 
Constructor Summary
protected ValidatorFactory()
           
  ValidatorFactory(int uddiVersion)
          ValidatorFactory constructor.
 
Method Summary
 AddressValidator createAddressValidator()
          Creates an Address validator.
 AddressValidator createAddressValidator(Address address, boolean throwOnFirst)
          Creates an Address validator suitable to the validation of a given Address.
 BindingTemplatesValidator createBindingTemplatesValidator()
          Creates a BindingTemplates validator.
 BindingTemplatesValidator createBindingTemplatesValidator(BindingTemplates bindingTemplates, boolean throwOnFirst)
          Creates a BindingTemplates validator suitable to the validation of a given BindingTemplate.
 BindingTemplateValidator createBindingTemplateValidator()
          Creates a BindingTemplate validator.
 BindingTemplateValidator createBindingTemplateValidator(BindingTemplate bindingTemplate, boolean throwOnFirst)
          Creates a BindingTemplate validator suitable to the validation of a given BindingTemplate.
 BusinessEntityValidator createBusinessEntityValidator()
          Creates a BusinessEntity validator.
 BusinessEntityValidator createBusinessEntityValidator(BusinessEntity businessEntity, boolean throwOnFirst)
          Creates a BusinessEntity validator suitable to the validation of a given BusinessEntity.
 BusinessServicesValidator createBusinessServicesValidator()
          Creates a BusinessServices validator.
 BusinessServicesValidator createBusinessServicesValidator(BusinessServices businessServices, boolean throwOnFirst)
          Creates a BusinessServices validator suitable to the validation of a given BusinessServices.
 BusinessServiceValidator createBusinessServiceValidator()
          Creates a BusinessService validator.
 BusinessServiceValidator createBusinessServiceValidator(BusinessService businessService, boolean throwOnFirst)
          Creates a BusinessService validator suitable to the validation of a given BusinessService.
 ContactsValidator createContactsValidator()
          Creates a Contacts validator.
 ContactsValidator createContactsValidator(Contacts contacts, boolean throwOnFirst)
          Creates a Contacts validator suitable to the validation of a given Contacts.
 ContactValidator createContactValidator()
          Creates a Contact validator.
 ContactValidator createContactValidator(Contact contact, boolean throwOnFirst)
          Creates a Contact validator suitable to the validation of a given Contact.
 DiscoveryURLsValidator createDiscoveryURLsValidator()
          Creates a DiscoveryURLs validator.
 DiscoveryURLsValidator createDiscoveryURLsValidator(DiscoveryURLs discoveryURLs, boolean throwOnFirst)
          Creates a DiscoveryURLs validator suitable to the validation of a given DiscoveryURLs.
 DiscoveryURLValidator createDiscoveryURLValidator()
          Creates a DiscoveryURL validator.
 DiscoveryURLValidator createDiscoveryURLValidator(DiscoveryURL discoveryURL, boolean throwOnFirst)
          Creates a DiscoveryURL validator suitable to the validation of a given DiscoveryURL.
 EMailValidator createEMailValidator()
          Creates an EMail validator.
 EMailValidator createEMailValidator(EMail email, boolean throwOnFirst)
          Creates an EMail validator suitable to the validation of a given EMail.
 InstanceDetailsValidator createInstanceDetailsValidator()
          Creates an InstanceDetails validator.
 InstanceDetailsValidator createInstanceDetailsValidator(InstanceDetails instanceDetails, boolean throwOnFirst)
          Creates an InstanceDetails validator suitable to the validation of a given InstanceDetails.
 PhoneValidator createPhoneValidator()
          Creates a Phone validator.
 PhoneValidator createPhoneValidator(Phone phone, boolean throwOnFirst)
          Creates a Phone validator suitable to the validation of a given Phone.
 PublisherAssertionValidator createPublisherAssertionValidator()
          Creates a PublisherAssertion validator.
 TModelInstanceInfoValidator createTModelInstanceInfoValidator()
          Creates a TModelInstanceInfo validator.
 TModelInstanceInfoValidator createTModelInstanceInfoValidator(TModelInstanceInfo tModelInstanceInfo, boolean throwOnFirst)
          Creates a TModelInstanceInfo validator suitable to the validation of a given TModelInstanceInfo.
 TModelValidator createTModelValidator()
          Creates a TModel validator.
 TModelValidator createTModelValidator(TModel tModel, boolean throwOnFirst)
          Creates a TModel validator suitable to the validation of a given TModel.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

factory

protected ValidatorFactory factory
The actual ValidatorFactory instance to use to create the validators.

Constructor Detail

ValidatorFactory

public ValidatorFactory(int uddiVersion)
ValidatorFactory constructor.

Parameters:
uddiVersion - The version of UDDI in use.

ValidatorFactory

protected ValidatorFactory()
Method Detail

createPublisherAssertionValidator

public PublisherAssertionValidator createPublisherAssertionValidator()
Creates a PublisherAssertion validator.

Returns:
a PublisherAssertionValidator

createAddressValidator

public AddressValidator createAddressValidator()
Creates an Address validator.

Returns:
an AddressValidator

createAddressValidator

public AddressValidator createAddressValidator(Address address,
                                               boolean throwOnFirst)
Creates an Address validator suitable to the validation of a given Address.

Parameters:
address - The Address to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
an AddressValidator

createBindingTemplatesValidator

public BindingTemplatesValidator createBindingTemplatesValidator()
Creates a BindingTemplates validator.

Returns:
a BindingTemplates

createBindingTemplatesValidator

public BindingTemplatesValidator createBindingTemplatesValidator(BindingTemplates bindingTemplates,
                                                                 boolean throwOnFirst)
Creates a BindingTemplates validator suitable to the validation of a given BindingTemplate.

Parameters:
bindingTemplates - The BindingTemplates to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a BindingTemplatesValidator

createBindingTemplateValidator

public BindingTemplateValidator createBindingTemplateValidator()
Creates a BindingTemplate validator.

Returns:
a BindingTemplateValidator

createBindingTemplateValidator

public BindingTemplateValidator createBindingTemplateValidator(BindingTemplate bindingTemplate,
                                                               boolean throwOnFirst)
Creates a BindingTemplate validator suitable to the validation of a given BindingTemplate.

Parameters:
bindingTemplate - The BindingTemplate to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a BindingTemplateValidator

createBusinessEntityValidator

public BusinessEntityValidator createBusinessEntityValidator()
Creates a BusinessEntity validator.

Returns:
a BusinessEntityValidator

createBusinessEntityValidator

public BusinessEntityValidator createBusinessEntityValidator(BusinessEntity businessEntity,
                                                             boolean throwOnFirst)
Creates a BusinessEntity validator suitable to the validation of a given BusinessEntity.

Parameters:
businessEntity - The BusinessEntity to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a BusinessEntityValidator

createBusinessServicesValidator

public BusinessServicesValidator createBusinessServicesValidator()
Creates a BusinessServices validator.

Returns:
a BusinessServices

createBusinessServicesValidator

public BusinessServicesValidator createBusinessServicesValidator(BusinessServices businessServices,
                                                                 boolean throwOnFirst)
Creates a BusinessServices validator suitable to the validation of a given BusinessServices.

Parameters:
businessServices - The BusinessServices to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
an BusinessServices

createBusinessServiceValidator

public BusinessServiceValidator createBusinessServiceValidator()
Creates a BusinessService validator.

Returns:
a BusinessServiceValidator

createBusinessServiceValidator

public BusinessServiceValidator createBusinessServiceValidator(BusinessService businessService,
                                                               boolean throwOnFirst)
Creates a BusinessService validator suitable to the validation of a given BusinessService.

Parameters:
businessService - The BusinessService to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a BusinessServiceValidator

createContactsValidator

public ContactsValidator createContactsValidator()
Creates a Contacts validator.

Returns:
a ContactsValidator

createContactsValidator

public ContactsValidator createContactsValidator(Contacts contacts,
                                                 boolean throwOnFirst)
Creates a Contacts validator suitable to the validation of a given Contacts.

Parameters:
contacts - The Contacts to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a ContactsValidator

createContactValidator

public ContactValidator createContactValidator()
Creates a Contact validator.

Returns:
a ContactValidator

createContactValidator

public ContactValidator createContactValidator(Contact contact,
                                               boolean throwOnFirst)
Creates a Contact validator suitable to the validation of a given Contact.

Parameters:
contact - The Contact to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a ContactValidator

createDiscoveryURLValidator

public DiscoveryURLValidator createDiscoveryURLValidator()
Creates a DiscoveryURL validator.

Returns:
a DiscoveryURLValidator

createDiscoveryURLValidator

public DiscoveryURLValidator createDiscoveryURLValidator(DiscoveryURL discoveryURL,
                                                         boolean throwOnFirst)
Creates a DiscoveryURL validator suitable to the validation of a given DiscoveryURL.

Parameters:
discoveryURL - The DiscoveryURL to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a DiscoveryURLsValidator

createDiscoveryURLsValidator

public DiscoveryURLsValidator createDiscoveryURLsValidator()
Creates a DiscoveryURLs validator.

Returns:
a DiscoveryURLs

createDiscoveryURLsValidator

public DiscoveryURLsValidator createDiscoveryURLsValidator(DiscoveryURLs discoveryURLs,
                                                           boolean throwOnFirst)
Creates a DiscoveryURLs validator suitable to the validation of a given DiscoveryURLs.

Parameters:
discoveryURLs - The DiscoveryURLs to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a DiscoveryURLsValidator

createEMailValidator

public EMailValidator createEMailValidator()
Creates an EMail validator.

Returns:
an EMailValidator

createEMailValidator

public EMailValidator createEMailValidator(EMail email,
                                           boolean throwOnFirst)
Creates an EMail validator suitable to the validation of a given EMail.

Parameters:
email - The EMail to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
an EMailValidator

createInstanceDetailsValidator

public InstanceDetailsValidator createInstanceDetailsValidator()
Creates an InstanceDetails validator.

Returns:
an InstanceDetailsValidator

createInstanceDetailsValidator

public InstanceDetailsValidator createInstanceDetailsValidator(InstanceDetails instanceDetails,
                                                               boolean throwOnFirst)
Creates an InstanceDetails validator suitable to the validation of a given InstanceDetails.

Parameters:
instanceDetails - The InstanceDetails to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
an InstanceDetailsValidator

createPhoneValidator

public PhoneValidator createPhoneValidator()
Creates a Phone validator.

Returns:
a PhoneValidator

createPhoneValidator

public PhoneValidator createPhoneValidator(Phone phone,
                                           boolean throwOnFirst)
Creates a Phone validator suitable to the validation of a given Phone.

Parameters:
phone - The Phone to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a PhoneValidator

createTModelInstanceInfoValidator

public TModelInstanceInfoValidator createTModelInstanceInfoValidator()
Creates a TModelInstanceInfo validator.

Returns:
a TModelInstanceInfoValidator

createTModelInstanceInfoValidator

public TModelInstanceInfoValidator createTModelInstanceInfoValidator(TModelInstanceInfo tModelInstanceInfo,
                                                                     boolean throwOnFirst)
Creates a TModelInstanceInfo validator suitable to the validation of a given TModelInstanceInfo.

Parameters:
tModelInstanceInfo - The TModelInstanceInfo to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a TModelInstanceInfoValidator

createTModelValidator

public TModelValidator createTModelValidator()
Creates a TModel validator.

Returns:
a TModelValidator

createTModelValidator

public TModelValidator createTModelValidator(TModel tModel,
                                             boolean throwOnFirst)
Creates a TModel validator suitable to the validation of a given TModel.

Parameters:
tModel - The TModel to validate.
throwOnFirst - Whether the exception, if any, should be thrown on the first broken validation rule or after the last one has been checked.
Returns:
a TModelValidator

Ruddi™ UDDI Client API
1.0

Download now! | Submit a bug or feature
(c) 2003 INSPIRE IT
Bld Brand Whitlock 109
1200 Brussels, Belgium
All Rights Reserved.