edu.nrao.sss.model.project
Class ProgramBlockValidator

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

public class ProgramBlockValidator
extends AbstractValidator<ProgramBlock>

A validator of program blocks.

Validations Performed for All Purposes

  1. Short name and/or long name was set.
  2. Program block has at least one scheduling block.
  3. Contained scheduling blocks are valid.1
1The particular validations performed depend on the validator used by this one to operate on those contained scheduling blocks.

Version Info:

$Revision: 397 $
$Date: 2007-02-26 16:11:19 -0700 (Mon, 26 Feb 2007) $
$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
ProgramBlockValidator()
          Creates a new instance.
 
Method Summary
 Validator getSchedulingBlockValidator()
          Returns a validator for program blocks.
protected  List<Validation<ProgramBlock>> makeValidationList(ValidationPurpose purpose)
           
 void setSchedulingBlockValidator(Validator newValidator)
          Sets the validator to use for the scheduling blocks of the target program block.
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

ProgramBlockValidator

public ProgramBlockValidator()
Creates a new instance.

Method Detail

makeValidationList

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

validate

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

setSchedulingBlockValidator

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

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

getSchedulingBlockValidator

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



Copyright © 2009. All Rights Reserved.