com.threerings.antidote.field
Class ListComponent<V extends ReferenceField>

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by com.threerings.antidote.field.BaseComponent
              extended by com.threerings.antidote.field.ListComponent<V>
All Implemented Interfaces:
Field, ReferenceField, RequiresValidation, Cloneable
Direct Known Subclasses:
ListField, ListTask

abstract class ListComponent<V extends ReferenceField>
extends BaseComponent

An abstract BaseComponent designed to hold lists of BaseComponent objects and tools to validate those fields. Package private. Use one of the subclasses.

See Also:
ListField, ListTask

Field Summary
 
Fields inherited from class org.apache.tools.ant.Task
target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
description, location, project
 
Constructor Summary
ListComponent()
           
 
Method Summary
protected  void appendRequiresValidation(V needsValidation)
          Append a field requiring validation to the list.
abstract  String getChildFieldName()
          Returns the name of the child fields of this ListField.
protected  List<V> getValidatedFieldList()
          Return the list of validated fields.
protected  boolean noChildFieldsDefined()
          Adds a violation and returns true if no child fields were defined, false otherwise.
protected  void requireChildFieldValidation()
          Throws an RequiresValidationException if the child fields have not been validated.
protected  ValidStatus validateFieldList()
          Validate the list of declared child fields.
 
Methods inherited from class com.threerings.antidote.field.BaseComponent
appendViolation, appendViolationList, getReferencedField, isReference, registerField, reportConflictingProperties, reportUnsetDependentFields, reportUnsetDependentProperties, reportUnsetField, setReference, validate, validateChildFields, validateChildFields, validateField, validateOptionalProperties, validateProperties, validateProperties
 
Methods inherited from class org.apache.tools.ant.Task
bindToOwner, execute, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
clone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.threerings.antidote.field.Field
getFieldName, getLocation
 

Constructor Detail

ListComponent

ListComponent()
Method Detail

getChildFieldName

public abstract String getChildFieldName()
Returns the name of the child fields of this ListField.


appendRequiresValidation

protected void appendRequiresValidation(V needsValidation)
Append a field requiring validation to the list.


getValidatedFieldList

protected List<V> getValidatedFieldList()
Return the list of validated fields. Must be called after validateFieldList()


requireChildFieldValidation

protected void requireChildFieldValidation()
Throws an RequiresValidationException if the child fields have not been validated.


noChildFieldsDefined

protected boolean noChildFieldsDefined()
Adds a violation and returns true if no child fields were defined, false otherwise.


validateFieldList

protected ValidStatus validateFieldList()
Validate the list of declared child fields. Must be called before getValidatedFieldList(). Returns a ValidStatus enum describing the validated fields.



Copyright © 2007-2008 Three Rings Design, Inc. All Rights Reserved. Released under a BSD license.