edu.nrao.sss.model.project
Class ProjectValidator

java.lang.Object
  extended by edu.nrao.sss.validation.AbstractValidator<Project>
      extended by edu.nrao.sss.model.project.ProjectValidator
All Implemented Interfaces:
Validator

public class ProjectValidator
extends AbstractValidator<Project>

A validator of projects.

Validations Performed for All Purposes

  1. Project has title.
  2. Project has project code.
  3. Project has allocated time.
  4. Project has at least one program block.
  5. Contained program blocks are valid.1
1The particular validations performed depend on the validator used by this one to operate on those contained program blocks.

Version Info:

$Revision: 2125 $
$Date: 2009-03-18 10:12:32 -0600 (Wed, 18 Mar 2009) $
$Author: dharland $

Since:
2007-02-09
Author:
David M. Harland

Field Summary
 
Fields inherited from class edu.nrao.sss.validation.AbstractValidator
failFast, failures, manager, purpose, target
 
Constructor Summary
ProjectValidator()
          Creates a new instance.
 
Method Summary
 Validator getProgramBlockValidator()
          Returns a validator for program blocks.
protected  List<Validation<Project>> makeValidationList(ValidationPurpose purpose)
           
 void setProgramBlockValidator(Validator newValidator)
          Sets the validator to use for the program blocks of the target project.
protected  void validate()
           
 
Methods inherited from class edu.nrao.sss.validation.AbstractValidator
getName, getPurpose, getTarget, setManager, stopTestingAfterFirstFailure, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProjectValidator

public ProjectValidator()
Creates a new instance.

Method Detail

makeValidationList

protected List<Validation<Project>> makeValidationList(ValidationPurpose purpose)
Specified by:
makeValidationList in class AbstractValidator<Project>

validate

protected void validate()
Overrides:
validate in class AbstractValidator<Project>

setProgramBlockValidator

public void setProgramBlockValidator(Validator newValidator)
Sets the validator to use for the program blocks of the target project. It is acceptable to use a null parameter, in which case this validator will contact its manager for a program block validator or create one itself.

Parameters:
newValidator - a validator to use on the program blocks of this validator's target project.

getProgramBlockValidator

public Validator getProgramBlockValidator()
Returns a validator for program blocks.



Copyright © 2009. All Rights Reserved.