Coverage Report - org.kuali.student.core.comment.service.impl.CommentServiceImpl
 
Classes in this File Line Coverage Branch Coverage Complexity
CommentServiceImpl
0%
0/152
0%
0/28
2.333
 
 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.comment.service.impl;
 17  
 
 18  
 import java.util.List;
 19  
 
 20  
 import javax.jws.WebService;
 21  
 import javax.persistence.NoResultException;
 22  
 
 23  
 import org.apache.log4j.Logger;
 24  
 import org.kuali.student.common.validator.Validator;
 25  
 import org.kuali.student.common.validator.ValidatorFactory;
 26  
 import org.kuali.student.core.comment.dao.CommentDao;
 27  
 import org.kuali.student.core.comment.dto.CommentInfo;
 28  
 import org.kuali.student.core.comment.dto.CommentTypeInfo;
 29  
 import org.kuali.student.core.comment.dto.TagInfo;
 30  
 import org.kuali.student.core.comment.dto.TagTypeInfo;
 31  
 import org.kuali.student.core.comment.entity.Comment;
 32  
 import org.kuali.student.core.comment.entity.CommentType;
 33  
 import org.kuali.student.core.comment.entity.Reference;
 34  
 import org.kuali.student.core.comment.entity.ReferenceType;
 35  
 import org.kuali.student.core.comment.entity.Tag;
 36  
 import org.kuali.student.core.comment.entity.TagType;
 37  
 import org.kuali.student.core.comment.service.CommentService;
 38  
 import org.kuali.student.core.dictionary.dto.ObjectStructureDefinition;
 39  
 import org.kuali.student.core.dictionary.service.DictionaryService;
 40  
 import org.kuali.student.core.dto.ReferenceTypeInfo;
 41  
 import org.kuali.student.core.dto.StatusInfo;
 42  
 import org.kuali.student.core.exceptions.AlreadyExistsException;
 43  
 import org.kuali.student.core.exceptions.DataValidationErrorException;
 44  
 import org.kuali.student.core.exceptions.DoesNotExistException;
 45  
 import org.kuali.student.core.exceptions.InvalidParameterException;
 46  
 import org.kuali.student.core.exceptions.MissingParameterException;
 47  
 import org.kuali.student.core.exceptions.OperationFailedException;
 48  
 import org.kuali.student.core.exceptions.PermissionDeniedException;
 49  
 import org.kuali.student.core.exceptions.VersionMismatchException;
 50  
 import org.kuali.student.core.search.service.SearchManager;
 51  
 import org.kuali.student.core.validation.dto.ValidationResultInfo;
 52  
 import org.springframework.transaction.annotation.Transactional;
 53  
 
 54  
 /**
 55  
  * Implementation of the Comment Search Service
 56  
  *
 57  
  * @author Kuali Rice Team (kuali-rice@googlegroups.com)
 58  
  *
 59  
  */
 60  
 @WebService(endpointInterface = "org.kuali.student.core.comment.service.CommentService", serviceName = "CommentService", portName = "CommentService", targetNamespace = "http://student.kuali.org/wsdl/commentService")
 61  
 @Transactional(readOnly=true,noRollbackFor={DoesNotExistException.class},rollbackFor={Throwable.class})
 62  0
 public class CommentServiceImpl implements CommentService {
 63  
     
 64  0
     final Logger logger = Logger.getLogger(CommentServiceImpl.class);
 65  
     
 66  
     private CommentDao commentDao;
 67  
     private DictionaryService dictionaryServiceDelegate;
 68  
     private SearchManager searchManager;
 69  
     private ValidatorFactory validatorFactory;
 70  
 
 71  
     /**
 72  
      * This overridden method ...
 73  
      *
 74  
      * @see org.kuali.student.core.comment.service.CommentService#addComment(java.lang.String, java.lang.String, org.kuali.student.core.comment.dto.CommentInfo)
 75  
      */
 76  
     @Override
 77  
     @Transactional(readOnly=false)
 78  
         public CommentInfo addComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 79  0
         commentInfo.setReferenceTypeKey(referenceTypeKey);
 80  0
         commentInfo.setReferenceId(referenceId);
 81  
             
 82  
         // Validate Comment
 83  0
         List<ValidationResultInfo> validationResults = null;
 84  
         try {
 85  0
             validationResults = validateComment("OBJECT", commentInfo);
 86  0
         } catch (DoesNotExistException e1) {
 87  0
             throw new OperationFailedException("Validation call failed." + e1.getMessage());
 88  0
         }
 89  0
         if (null != validationResults && validationResults.size() > 0) {
 90  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 91  
         }
 92  
         
 93  0
         Reference reference=null;
 94  0
         reference = commentDao.getReference(referenceId, referenceTypeKey);
 95  0
         if(reference==null){
 96  0
             reference = new Reference();
 97  0
             reference.setReferenceId(referenceId);
 98  
                         try {
 99  0
                                 ReferenceType referenceType = commentDao.fetch(ReferenceType.class, referenceTypeKey);
 100  0
                     reference.setReferenceType(referenceType);
 101  0
                     commentDao.create(reference);
 102  0
                         } catch (DoesNotExistException e) {
 103  0
                                 throw new InvalidParameterException(e.getMessage());
 104  0
                         }
 105  
         }
 106  
 
 107  0
         Comment comment = null;
 108  
 
 109  
         try {
 110  0
             comment = CommentServiceAssembler.toComment(false, commentInfo, commentDao);
 111  0
         } catch (DoesNotExistException e) {
 112  0
             throw new InvalidParameterException(e.getMessage());
 113  0
         }
 114  
 
 115  0
         Comment createdComment = commentDao.create(comment);
 116  
 
 117  0
         CommentInfo createdCommentInfo = CommentServiceAssembler.toCommentInfo(createdComment);
 118  
 
 119  0
         return createdCommentInfo;
 120  
     }
 121  
 
 122  
     /**
 123  
      * This overridden method ...
 124  
      * @see org.kuali.student.core.comment.service.CommentService#addTag(java.lang.String, java.lang.String, org.kuali.student.core.comment.dto.TagInfo)
 125  
      */
 126  
     @Override
 127  
     @Transactional(readOnly=false)
 128  
         public TagInfo addTag(String referenceId, String referenceTypeKey, TagInfo tagInfo) throws DataValidationErrorException, AlreadyExistsException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 129  
 
 130  
         // Validate Tag
 131  0
         List<ValidationResultInfo> validationResults = null;
 132  
         try {
 133  0
             validationResults = validateTag("OBJECT", tagInfo);
 134  0
         } catch (DoesNotExistException e1) {
 135  0
             throw new OperationFailedException("Validation call failed." + e1.getMessage());
 136  0
         }
 137  0
         if (null != validationResults && validationResults.size() > 0) {
 138  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 139  
         }
 140  
         
 141  0
         tagInfo.setReferenceTypeKey(referenceTypeKey);
 142  0
         tagInfo.setReferenceId(referenceId);
 143  0
         Reference reference=null;
 144  0
         reference = commentDao.getReference(referenceId, referenceTypeKey);
 145  0
         if(reference==null){
 146  0
             reference = new Reference();
 147  0
             reference.setReferenceId(referenceId);
 148  
                         try {
 149  0
                                 ReferenceType referenceType = commentDao.fetch(ReferenceType.class, referenceTypeKey);
 150  0
                     reference.setReferenceType(referenceType);
 151  0
                     commentDao.create(reference);
 152  0
                         } catch (DoesNotExistException e) {
 153  0
                                 throw new InvalidParameterException(e.getMessage());
 154  0
                         }
 155  
         }
 156  
 
 157  0
         Tag tag = null;
 158  
 
 159  
         try {
 160  0
             tag = CommentServiceAssembler.toTag(false, tagInfo, commentDao);
 161  0
         } catch (DoesNotExistException e) {
 162  0
             logger.error("Exception occured: ", e);
 163  0
         }
 164  
 
 165  0
         Tag createdTag = commentDao.create(tag);
 166  
 
 167  0
         TagInfo createdTagInfo = CommentServiceAssembler.toTagInfo(createdTag);
 168  
 
 169  0
         return createdTagInfo;
 170  
     }
 171  
 
 172  
     /**
 173  
      * This overridden method ...
 174  
      *
 175  
      * @see org.kuali.student.core.comment.service.CommentService#getComment(java.lang.String)
 176  
      */
 177  
     @Override
 178  
     public CommentInfo getComment(String commentId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 179  0
         checkForMissingParameter(commentId, "commentId");
 180  0
         Comment comment = commentDao.fetch(Comment.class, commentId);
 181  0
         return CommentServiceAssembler.toCommentInfo(comment);
 182  
     }
 183  
 
 184  
     /**
 185  
      * This overridden method ...
 186  
      *
 187  
      * @see org.kuali.student.core.comment.service.CommentService#getCommentTypes()
 188  
      */
 189  
     @Override
 190  
     public List<CommentTypeInfo> getCommentTypes() throws OperationFailedException {
 191  0
         List<CommentType> commentTypes = commentDao.find(CommentType.class);
 192  0
         return CommentServiceAssembler.toCommentTypeInfos(commentTypes);
 193  
     }
 194  
 
 195  
     /**
 196  
      * This overridden method ...
 197  
      *
 198  
      * @see org.kuali.student.core.comment.service.CommentService#getCommentTypesForReferenceType(java.lang.String)
 199  
      */
 200  
     @Override
 201  
     public List<CommentTypeInfo> getCommentTypesForReferenceType(String referenceTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 202  0
         List<CommentType> commentTypes = commentDao.getCommentTypesByReferenceTypeId(referenceTypeKey);
 203  0
         return CommentServiceAssembler.toCommentTypeInfos(commentTypes);
 204  
     }
 205  
 
 206  
     /**
 207  
      * This overridden method ...
 208  
      *
 209  
      * @see org.kuali.student.core.comment.service.CommentService#getComments(java.lang.String, java.lang.String)
 210  
      */
 211  
     @Override
 212  
     public List<CommentInfo> getComments(String referenceId, String referenceTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 213  0
         List<Comment> comments = commentDao.getComments(referenceId, referenceTypeKey);
 214  0
         return CommentServiceAssembler.toCommentInfos(comments);
 215  
     }
 216  
 
 217  
     /**
 218  
      * This overridden method ...
 219  
      *
 220  
      * @see org.kuali.student.core.comment.service.CommentService#getCommentsByType(java.lang.String, java.lang.String, java.lang.String)
 221  
      */
 222  
     @Override
 223  
     public List<CommentInfo> getCommentsByType(String referenceId, String referenceTypeKey, String commentTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 224  0
         List<Comment> comments = commentDao.getCommentsByType(referenceId, referenceTypeKey, commentTypeKey);
 225  0
         return CommentServiceAssembler.toCommentInfos(comments);
 226  
     }
 227  
 
 228  
     /**
 229  
      * This overridden method ...
 230  
      *
 231  
      * @see org.kuali.student.core.comment.service.CommentService#getReferenceTypes()
 232  
      */
 233  
     @Override
 234  
     public List<ReferenceTypeInfo> getReferenceTypes() throws OperationFailedException {
 235  0
             List<ReferenceType> referenceTypes = commentDao.find(ReferenceType.class);
 236  0
         return CommentServiceAssembler.toReferenceTypeInfos(referenceTypes);
 237  
     }
 238  
 
 239  
     /**
 240  
      * This overridden method ...
 241  
      *
 242  
      * @see org.kuali.student.core.comment.service.CommentService#getTag(java.lang.String)
 243  
      */
 244  
     @Override
 245  
     public TagInfo getTag(String tagId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 246  0
         checkForMissingParameter(tagId, "tagId");
 247  0
         Tag tag = commentDao.fetch(Tag.class, tagId);
 248  0
         return CommentServiceAssembler.toTagInfo(tag);
 249  
     }
 250  
 
 251  
     /**
 252  
      * This overridden method ...
 253  
      *
 254  
      * @see org.kuali.student.core.comment.service.CommentService#getTagTypes()
 255  
      */
 256  
     @Override
 257  
     public List<TagTypeInfo> getTagTypes() throws OperationFailedException {
 258  0
         List<TagType> tagTypes = commentDao.find(TagType.class);
 259  
 
 260  0
         return CommentServiceAssembler.toTagTypeInfos(tagTypes);
 261  
     }
 262  
 
 263  
     /**
 264  
      * This overridden method ...
 265  
      *
 266  
      * @see org.kuali.student.core.comment.service.CommentService#getTags(java.lang.String, java.lang.String)
 267  
      */
 268  
     @Override
 269  
     public List<TagInfo> getTags(String referenceId, String referenceTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 270  
 
 271  0
         List<Tag> tags = commentDao.getTags(referenceId, referenceTypeKey);
 272  
 
 273  0
         return CommentServiceAssembler.toTagInfos(tags);
 274  
     }
 275  
 
 276  
     /**
 277  
      * This overridden method ...
 278  
      *
 279  
      * @see org.kuali.student.core.comment.service.CommentService#getTagsByType(java.lang.String, java.lang.String, java.lang.String)
 280  
      */
 281  
     @Override
 282  
     public List<TagInfo> getTagsByType(String referenceId, String referenceTypeKey, String tagTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 283  
 
 284  0
         List<Tag> tags = commentDao.getTagsByType(referenceId, referenceTypeKey, tagTypeKey);
 285  0
         return CommentServiceAssembler.toTagInfos(tags);
 286  
     }
 287  
 
 288  
     /**
 289  
      * This overridden method ...
 290  
      *
 291  
      * @see org.kuali.student.core.comment.service.CommentService#removeComment(java.lang.String, java.lang.String, java.lang.String)
 292  
      */
 293  
     @Override
 294  
     @Transactional(readOnly=false)
 295  
         public StatusInfo removeComment(String commentId, String referenceId, String referenceTypeKey) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 296  
         try{
 297  0
             checkForMissingParameter(commentId, "commentId");
 298  0
             commentDao.delete(Comment.class, commentId);
 299  0
             return  new StatusInfo();
 300  
         }
 301  0
         catch(MissingParameterException mpe){
 302  0
             Comment comment = null;
 303  
             try{
 304  0
                 comment = commentDao.getComment(referenceId, referenceTypeKey);
 305  0
                 if(comment==null){
 306  0
                     throw new DoesNotExistException();
 307  
                 }
 308  
             }
 309  0
             catch(NoResultException nre){
 310  0
                 throw new DoesNotExistException();
 311  0
             }
 312  0
             commentDao.delete(comment);
 313  0
             return  new StatusInfo();
 314  
         }
 315  
 
 316  
     }
 317  
 
 318  
     /**
 319  
      * This overridden method ...
 320  
      *
 321  
      * @see org.kuali.student.core.comment.service.CommentService#removeComments(java.lang.String)
 322  
      */
 323  
     @Override
 324  
     @Transactional(readOnly=false)
 325  
         public StatusInfo removeComments(String referenceId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 326  0
         List<Comment> comments = commentDao.getCommentsByRefId(referenceId);
 327  0
         for(Comment comment:comments){
 328  0
             commentDao.delete(comment);
 329  
         }
 330  0
         return new StatusInfo();
 331  
     }
 332  
 
 333  
     /**
 334  
      * This overridden method ...
 335  
      * @throws DoesNotExistException
 336  
      *
 337  
      * @see org.kuali.student.core.comment.service.CommentService#removeTag(java.lang.String, java.lang.String, java.lang.String)
 338  
      */
 339  
     @Override
 340  
     @Transactional(readOnly=false)
 341  
         public StatusInfo removeTag(String tagId, String referenceId, String referenceTypeKey) throws  InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, DoesNotExistException {
 342  
         try{
 343  0
             checkForMissingParameter(tagId, "tagId");
 344  0
             commentDao.delete(Tag.class, tagId);
 345  0
             return  new StatusInfo();
 346  
         }
 347  0
         catch(MissingParameterException mpe){
 348  0
             Tag tag = null;
 349  
             try{
 350  0
                 tag = commentDao.getTag(referenceId, referenceTypeKey);
 351  0
                 if(tag==null){
 352  0
                     throw new DoesNotExistException();
 353  
                 }
 354  
             }
 355  0
             catch(NoResultException nre){
 356  0
                 throw new DoesNotExistException();
 357  0
             }
 358  0
             commentDao.delete(tag);
 359  0
             return  new StatusInfo();
 360  
         }
 361  
     }
 362  
 
 363  
     /**
 364  
      * This overridden method ...
 365  
      *
 366  
      * @see org.kuali.student.core.comment.service.CommentService#removeTags(java.lang.String)
 367  
      */
 368  
     @Override
 369  
     @Transactional(readOnly=false)
 370  
         public StatusInfo removeTags(String tagId) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException {
 371  
         //tagId sould be referenceId like in removeComments() method
 372  0
         List<Tag> tags = commentDao.getTagsByRefId(tagId);
 373  0
         for(Tag tag:tags){
 374  0
             commentDao.delete(tag);
 375  
         }
 376  0
         return new StatusInfo();
 377  
     }
 378  
 
 379  
 
 380  
     /**
 381  
      * This overridden method ...
 382  
      *
 383  
      * @see org.kuali.student.core.comment.service.CommentService#updateComment(java.lang.String, java.lang.String, org.kuali.student.core.comment.dto.CommentInfo)
 384  
      */
 385  
     @Override
 386  
     @Transactional(readOnly=false)
 387  
         public CommentInfo updateComment(String referenceId, String referenceTypeKey, CommentInfo commentInfo) throws DataValidationErrorException, InvalidParameterException, MissingParameterException, OperationFailedException, PermissionDeniedException, DoesNotExistException, VersionMismatchException {
 388  
 
 389  
         // Validate Comment
 390  0
         List<ValidationResultInfo> validationResults = validateComment("OBJECT", commentInfo);
 391  0
         if (null != validationResults && validationResults.size() > 0) {
 392  0
             throw new DataValidationErrorException("Validation error!", validationResults);
 393  
         }
 394  
         
 395  0
                 Comment entity = commentDao.fetch(Comment.class, commentInfo.getId());
 396  0
                 if (!String.valueOf(entity.getVersionNumber()).equals(commentInfo.getMetaInfo().getVersionInd())){
 397  0
                         throw new VersionMismatchException("ResultComponent to be updated is not the current version");
 398  
                 }
 399  
 
 400  0
                 CommentServiceAssembler.toComment(entity, referenceId, referenceTypeKey, commentInfo, commentDao);
 401  0
             commentDao.update(entity);
 402  
 
 403  0
             return CommentServiceAssembler.toCommentInfo(entity);
 404  
     }
 405  
 
 406  
     /**
 407  
      * This overridden method ...
 408  
      *
 409  
      * @see org.kuali.student.core.comment.service.CommentService#validateComment(java.lang.String, org.kuali.student.core.comment.dto.CommentInfo)
 410  
      */
 411  
     @Override
 412  
     public List<ValidationResultInfo> validateComment(String validationType, CommentInfo commentInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 413  0
                 checkForMissingParameter(validationType, "validationType");
 414  0
                 checkForMissingParameter(commentInfo, "commentInfo");
 415  
 
 416  0
         ObjectStructureDefinition objStructure = this.getObjectStructure(CommentInfo.class.getName());
 417  0
         Validator defaultValidator = validatorFactory.getValidator();
 418  0
         List<ValidationResultInfo> validationResults = defaultValidator.validateObject(commentInfo, objStructure);
 419  0
         return validationResults;         
 420  
     }
 421  
 
 422  
     private List<ValidationResultInfo> validateTag(String validationType, TagInfo tagInfo) throws DoesNotExistException, InvalidParameterException, MissingParameterException, OperationFailedException {
 423  0
         checkForMissingParameter(validationType, "validationType");
 424  0
         checkForMissingParameter(tagInfo, "tagInfo");
 425  
 
 426  0
         ObjectStructureDefinition objStructure = this.getObjectStructure(TagInfo.class.getName());
 427  0
         Validator defaultValidator = validatorFactory.getValidator();
 428  0
         List<ValidationResultInfo> validationResults = defaultValidator.validateObject(tagInfo, objStructure);
 429  0
         return validationResults;         
 430  
     }
 431  
     
 432  
     /**
 433  
      * @return the commentDao
 434  
      */
 435  
     public CommentDao getCommentDao() {
 436  0
         return commentDao;
 437  
     }
 438  
 
 439  
     /**
 440  
      * @param commentDao the commentDao to set
 441  
      */
 442  
     public void setCommentDao(CommentDao commentDao) {
 443  0
         this.commentDao = commentDao;
 444  0
     }
 445  
 
 446  
     /**
 447  
      * Check for missing parameter and throw localized exception if missing
 448  
      *
 449  
      * @param param
 450  
      * @param parameter name
 451  
      * @throws MissingParameterException
 452  
      */
 453  
     private void checkForMissingParameter(Object param, String paramName)
 454  
             throws MissingParameterException {
 455  0
         if (param == null) {
 456  0
             throw new MissingParameterException(paramName + " can not be null");
 457  
         }
 458  0
     }
 459  
 
 460  
         /**
 461  
          * @return the dictionaryServiceDelegate
 462  
          */
 463  
         public DictionaryService getDictionaryServiceDelegate() {
 464  0
                 return dictionaryServiceDelegate;
 465  
         }
 466  
 
 467  
         /**
 468  
          * @param dictionaryServiceDelegate the dictionaryServiceDelegate to set
 469  
          */
 470  
         public void setDictionaryServiceDelegate(
 471  
                         DictionaryService dictionaryServiceDelegate) {
 472  0
                 this.dictionaryServiceDelegate = dictionaryServiceDelegate;
 473  0
         }
 474  
     /**
 475  
          * @return the searchManager
 476  
          */
 477  
         public SearchManager getSearchManager() {
 478  0
                 return searchManager;
 479  
         }
 480  
 
 481  
         /**
 482  
          * @param searchManager the searchManager to set
 483  
          */
 484  
         public void setSearchManager(SearchManager searchManager) {
 485  0
                 this.searchManager = searchManager;
 486  0
         }
 487  
 
 488  
         @Override
 489  
         public ObjectStructureDefinition getObjectStructure(String objectTypeKey) {
 490  0
                 return dictionaryServiceDelegate.getObjectStructure(objectTypeKey);
 491  
         }
 492  
         @Override
 493  
         public List<String> getObjectTypes() {
 494  0
                 return dictionaryServiceDelegate.getObjectTypes();
 495  
         }
 496  
 
 497  
     /**
 498  
      * @return the validatorFactory
 499  
      */
 500  
     public ValidatorFactory getValidatorFactory() {
 501  0
         return validatorFactory;
 502  
     }
 503  
 
 504  
     /**
 505  
      * @param validatorFactory the validatorFactory to set
 506  
      */
 507  
     public void setValidatorFactory(ValidatorFactory validatorFactory) {
 508  0
         this.validatorFactory = validatorFactory;
 509  0
     }
 510  
 }