net.dpml.metro.tools
Class PartsDataType

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by net.dpml.tools.tasks.GenericTask
              extended by net.dpml.metro.tools.PartsDataType
All Implemented Interfaces:
DynamicElementNS

public class PartsDataType
extends GenericTask
implements DynamicElementNS

A datatype that enables custom part builders.

Version:
1.2.0
Author:
Digital Product Meta Library

Field Summary
 
Fields inherited from class net.dpml.tools.tasks.GenericTask
ASC_EXT, GPG_EXE_KEY, MD5_EXT
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
PartsDataType(Task owner)
          Creation of a new parts data type.
 
Method Summary
 ComponentBuilderTask createComponent()
          Create a new component builder task.
 Object createDynamicElement(String uri, String name, String qualified)
          Operation used to construct a custom part type directive.
 PartDataType createPart()
          Create a new part datatype.
 EntryDataType createValue()
          Create a new constructed value builder.
 PartReferenceBuilder[] getPartBuilders()
          Return the set of parts contained within this container.
 PartReference[] getParts(ClassLoader classloader, Type type)
          Return the set of parts contained within this parts collection.
 
Methods inherited from class net.dpml.tools.tasks.GenericTask
asc, checksum, copy, deleteDir, getContext, getLibrary, getResource, init, isInitialized, mkDir
 
Methods inherited from class org.apache.tools.ant.Task
execute, getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartsDataType

public PartsDataType(Task owner)
Creation of a new parts data type.

Parameters:
owner - the owning task
Method Detail

createComponent

public ComponentBuilderTask createComponent()
Create a new component builder task.

Returns:
a new component builder task

createPart

public PartDataType createPart()
Create a new part datatype.

Returns:
the nwew part datatype

createValue

public EntryDataType createValue()
Create a new constructed value builder.

Returns:
a part builder

createDynamicElement

public Object createDynamicElement(String uri,
                                   String name,
                                   String qualified)
Operation used to construct a custom part type directive.

Specified by:
createDynamicElement in interface DynamicElementNS
Parameters:
uri - the part handler uri
name - the element name
qualified - the qualified name
Returns:
a dynamic part builder

getPartBuilders

public PartReferenceBuilder[] getPartBuilders()
Return the set of parts contained within this container.

Returns:
the contained parts

getParts

public PartReference[] getParts(ClassLoader classloader,
                                Type type)
                         throws IntrospectionException,
                                IOException,
                                ClassNotFoundException
Return the set of parts contained within this parts collection.

Parameters:
classloader - the runtime classloader
type - the component type that references are relative to
Returns:
the contained parts
Throws:
IntrospectionException - if a class introspection error occurs
IOException - if an I/O error occurs
ClassNotFoundException - if a part class cannot be found