project35.soa.validation
Class FieldValidationServiceFactory
java.lang.Object
project35.soa.validation.FieldValidationServiceFactory
public class FieldValidationServiceFactory
- extends java.lang.Object
Provides a singleton pattern for producing registered
validation classes. When Project35 reads a schema, it associates field
definitions with validation classes. It chooses the validation class
based on the XML Schema variable type: xs:string, xs:integer, xs:float, etc.
After a schema is parsed, Project35 has a collection of record factories.
Each factory has a collection of fields which may each be associated with
one or more validation objects. When the factory is cloned, new validation
objects are created. It is unnecessary to have multiple objects created
for validation classes which have no parameters. for example, a hundred
Integer validator objects will all do exactly the same thing. However,
a hundred BoundedInteger validator objects might have different behaviours
because each object may have different upper and lower bounds. So this
class is used to cut down on the proliferation of validation objects.
Copyright (c) 2008 Kevin Garwood for Project35. The original code was
developed by Kevin Garwood for the University of Manchester. Revisions
have been made for Project35, a project that is independent of that
institution. This code is licensed under the Academic Free License
version 3.0. The code attribution for the original code is included here:
Copyright (c) Kevin Garwood and University of Manchester 2007.
All rights reserved. Licensed under the Academic Free License
version 3.0. For more information on the terms and conditions,
please see the file "LICENSE" that is included in this distribution.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FieldValidationServiceFactory
public FieldValidationServiceFactory(Project35ApplicationContext project35ApplicationContext)
getFactory
public static FieldValidationServiceFactory getFactory()
setProject35ApplicationContext
public static void setProject35ApplicationContext(Project35ApplicationContext _project35ApplicationContext)
createFieldValidationService
public FieldValidationService createFieldValidationService(java.lang.Class fieldValidationServiceClass,
Parameter[] parameters,
boolean isPersistent)
throws java.lang.Exception
- Throws:
java.lang.Exception
createFieldValidationService
public FieldValidationService createFieldValidationService(java.lang.Class fieldValidationServiceClass,
boolean isPersistent)
throws java.lang.Exception
- Throws:
java.lang.Exception