Coverage Report - org.kuali.student.core.document.service.impl.DocumentServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentServiceImpl
0%
0/141
0%
0/28
1.789
 
 1  
 /**
 2  
  * Copyright 2010 The Kuali Foundation Licensed under the
 3  
  * Educational Community License, Version 2.0 (the "License"); you may
 4  
  * not use this file except in compliance with the License. You may
 5  
  * obtain a copy of the License at
 6  
  *
 7  
  * http://www.osedu.org/licenses/ECL-2.0
 8  
  *
 9  
  * Unless required by applicable law or agreed to in writing,
 10  
  * software distributed under the License is distributed on an "AS IS"
 11  
  * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
 12  
  * or implied. See the License for the specific language governing
 13  
  * permissions and limitations under the License.
 14  
  */
 15  
 
 16  
 package org.kuali.student.core.document.service.impl;
 17  
 
 18  
 import java.util.ArrayList;
 19  
 import java.util.Arrays;
 20  
 import java.util.List;
 21  
 
 22  
 import javax.jws.WebService;
 23  
 
 24  
 import org.kuali.student.common.dictionary.dto.ObjectStructureDefinition;
 25  
 import org.kuali.student.common.dictionary.service.DictionaryService;
 26  
 import org.kuali.student.common.dto.StatusInfo;
 27  
 import org.kuali.student.common.exceptions.DataValidationErrorException;
 28  
 import org.kuali.student.common.exceptions.DoesNotExistException;
 29  
 import org.kuali.student.common.exceptions.InvalidParameterException;
 30  
 import org.kuali.student.common.exceptions.MissingParameterException;
 31  
 import org.kuali.student.common.exceptions.OperationFailedException;
 32  
 import org.kuali.student.common.exceptions.PermissionDeniedException;
 33  
 import org.kuali.student.common.exceptions.VersionMismatchException;
 34  
 import org.kuali.student.common.search.service.SearchManager;
 35  
 import org.kuali.student.common.validation.dto.ValidationResultInfo;
 36  
 import org.kuali.student.common.validator.Validator;
 37  
 import org.kuali.student.common.validator.ValidatorFactory;
 38  
 import org.kuali.student.core.document.dao.DocumentDao;
 39  
 import org.kuali.student.core.document.dto.DocumentCategoryInfo;
 40  
 import org.kuali.student.core.document.dto.DocumentInfo;
 41  
 import org.kuali.student.core.document.dto.DocumentTypeInfo;
 42  
 import org.kuali.student.core.document.dto.RefDocRelationInfo;
 43  
 import org.kuali.student.core.document.dto.RefDocRelationTypeInfo;
 44  
 import org.kuali.student.core.document.entity.Document;
 45  
 import org.kuali.student.core.document.entity.DocumentCategory;
 46  
 import org.kuali.student.core.document.entity.DocumentType;
 47  
 import org.kuali.student.core.document.entity.RefDocRelation;
 48  
 import org.kuali.student.core.document.entity.RefDocRelationType;
 49  
 import org.kuali.student.core.document.entity.RefObjectSubType;
 50  
 import org.kuali.student.core.document.entity.RefObjectType;
 51  
 import org.kuali.student.core.document.service.DocumentService;
 52  
 import org.springframework.transaction.annotation.Transactional;
 53  
 
 54  
 /**
 55  
  * This is a description of what this class does - lindholm don't forget to fill this in.
 56  
  *
 57  
  * @author Kuali Rice Team (kuali-rice@googlegroups.com)
 58  
  *
 59  
  */
 60  
 @WebService(endpointInterface = "org.kuali.student.core.document.service.DocumentService", serviceName = "DocumentService", portName = "DocumentService", targetNamespace = "http://student.kuali.org/wsdl/documentService")
 61  0
 public class DocumentServiceImpl implements DocumentService {
 62  
     private DocumentDao dao;
 63  
     private DictionaryService dictionaryServiceDelegate;
 64  
     private ValidatorFactory validatorFactory;
 65  
     private SearchManager searchManager;
 66  
     
 67  
     public DocumentDao getDocumentDao(){
 68  0
         return dao;
 69  
     }
 70  
     
 71  
     public void setDocumentDao(DocumentDao dao){
 72  0
         this.dao=dao;
 73  0
     }
 74  
     
 75  
     
 76  
     @Override
 77  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 78  
         public StatusInfo addDocumentCategoryToDocument(String documentId, String documentCategoryKey) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
 79  0
         checkForMissingParameter(documentId, "documentId");
 80  0
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 81  0
         StatusInfo statusInfo = new StatusInfo();
 82  0
         statusInfo.setSuccess(dao.addDocumentCategoryToDocument(documentId, documentCategoryKey));
 83  
         
 84  0
         return statusInfo;
 85  
     }
 86  
 
 87  
     @Override
 88  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 89  
         public DocumentInfo createDocument(String documentTypeKey, String documentCategoryKey, DocumentInfo documentInfo)
 90  
             throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 91  
         DocumentType type;
 92  
         DocumentCategory category;
 93  
         
 94  0
         checkForMissingParameter(documentTypeKey, "documentTypeKey");
 95  0
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 96  0
         checkForMissingParameter(documentInfo, "documentInfo");
 97  
             
 98  
         // Validate
 99  
         List<ValidationResultInfo> validationResults;
 100  
         try {
 101  0
             validationResults = validateDocument("OBJECT", documentInfo);
 102  0
         } catch (DoesNotExistException e) {
 103  0
             throw new OperationFailedException("Validation call failed." + e.getMessage());
 104  0
         }
 105  0
         if (null != validationResults && validationResults.size() > 0) {
 106  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 107  
         }
 108  
             
 109  
             try {
 110  0
                 type = dao.fetch(DocumentType.class, documentTypeKey);
 111  0
                 category = dao.fetch(DocumentCategory.class, documentCategoryKey);
 112  0
             } catch (DoesNotExistException dnee) {
 113  0
                 throw new OperationFailedException("error fetching document keys", dnee);
 114  0
         }
 115  
             
 116  0
             Document doc = DocumentServiceAssembler.toDocument(new Document(), documentInfo, dao);
 117  0
             doc.setType(type);
 118  0
             doc.setCategoryList(Arrays.asList(category));
 119  0
             dao.create(doc);
 120  0
             return DocumentServiceAssembler.toDocumentInfo(doc);
 121  
     }
 122  
 
 123  
     @Override
 124  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 125  
         public StatusInfo deleteDocument(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 126  0
         checkForMissingParameter(documentId, "documentId");
 127  0
         dao.delete(Document.class, documentId);
 128  0
         return new StatusInfo();
 129  
     }
 130  
     @Override
 131  
     @Transactional(readOnly=true)
 132  
     public List<DocumentCategoryInfo> getCategoriesByDocument(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 133  0
         checkForMissingParameter(documentId, "documentId");
 134  0
         List<DocumentCategory> categories = dao.getCategoriesByDocument(documentId);
 135  0
         return DocumentServiceAssembler.toDocumentCategoryInfos(categories);
 136  
     }
 137  
     @Override
 138  
     @Transactional(readOnly=true)
 139  
     public DocumentInfo getDocument(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 140  0
         checkForMissingParameter(documentId, "documentId");
 141  0
         return DocumentServiceAssembler.toDocumentInfo(dao.fetch(Document.class, documentId));
 142  
     }
 143  
     @Override
 144  
     @Transactional(readOnly=true)
 145  
     public List<DocumentCategoryInfo> getDocumentCategories() throws OperationFailedException {
 146  0
         List<DocumentCategory> categories = dao.find(DocumentCategory.class);
 147  0
         return DocumentServiceAssembler.toDocumentCategoryInfos(categories);
 148  
     }
 149  
     
 150  
     @Override
 151  
     @Transactional(readOnly=true)
 152  
     public DocumentCategoryInfo getDocumentCategory(String documentCategoryKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 153  0
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 154  0
         return DocumentServiceAssembler.toDocumentCategoryInfo(dao.fetch(DocumentCategory.class, documentCategoryKey));
 155  
     }
 156  
     
 157  
     @Override
 158  
     @Transactional(readOnly=true)
 159  
     public DocumentTypeInfo getDocumentType(String documentTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 160  0
         checkForMissingParameter(documentTypeKey, "documentTypeKey");
 161  0
         return DocumentServiceAssembler.toGenericTypeInfo(DocumentTypeInfo.class,(dao.fetch(DocumentType.class, documentTypeKey)));
 162  
     }
 163  
     
 164  
     @Override
 165  
     @Transactional(readOnly=true)
 166  
     public List<DocumentTypeInfo> getDocumentTypes() throws OperationFailedException {
 167  0
         return DocumentServiceAssembler.toGenericTypeInfoList(DocumentTypeInfo.class,dao.find(DocumentType.class));
 168  
     }
 169  
     
 170  
     @Override
 171  
     @Transactional(readOnly=true)
 172  
     public List<String> getRefObjectTypes() throws OperationFailedException {
 173  0
         return DocumentServiceAssembler.toGenericTypeKeyList(dao.find(RefObjectType.class));
 174  
     }
 175  
     
 176  
     @Override
 177  
     @Transactional(readOnly=true)
 178  
     public List<String> getRefObjectSubTypes(String refObjectTypeKey) throws MissingParameterException, OperationFailedException {
 179  0
         checkForMissingParameter(refObjectTypeKey, "refObjectTypeKey");
 180  
         RefObjectType refOjectType;
 181  
                 try {
 182  0
                         refOjectType = dao.fetch(RefObjectType.class, refObjectTypeKey);
 183  0
                 } catch (DoesNotExistException e) {
 184  0
                         return new ArrayList<String>(0);
 185  0
                 }
 186  0
         return DocumentServiceAssembler.toGenericTypeKeyList(refOjectType.getRefObjectSubTypes());
 187  
     }
 188  
     
 189  
     @Override
 190  
     @Transactional(readOnly=true)
 191  
     public List<RefDocRelationTypeInfo> getRefDocRelationTypes() throws OperationFailedException {
 192  0
         return DocumentServiceAssembler.toGenericTypeInfoList(RefDocRelationTypeInfo.class, dao.find(RefDocRelationType.class));
 193  
     }
 194  
     
 195  
     @Override
 196  
     @Transactional(readOnly=true)
 197  
         public List<RefDocRelationTypeInfo> getRefDocRelationTypesForRefObjectSubType(String refSubTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 198  0
         checkForMissingParameter(refSubTypeKey, "refSubTypeKey");
 199  
         
 200  0
         RefObjectSubType refObjectSubType = dao.fetch(RefObjectSubType.class, refSubTypeKey);
 201  0
         return DocumentServiceAssembler.toGenericTypeInfoList(RefDocRelationTypeInfo.class, refObjectSubType.getRefDocRelationTypes());
 202  
     }
 203  
     @Override
 204  
     @Transactional(readOnly=true)
 205  
     public List<DocumentInfo> getDocumentsByIdList(List<String> documentIdList) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 206  0
         checkForMissingParameter(documentIdList, "documentIdList");
 207  0
         checkForEmptyList(documentIdList, "documentIdList");
 208  0
         List<Document> documents = dao.getDocumentsByIdList(documentIdList);
 209  0
         return DocumentServiceAssembler.toDocumentInfos(documents);
 210  
     }
 211  
     @Override
 212  
     @Transactional(readOnly=true)
 213  
     public RefDocRelationInfo getRefDocRelation(String refDocRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 214  0
         checkForMissingParameter(refDocRelationId, "refDocRelationId");
 215  0
         return DocumentServiceAssembler.toRefDocRelationInfo(dao.fetch(RefDocRelation.class, refDocRelationId));
 216  
     }
 217  
     @Override
 218  
     @Transactional(readOnly=true)
 219  
         public List<RefDocRelationInfo> getRefDocRelationsByRef(String refObjectTypeKey, String refObjectId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 220  0
         checkForMissingParameter(refObjectTypeKey, "refObjectTypeKey");
 221  0
         checkForMissingParameter(refObjectId, "refObjectId");
 222  0
         return DocumentServiceAssembler.toRefDocRelationInfos(dao.getRefDocRelationsByRef(refObjectTypeKey, refObjectId));       
 223  
     }
 224  
     @Override
 225  
     @Transactional(readOnly=true)
 226  
     public List<RefDocRelationInfo> getRefDocRelationsByDoc(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 227  0
         checkForMissingParameter(documentId, "documentId");
 228  0
         return DocumentServiceAssembler.toRefDocRelationInfos(dao.getRefDocRelationsByDoc(documentId));       
 229  
     }
 230  
     
 231  
     @Override
 232  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 233  
         public StatusInfo removeDocumentCategoryFromDocument(String documentId, String documentCategoryKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 234  0
         checkForMissingParameter(documentId, "documentId");
 235  0
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 236  0
         StatusInfo statusInfo = new StatusInfo();
 237  0
         statusInfo.setSuccess(dao.removeDocumentCategoryFromDocument(documentId, documentCategoryKey));
 238  0
         return statusInfo;
 239  
     }
 240  
 
 241  
     /**
 242  
      * Does not update Type or categories
 243  
      */
 244  
     @Override
 245  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 246  
         public DocumentInfo updateDocument(String documentId, DocumentInfo documentInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
 247  0
         checkForMissingParameter(documentId, "documentId");
 248  0
         checkForMissingParameter(documentInfo, "documentInfo");
 249  
         
 250  0
         List<ValidationResultInfo> validationResults = validateDocument("OBJECT", documentInfo);
 251  0
         if (null != validationResults && validationResults.size() > 0) {
 252  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 253  
         }
 254  
         
 255  0
         Document document = dao.fetch(Document.class, documentId);
 256  
         
 257  0
         if (!String.valueOf(document.getVersionNumber()).equals(documentInfo.getMetaInfo().getVersionInd())){
 258  0
             throw new VersionMismatchException("Document to be updated is not the current version");
 259  
         }
 260  
         
 261  0
         document = DocumentServiceAssembler.toDocument(document, documentInfo, dao);
 262  
                 
 263  0
         return DocumentServiceAssembler.toDocumentInfo(dao.update(document));
 264  
     }
 265  
     
 266  
 
 267  
     @Override
 268  
     public List<ValidationResultInfo> validateDocument(String validationType, DocumentInfo documentInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 269  0
         checkForMissingParameter(validationType, "validationType");
 270  0
         checkForMissingParameter(documentInfo, "documentInfo");
 271  
         
 272  0
         ObjectStructureDefinition objStructure = this.getObjectStructure(DocumentInfo.class.getName());
 273  0
         Validator defaultValidator = validatorFactory.getValidator();
 274  0
         List<ValidationResultInfo> validationResults = defaultValidator.validateObject(documentInfo, objStructure);
 275  0
         return validationResults;        
 276  
     }
 277  
 
 278  
 
 279  
     @Override
 280  
     public List<ValidationResultInfo> validateRefDocRelation(String validationType, RefDocRelationInfo refDocRelationInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 281  0
         checkForMissingParameter(validationType, "validationType");
 282  0
         checkForMissingParameter(refDocRelationInfo, "refDocRelationInfo");
 283  
 
 284  0
         ObjectStructureDefinition objStructure = this.getObjectStructure(RefDocRelationInfo.class.getName());
 285  0
         Validator defaultValidator = validatorFactory.getValidator();
 286  0
         List<ValidationResultInfo> validationResults = defaultValidator.validateObject(refDocRelationInfo, objStructure);
 287  0
         return validationResults;        
 288  
     }
 289  
 
 290  
     @Override
 291  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 292  
         public RefDocRelationInfo createRefDocRelation(String refObjectTypeKey, String refObjectId, String documentId, String refDocRelationTypeKey, RefDocRelationInfo refDocRelationInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 293  0
         checkForMissingParameter(refObjectTypeKey, "refObjectTypeKey");
 294  0
         checkForMissingParameter(refObjectId, "refObjectId");
 295  0
         checkForMissingParameter(refDocRelationTypeKey, "refDocRelationTypeKey");
 296  0
         checkForMissingParameter(refDocRelationInfo, "refDocRelationInfo");
 297  
         
 298  
         List<ValidationResultInfo> validationResults;
 299  
         try {
 300  0
             validationResults = validateRefDocRelation("OBJECT", refDocRelationInfo);
 301  0
         } catch (DoesNotExistException e) {
 302  0
             throw new OperationFailedException("Validation call failed." + e.getMessage());
 303  0
         }
 304  0
         if (null != validationResults && validationResults.size() > 0) {
 305  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 306  
         }
 307  
                          
 308  0
         refDocRelationInfo.setRefObjectTypeKey(refObjectTypeKey);
 309  0
         refDocRelationInfo.setRefObjectId(refObjectId);
 310  0
         refDocRelationInfo.setType(refDocRelationTypeKey);;
 311  
         
 312  0
         RefDocRelation refDocRelation = DocumentServiceAssembler.toRefDocRelation(new RefDocRelation(), refDocRelationInfo, dao);
 313  
 
 314  0
         return DocumentServiceAssembler.toRefDocRelationInfo(dao.create(refDocRelation));
 315  
     }
 316  
 
 317  
     @Override
 318  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 319  
         public RefDocRelationInfo updateRefDocRelation(String refDocRelationId, RefDocRelationInfo refDocRelationInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException {
 320  0
         checkForMissingParameter(refDocRelationId, "refDocRelationId");
 321  0
         checkForMissingParameter(refDocRelationInfo, "refDocRelationInfo");
 322  
         
 323  0
         List<ValidationResultInfo> validationResults = validateRefDocRelation("OBJECT", refDocRelationInfo);
 324  0
         if (null != validationResults && validationResults.size() > 0) {
 325  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 326  
         }
 327  
                 
 328  0
         refDocRelationInfo.setId(refDocRelationId);
 329  
         
 330  0
         RefDocRelation refDocRelation = dao.fetch(RefDocRelation.class, refDocRelationId);
 331  
         
 332  0
         if (!String.valueOf(refDocRelation.getVersionNumber()).equals(refDocRelationInfo.getMetaInfo().getVersionInd())){
 333  0
             throw new VersionMismatchException("RefDocRelation to be updated is not the current version");
 334  
         }
 335  
         
 336  0
         refDocRelation = DocumentServiceAssembler.toRefDocRelation(refDocRelation, refDocRelationInfo, dao);
 337  
                 
 338  0
         return DocumentServiceAssembler.toRefDocRelationInfo(dao.update(refDocRelation));
 339  
     }
 340  
 
 341  
     @Override
 342  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 343  
         public StatusInfo deleteRefDocRelation(String refDocRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 344  0
         checkForMissingParameter(refDocRelationId, "refDocRelationId");
 345  0
         dao.delete(RefDocRelation.class, refDocRelationId);
 346  0
         return new StatusInfo();
 347  
     }
 348  
 
 349  
    
 350  
     /**
 351  
      * Check for missing parameter and throw localized exception if missing
 352  
      *
 353  
      * @param param
 354  
      * @param parameter name
 355  
      * @throws MissingParameterException
 356  
      */
 357  
     private void checkForMissingParameter(Object param, String paramName)
 358  
             throws MissingParameterException {
 359  0
         if (param == null) {
 360  0
             throw new MissingParameterException(paramName + " can not be null");
 361  
         }
 362  0
     }
 363  
 
 364  
     /**
 365  
      * @param param
 366  
      * @param paramName
 367  
      * @throws MissingParameterException
 368  
      */
 369  
     private void checkForEmptyList(Object param, String paramName)
 370  
             throws MissingParameterException {
 371  0
         if (param != null && param instanceof List<?> && ((List<?>)param).size() == 0) {
 372  0
             throw new MissingParameterException(paramName + " can not be an empty list");
 373  
         }
 374  0
     }
 375  
     
 376  
     @Override
 377  
     public ObjectStructureDefinition getObjectStructure(String objectTypeKey) {
 378  0
         return dictionaryServiceDelegate.getObjectStructure(objectTypeKey);
 379  
     }
 380  
 
 381  
     @Override
 382  
     public List<String> getObjectTypes() {
 383  0
         return dictionaryServiceDelegate.getObjectTypes();
 384  
     }
 385  
     
 386  
     public DictionaryService getDictionaryServiceDelegate() {
 387  0
         return dictionaryServiceDelegate;
 388  
     }
 389  
 
 390  
     public void setDictionaryServiceDelegate(DictionaryService dictionaryServiceDelegate) {
 391  0
         this.dictionaryServiceDelegate = dictionaryServiceDelegate;
 392  0
     }
 393  
 
 394  
         public DocumentDao getDao() {
 395  0
                 return dao;
 396  
         }
 397  
 
 398  
         public void setDao(DocumentDao dao) {
 399  0
                 this.dao = dao;
 400  0
         }
 401  
 
 402  
         public SearchManager getSearchManager() {
 403  0
                 return searchManager;
 404  
         }
 405  
 
 406  
         public void setSearchManager(SearchManager searchManager) {
 407  0
                 this.searchManager = searchManager;
 408  0
         }
 409  
 
 410  
     public ValidatorFactory getValidatorFactory() {
 411  0
         return validatorFactory;
 412  
     }
 413  
 
 414  
     public void setValidatorFactory(ValidatorFactory validatorFactory) {
 415  0
         this.validatorFactory = validatorFactory;
 416  0
     }        
 417  
 }