project35.soa.validation
Class ValidationFacility

java.lang.Object
  extended by project35.soa.validation.ValidationFacility

public class ValidationFacility
extends java.lang.Object

this is meant to be the main class for performing validation on fields, records and documents in Project35. It can be configured to check for a number of items, including:


Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.

Version:
1.0
Author:
Kevin Garwood (kgarwood@users.sourceforge.net), code contributions from 2002 - September 30, 2007.

Field Summary
static int CHECK_CURRENT_RECORD
           
static int CHECK_FIELD
           
static int CHECK_WHOLE_DOCUMENT
           
 
Constructor Summary
ValidationFacility(Project35FormContext formContext)
           
 
Method Summary
 void checkForRequiredFields(boolean checkForRequiredFields)
           
 ModelObjectCommentRegistry createModelObjectCommentRegistry()
           
 boolean errorsFound()
           
 java.util.ArrayList getAlerts(RecordModel recordModel)
           
 java.util.HashMap getAlertsForRecordModels()
           
 java.util.ArrayList getErrors(RecordModel recordModel)
           
 void validateCurrentEditField(RecordModel recordModel, java.lang.String fieldName, java.lang.String candidateValue)
           
 void validateCurrentListField(ListFieldModel listFieldModel)
           
 void validateCurrentRecord(RecordModel recordModel)
           
 void validateDocument()
           
 void validateDocumentFinalDraft()
           
 void validatePartialDocument(RecordModel recordModel)
           
 void validateReferences()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CHECK_FIELD

public static final int CHECK_FIELD
See Also:
Constant Field Values

CHECK_CURRENT_RECORD

public static final int CHECK_CURRENT_RECORD
See Also:
Constant Field Values

CHECK_WHOLE_DOCUMENT

public static final int CHECK_WHOLE_DOCUMENT
See Also:
Constant Field Values
Constructor Detail

ValidationFacility

public ValidationFacility(Project35FormContext formContext)
Method Detail

getErrors

public java.util.ArrayList getErrors(RecordModel recordModel)

errorsFound

public boolean errorsFound()

getAlertsForRecordModels

public java.util.HashMap getAlertsForRecordModels()

checkForRequiredFields

public void checkForRequiredFields(boolean checkForRequiredFields)

getAlerts

public java.util.ArrayList getAlerts(RecordModel recordModel)

createModelObjectCommentRegistry

public ModelObjectCommentRegistry createModelObjectCommentRegistry()

validateDocumentFinalDraft

public void validateDocumentFinalDraft()
                                throws java.lang.Exception
Throws:
java.lang.Exception

validateDocument

public void validateDocument()
                      throws java.lang.Exception
Throws:
java.lang.Exception

validateReferences

public void validateReferences()
                        throws java.lang.Exception
Throws:
java.lang.Exception

validateCurrentRecord

public void validateCurrentRecord(RecordModel recordModel)
                           throws java.lang.Exception
Throws:
java.lang.Exception

validatePartialDocument

public void validatePartialDocument(RecordModel recordModel)
                             throws java.lang.Exception
Throws:
java.lang.Exception

validateCurrentEditField

public void validateCurrentEditField(RecordModel recordModel,
                                     java.lang.String fieldName,
                                     java.lang.String candidateValue)
                              throws java.lang.Exception
Throws:
java.lang.Exception

validateCurrentListField

public void validateCurrentListField(ListFieldModel listFieldModel)
                              throws java.lang.Exception
Throws:
java.lang.Exception