Coverage Report - org.kuali.student.core.document.service.impl.DocumentServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
DocumentServiceImpl
84%
119/141
57%
16/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  2
 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  1
         this.dao=dao;
 73  1
     }
 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  3
         checkForMissingParameter(documentId, "documentId");
 80  3
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 81  3
         StatusInfo statusInfo = new StatusInfo();
 82  3
         statusInfo.setSuccess(dao.addDocumentCategoryToDocument(documentId, documentCategoryKey));
 83  
         
 84  3
         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) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 90  3
         checkForMissingParameter(documentTypeKey, "documentTypeKey");
 91  3
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 92  3
         checkForMissingParameter(documentInfo, "documentInfo");
 93  
         
 94  
         DocumentType type;
 95  
         DocumentCategory  category;
 96  
         
 97  
     // Validate
 98  
     List<ValidationResultInfo> validationResults;
 99  
     try {
 100  3
         validationResults = validateDocument("OBJECT", documentInfo);
 101  0
     } catch (DoesNotExistException e) {
 102  0
         throw new OperationFailedException("Validation call failed." + e.getMessage());
 103  3
     }
 104  3
     if (null != validationResults && validationResults.size() > 0) {
 105  0
         throw new DataValidationErrorException("Validation error!", validationResults);
 106  
     }
 107  
         
 108  
         try {
 109  3
             type = dao.fetch(DocumentType.class, documentTypeKey);
 110  3
             category = dao.fetch(DocumentCategory.class, documentCategoryKey);
 111  0
         } catch (DoesNotExistException dnee) {
 112  0
             throw new OperationFailedException("error fetching document keys", dnee);
 113  3
     }
 114  
         
 115  3
         Document doc = DocumentServiceAssembler.toDocument(new Document(), documentInfo, dao);
 116  3
         doc.setType(type);
 117  3
         doc.setCategoryList(Arrays.asList(category));
 118  3
         dao.create(doc);
 119  3
         return DocumentServiceAssembler.toDocumentInfo(doc);
 120  
     }
 121  
 
 122  
     @Override
 123  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 124  
         public StatusInfo deleteDocument(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 125  1
         checkForMissingParameter(documentId, "documentId");
 126  1
         dao.delete(Document.class, documentId);
 127  1
         return new StatusInfo();
 128  
     }
 129  
     @Override
 130  
     @Transactional(readOnly=true)
 131  
     public List<DocumentCategoryInfo> getCategoriesByDocument(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 132  6
         checkForMissingParameter(documentId, "documentId");
 133  6
         List<DocumentCategory> categories = dao.getCategoriesByDocument(documentId);
 134  6
         return DocumentServiceAssembler.toDocumentCategoryInfos(categories);
 135  
     }
 136  
     @Override
 137  
     @Transactional(readOnly=true)
 138  
     public DocumentInfo getDocument(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 139  5
         checkForMissingParameter(documentId, "documentId");
 140  5
         return DocumentServiceAssembler.toDocumentInfo(dao.fetch(Document.class, documentId));
 141  
     }
 142  
     @Override
 143  
     @Transactional(readOnly=true)
 144  
     public List<DocumentCategoryInfo> getDocumentCategories() throws OperationFailedException {
 145  1
         List<DocumentCategory> categories = dao.find(DocumentCategory.class);
 146  1
         return DocumentServiceAssembler.toDocumentCategoryInfos(categories);
 147  
     }
 148  
     
 149  
     @Override
 150  
     @Transactional(readOnly=true)
 151  
     public DocumentCategoryInfo getDocumentCategory(String documentCategoryKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 152  1
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 153  1
         return DocumentServiceAssembler.toDocumentCategoryInfo(dao.fetch(DocumentCategory.class, documentCategoryKey));
 154  
     }
 155  
     
 156  
     @Override
 157  
     @Transactional(readOnly=true)
 158  
     public DocumentTypeInfo getDocumentType(String documentTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 159  1
         checkForMissingParameter(documentTypeKey, "documentTypeKey");
 160  1
         return DocumentServiceAssembler.toGenericTypeInfo(DocumentTypeInfo.class,(dao.fetch(DocumentType.class, documentTypeKey)));
 161  
     }
 162  
     
 163  
     @Override
 164  
     @Transactional(readOnly=true)
 165  
     public List<DocumentTypeInfo> getDocumentTypes() throws OperationFailedException {
 166  1
         return DocumentServiceAssembler.toGenericTypeInfoList(DocumentTypeInfo.class,dao.find(DocumentType.class));
 167  
     }
 168  
     
 169  
     @Override
 170  
     @Transactional(readOnly=true)
 171  
     public List<String> getRefObjectTypes() throws OperationFailedException {
 172  1
         return DocumentServiceAssembler.toGenericTypeKeyList(dao.find(RefObjectType.class));
 173  
     }
 174  
     
 175  
     @Override
 176  
     @Transactional(readOnly=true)
 177  
     public List<String> getRefObjectSubTypes(String refObjectTypeKey) throws MissingParameterException, OperationFailedException {
 178  1
         checkForMissingParameter(refObjectTypeKey, "refObjectTypeKey");
 179  
         RefObjectType refOjectType;
 180  
                 try {
 181  1
                         refOjectType = dao.fetch(RefObjectType.class, refObjectTypeKey);
 182  0
                 } catch (DoesNotExistException e) {
 183  0
                         return new ArrayList<String>(0);
 184  1
                 }
 185  1
         return DocumentServiceAssembler.toGenericTypeKeyList(refOjectType.getRefObjectSubTypes());
 186  
     }
 187  
     
 188  
     @Override
 189  
     @Transactional(readOnly=true)
 190  
     public List<RefDocRelationTypeInfo> getRefDocRelationTypes() throws OperationFailedException {
 191  1
         return DocumentServiceAssembler.toGenericTypeInfoList(RefDocRelationTypeInfo.class, dao.find(RefDocRelationType.class));
 192  
     }
 193  
     
 194  
     @Override
 195  
     @Transactional(readOnly=true)
 196  
         public List<RefDocRelationTypeInfo> getRefDocRelationTypesForRefObjectSubType(String refSubTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 197  1
         checkForMissingParameter(refSubTypeKey, "refSubTypeKey");
 198  
         
 199  1
         RefObjectSubType refObjectSubType = dao.fetch(RefObjectSubType.class, refSubTypeKey);
 200  1
         return DocumentServiceAssembler.toGenericTypeInfoList(RefDocRelationTypeInfo.class, refObjectSubType.getRefDocRelationTypes());
 201  
     }
 202  
     @Override
 203  
     @Transactional(readOnly=true)
 204  
     public List<DocumentInfo> getDocumentsByIdList(List<String> documentIdList) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 205  1
         checkForMissingParameter(documentIdList, "documentIdList");
 206  1
         checkForEmptyList(documentIdList, "documentIdList");
 207  1
         List<Document> documents = dao.getDocumentsByIdList(documentIdList);
 208  1
         return DocumentServiceAssembler.toDocumentInfos(documents);
 209  
     }
 210  
     @Override
 211  
     @Transactional(readOnly=true)
 212  
     public RefDocRelationInfo getRefDocRelation(String refDocRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 213  2
         checkForMissingParameter(refDocRelationId, "refDocRelationId");
 214  2
         return DocumentServiceAssembler.toRefDocRelationInfo(dao.fetch(RefDocRelation.class, refDocRelationId));
 215  
     }
 216  
     @Override
 217  
     @Transactional(readOnly=true)
 218  
         public List<RefDocRelationInfo> getRefDocRelationsByRef(String refObjectTypeKey, String refObjectId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 219  1
         checkForMissingParameter(refObjectTypeKey, "refObjectTypeKey");
 220  1
         checkForMissingParameter(refObjectId, "refObjectId");
 221  1
         return DocumentServiceAssembler.toRefDocRelationInfos(dao.getRefDocRelationsByRef(refObjectTypeKey, refObjectId));       
 222  
     }
 223  
     @Override
 224  
     @Transactional(readOnly=true)
 225  
     public List<RefDocRelationInfo> getRefDocRelationsByDoc(String documentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 226  1
         checkForMissingParameter(documentId, "documentId");
 227  1
         return DocumentServiceAssembler.toRefDocRelationInfos(dao.getRefDocRelationsByDoc(documentId));       
 228  
     }
 229  
     
 230  
     @Override
 231  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 232  
         public StatusInfo removeDocumentCategoryFromDocument(String documentId, String documentCategoryKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 233  3
         checkForMissingParameter(documentId, "documentId");
 234  3
         checkForMissingParameter(documentCategoryKey, "documentCategoryKey");
 235  3
         StatusInfo statusInfo = new StatusInfo();
 236  3
         statusInfo.setSuccess(dao.removeDocumentCategoryFromDocument(documentId, documentCategoryKey));
 237  3
         return statusInfo;
 238  
     }
 239  
 
 240  
     /**
 241  
      * Does not update Type or categories
 242  
      */
 243  
     @Override
 244  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 245  
         public DocumentInfo updateDocument(String documentId, DocumentInfo documentInfo) throws DataValidationErrorException, DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException {
 246  2
         checkForMissingParameter(documentId, "documentId");
 247  2
         checkForMissingParameter(documentInfo, "documentInfo");
 248  
         
 249  2
         List<ValidationResultInfo> validationResults = validateDocument("OBJECT", documentInfo);
 250  2
         if (null != validationResults && validationResults.size() > 0) {
 251  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 252  
         }
 253  
         
 254  2
         Document document = dao.fetch(Document.class, documentId);
 255  
         
 256  2
         if (!String.valueOf(document.getVersionNumber()).equals(documentInfo.getMetaInfo().getVersionInd())){
 257  1
             throw new VersionMismatchException("Document to be updated is not the current version");
 258  
         }
 259  
         
 260  1
         document = DocumentServiceAssembler.toDocument(document, documentInfo, dao);
 261  
                 
 262  1
         return DocumentServiceAssembler.toDocumentInfo(dao.update(document));
 263  
     }
 264  
     
 265  
 
 266  
     @Override
 267  
     public List<ValidationResultInfo> validateDocument(String validationType, DocumentInfo documentInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 268  5
         checkForMissingParameter(validationType, "validationType");
 269  5
         checkForMissingParameter(documentInfo, "documentInfo");
 270  
         
 271  5
         ObjectStructureDefinition objStructure = this.getObjectStructure(DocumentInfo.class.getName());
 272  5
         Validator defaultValidator = validatorFactory.getValidator();
 273  5
         List<ValidationResultInfo> validationResults = defaultValidator.validateObject(documentInfo, objStructure);
 274  5
         return validationResults;        
 275  
     }
 276  
 
 277  
 
 278  
     @Override
 279  
     public List<ValidationResultInfo> validateRefDocRelation(String validationType, RefDocRelationInfo refDocRelationInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 280  5
         checkForMissingParameter(validationType, "validationType");
 281  5
         checkForMissingParameter(refDocRelationInfo, "refDocRelationInfo");
 282  
 
 283  5
         ObjectStructureDefinition objStructure = this.getObjectStructure(RefDocRelationInfo.class.getName());
 284  5
         Validator defaultValidator = validatorFactory.getValidator();
 285  5
         List<ValidationResultInfo> validationResults = defaultValidator.validateObject(refDocRelationInfo, objStructure);
 286  5
         return validationResults;        
 287  
     }
 288  
 
 289  
     @Override
 290  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 291  
         public RefDocRelationInfo createRefDocRelation(String refObjectTypeKey, String refObjectId, String documentId, String refDocRelationTypeKey, RefDocRelationInfo refDocRelationInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 292  3
         checkForMissingParameter(refObjectTypeKey, "refObjectTypeKey");
 293  3
         checkForMissingParameter(refObjectId, "refObjectId");
 294  3
         checkForMissingParameter(refDocRelationTypeKey, "refDocRelationTypeKey");
 295  3
         checkForMissingParameter(refDocRelationInfo, "refDocRelationInfo");
 296  
         
 297  
         List<ValidationResultInfo> validationResults;
 298  
         try {
 299  3
             validationResults = validateRefDocRelation("OBJECT", refDocRelationInfo);
 300  0
         } catch (DoesNotExistException e) {
 301  0
             throw new OperationFailedException("Validation call failed." + e.getMessage());
 302  3
         }
 303  3
         if (null != validationResults && validationResults.size() > 0) {
 304  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 305  
         }
 306  
                          
 307  3
         refDocRelationInfo.setRefObjectTypeKey(refObjectTypeKey);
 308  3
         refDocRelationInfo.setRefObjectId(refObjectId);
 309  3
         refDocRelationInfo.setType(refDocRelationTypeKey);;
 310  
         
 311  3
         RefDocRelation refDocRelation = DocumentServiceAssembler.toRefDocRelation(new RefDocRelation(), refDocRelationInfo, dao);
 312  
 
 313  1
         return DocumentServiceAssembler.toRefDocRelationInfo(dao.create(refDocRelation));
 314  
     }
 315  
 
 316  
     @Override
 317  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 318  
         public RefDocRelationInfo updateRefDocRelation(String refDocRelationId, RefDocRelationInfo refDocRelationInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, VersionMismatchException, DoesNotExistException {
 319  2
         checkForMissingParameter(refDocRelationId, "refDocRelationId");
 320  2
         checkForMissingParameter(refDocRelationInfo, "refDocRelationInfo");
 321  
         
 322  2
         List<ValidationResultInfo> validationResults = validateRefDocRelation("OBJECT", refDocRelationInfo);
 323  2
         if (null != validationResults && validationResults.size() > 0) {
 324  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 325  
         }
 326  
                 
 327  2
         refDocRelationInfo.setId(refDocRelationId);
 328  
         
 329  2
         RefDocRelation refDocRelation = dao.fetch(RefDocRelation.class, refDocRelationId);
 330  
         
 331  2
         if (!String.valueOf(refDocRelation.getVersionNumber()).equals(refDocRelationInfo.getMetaInfo().getVersionInd())){
 332  1
             throw new VersionMismatchException("RefDocRelation to be updated is not the current version");
 333  
         }
 334  
         
 335  1
         refDocRelation = DocumentServiceAssembler.toRefDocRelation(refDocRelation, refDocRelationInfo, dao);
 336  
                 
 337  1
         return DocumentServiceAssembler.toRefDocRelationInfo(dao.update(refDocRelation));
 338  
     }
 339  
 
 340  
     @Override
 341  
     @Transactional(readOnly=false,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 342  
         public StatusInfo deleteRefDocRelation(String refDocRelationId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 343  1
         checkForMissingParameter(refDocRelationId, "refDocRelationId");
 344  1
         dao.delete(RefDocRelation.class, refDocRelationId);
 345  1
         return new StatusInfo();
 346  
     }
 347  
 
 348  
    
 349  
     /**
 350  
      * Check for missing parameter and throw localized exception if missing
 351  
      *
 352  
      * @param param
 353  
      * @param parameter name
 354  
      * @throws MissingParameterException
 355  
      */
 356  
     private void checkForMissingParameter(Object param, String paramName)
 357  
             throws MissingParameterException {
 358  84
         if (param == null) {
 359  0
             throw new MissingParameterException(paramName + " can not be null");
 360  
         }
 361  84
     }
 362  
 
 363  
     /**
 364  
      * @param param
 365  
      * @param paramName
 366  
      * @throws MissingParameterException
 367  
      */
 368  
     private void checkForEmptyList(Object param, String paramName)
 369  
             throws MissingParameterException {
 370  1
         if (param != null && param instanceof List<?> && ((List<?>)param).size() == 0) {
 371  0
             throw new MissingParameterException(paramName + " can not be an empty list");
 372  
         }
 373  1
     }
 374  
     
 375  
     @Override
 376  
     public ObjectStructureDefinition getObjectStructure(String objectTypeKey) {
 377  10
         return dictionaryServiceDelegate.getObjectStructure(objectTypeKey);
 378  
     }
 379  
 
 380  
     @Override
 381  
     public List<String> getObjectTypes() {
 382  0
         return dictionaryServiceDelegate.getObjectTypes();
 383  
     }
 384  
     
 385  
     public DictionaryService getDictionaryServiceDelegate() {
 386  0
         return dictionaryServiceDelegate;
 387  
     }
 388  
 
 389  
     public void setDictionaryServiceDelegate(DictionaryService dictionaryServiceDelegate) {
 390  1
         this.dictionaryServiceDelegate = dictionaryServiceDelegate;
 391  1
     }
 392  
 
 393  
         public DocumentDao getDao() {
 394  0
                 return dao;
 395  
         }
 396  
 
 397  
         public void setDao(DocumentDao dao) {
 398  1
                 this.dao = dao;
 399  1
         }
 400  
 
 401  
         public SearchManager getSearchManager() {
 402  0
                 return searchManager;
 403  
         }
 404  
 
 405  
         public void setSearchManager(SearchManager searchManager) {
 406  0
                 this.searchManager = searchManager;
 407  0
         }
 408  
 
 409  
     public ValidatorFactory getValidatorFactory() {
 410  0
         return validatorFactory;
 411  
     }
 412  
 
 413  
     public void setValidatorFactory(ValidatorFactory validatorFactory) {
 414  1
         this.validatorFactory = validatorFactory;
 415  1
     }        
 416  
 }