com.ldodds.foafamatic
Class PersonManager

java.lang.Object
  |
  +--com.ldodds.foafamatic.PersonManager
All Implemented Interfaces:
Validatable

public class PersonManager
extends java.lang.Object
implements Validatable

Responsible for building people data, based on user input

This class walks through the fields in the user interface to generate an internal representation of the personal data entered by the user. This data can then be used to validate the input.

This code is Public Domain

Author:
ccslrd

Constructor Summary
PersonManager()
           
 
Method Summary
 com.ldodds.foaf.Person build()
          Builds the internal data model based on the information that the user has entered into the user interface.
 java.util.List getErrors()
          Asks the object for validation errors.
 void populate(com.ldodds.foaf.Person person)
           
 boolean validate()
           Validates the data from the personal user forms, ensuring that required fields have been populated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersonManager

public PersonManager()
Method Detail

build

public com.ldodds.foaf.Person build()
Builds the internal data model based on the information that the user has entered into the user interface. Does not validate any of the data, for this call validate


populate

public void populate(com.ldodds.foaf.Person person)

validate

public boolean validate()

Validates the data from the personal user forms, ensuring that required fields have been populated.

Specified by:
validate in interface Validatable
Returns:
true is the object is valid.

getErrors

public java.util.List getErrors()
Description copied from interface: Validatable
Asks the object for validation errors.

Specified by:
getErrors in interface Validatable
Returns:
null if there are no errors, otherwise a list of ValidationErrors
See Also:
Validatable.getErrors()